openapi: 3.1.0 info: title: Helpcenter TaskTimeEntry API version: 1.0.0 tags: - name: TaskTimeEntry paths: /api/v1/tasks/{taskId}/timeEntry: get: tags: - TaskTimeEntry summary: List Task Time Entries description: This API lists the time entries associated with a task. operationId: getTaskTimeEntries parameters: - name: include in: query description: ' Secondary information related to the time entry. Value supported is @owner@.' required: false style: form explode: true schema: type: - string - 'null' description: ' Secondary information related to the time entry. Value supported is @owner@.' enum: - owner maxLength: 100 minLength: 0 - name: createdTimeRange in: query description: Key that filters time entries created in a particular period of time. Enter the from and to dates in the ISO date format of yyyy-MM-ddThh:mm:ss.SSSZ; for example, createdTimeRange=2017-11-05T00:00:00.000Z,2018-09-05T23:59:00.000Z. required: false style: form explode: true schema: type: - string - 'null' description: Key that filters time entries created in a particular period of time. Enter the from and to dates in the ISO date format of yyyy-MM-ddThh:mm:ss.SSSZ; for example, createdTimeRange=2017-11-05T00:00:00.000Z,2018-09-05T23:59:00.000Z. maxLength: 100 minLength: 0 pattern: (((19|20)\d\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\d]{0,3})?(Z)),(((19|20)\d\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\d]{0,3})?(Z))|null - name: limit in: query description: Number of time entries to fetch required: false style: form explode: true schema: type: - string - 'null' - integer format: int32 description: Number of time entries to fetch pattern: ([0-9]+) - $ref: '#/components/parameters/billStatus' - name: orderBy in: query description: Key that sorts the time entries in ascending or descending order, based on the @executedTime@ attribute. Values allowed are @ASC@ (default) and @DESC@. required: false style: form explode: true schema: type: - string - 'null' description: Key that sorts the time entries in ascending or descending order, based on the @executedTime@ attribute. Values allowed are @ASC@ (default) and @DESC@. enum: - ASC - DESC maxLength: 100 minLength: 0 - name: from in: query description: Index number, starting from which the time entries must be fetched required: false style: form explode: true schema: type: - string - 'null' - integer format: int32 description: Index number, starting from which the time entries must be fetched pattern: ([0-9]+) - name: modifiedTimeRange in: query description: Key that filters time entries whose details were modified in a particular period of time. Enter the from and to dates in the ISO date format of yyyy-MM-ddThh:mm:ss.SSSZ; for example, modifiedTimeRange=2017-11-05T00:00:00.000Z,2018-09-05T23:59:00.000Z. required: false style: form explode: true schema: type: - string - 'null' description: Key that filters time entries whose details were modified in a particular period of time. Enter the from and to dates in the ISO date format of yyyy-MM-ddThh:mm:ss.SSSZ; for example, modifiedTimeRange=2017-11-05T00:00:00.000Z,2018-09-05T23:59:00.000Z. maxLength: 100 minLength: 0 pattern: (((19|20)\d\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\d]{0,3})?(Z)),(((19|20)\d\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\d]{0,3})?(Z))|null - $ref: '#/components/parameters/taskId' - $ref: ./Common.json#/components/parameters/orgId responses: '422': $ref: ./Common.json#/components/responses/invalidDataErrorResponse '204': $ref: ./Common.json#/components/responses/emptyResponse '200': $ref: '#/components/responses/getTimeEntryByTaskIdResponse' security: - iam-oauth2-schema: - Desk.activities.tasks.READ - Desk.tasks.READ x-audience: - external-public post: tags: - TaskTimeEntry summary: Add a Task Time Entry description: This API creates a time entry in your help desk operationId: createTaskTimeEntry parameters: - $ref: '#/components/parameters/taskId' - $ref: ./Common.json#/components/parameters/orgId requestBody: $ref: '#/components/requestBodies/timeEntryJson' responses: '422': $ref: ./Common.json#/components/responses/invalidDataErrorResponse '200': $ref: '#/components/responses/getTimeEntryJson' security: - iam-oauth2-schema: - Desk.activities.tasks.CREATE - Desk.tasks.CREATE x-audience: - external-public /api/v1/tasks/{taskId}/timeEntrySummation: get: tags: - TaskTimeEntry summary: Get summation of Task Time Entries description: This API fetches the sum of time entries associated with a task. operationId: getSummationOfTimeEntryForTask parameters: - $ref: '#/components/parameters/billStatus' - $ref: '#/components/parameters/taskId' - $ref: ./Common.json#/components/parameters/orgId responses: '200': $ref: '#/components/responses/getSummationOfTimeEntryForTaskResponse' security: - iam-oauth2-schema: - Desk.activities.tasks.READ - Desk.tasks.READ x-audience: - external-public /api/v1/tasks/{taskId}/timeEntry/{taskTimeEntryId}: get: tags: - TaskTimeEntry summary: Get a Task Time Entry description: This API fetches a time entry recorded for a task. operationId: getTaskTimeEntry parameters: - name: include in: query description: Secondary information related to the time entry. Value supported is @owner@. required: false style: form explode: true schema: type: - string - 'null' description: Secondary information related to the time entry. Value supported is @owner@. enum: - owner maxLength: 100 minLength: 0 - $ref: '#/components/parameters/taskTimeEntryId' - $ref: '#/components/parameters/taskId' - $ref: ./Common.json#/components/parameters/orgId responses: '200': $ref: '#/components/responses/getTimeEntryJson' security: - iam-oauth2-schema: - Desk.activities.tasks.READ - Desk.tasks.READ x-audience: - external-public patch: tags: - TaskTimeEntry operationId: updateTaskTimeEntry summary: Update a Task Time Entry description: This API updates details of an existing time entry. parameters: - $ref: '#/components/parameters/taskTimeEntryId' - $ref: '#/components/parameters/taskId' - $ref: ./Common.json#/components/parameters/orgId requestBody: $ref: '#/components/requestBodies/updateTimeEntryForTask_timeEntryJson' responses: '422': $ref: ./Common.json#/components/responses/invalidDataErrorResponse '200': $ref: '#/components/responses/getTimeEntryJson' security: - iam-oauth2-schema: - Desk.activities.tasks.UPDATE - Desk.tasks.UPDATE x-audience: - external-public components: responses: getTimeEntryJson: description: getTimeEntryJson template definitions content: application/json: schema: additionalProperties: false allOf: - $ref: ./TaskTimeEntry.json#/components/schemas/commonTimeEntryForTaskResponse - type: - 'null' - object properties: parent: type: - 'null' - object additionalProperties: false maxProperties: 5 minProperties: 5 properties: ticketNumber: type: - string - 'null' - integer format: int32 pattern: ([0-9]+) associatedTicketId: type: - string - 'null' - integer format: int64 pattern: ([0-9]+) subject: type: - string - 'null' maxLength: 100 minLength: 0 id: type: - string - 'null' - integer format: int64 pattern: ([0-9]+) type: type: - string - 'null' maxLength: 100 minLength: 0 required: - associatedTicketId - id - subject - ticketNumber - type isTrashed: type: - boolean - 'null' createdBy: type: - string - 'null' - integer format: int64 pattern: ([0-9]+) requestId: type: - string - 'null' - integer format: int64 pattern: ([0-9]+) layoutId: type: - string - 'null' - integer format: int64 pattern: ([0-9]+) taskId: type: - string - 'null' - integer format: int64 pattern: ([0-9]+) layoutDetails: type: - 'null' - object additionalProperties: false maxProperties: 2 minProperties: 2 properties: id: type: - string - 'null' - integer format: int64 pattern: ([0-9]+) layoutName: type: - string - 'null' maxLength: 120 minLength: 0 pattern: ([0-9a-zA-Z_\-\.\$@\?\,\:\'\/\!\P{InBasicLatin}\s])+ required: - id - layoutName required: - createdBy - isTrashed - layoutDetails - layoutId - parent - requestId - taskId examples: Valid responses Definitions: value: null getSummationOfTimeEntryForTaskResponse: description: getSummationOfTimeEntryForTaskResponse template definitions content: application/json: schema: type: - 'null' - object additionalProperties: false properties: totalMins: type: - string - 'null' - integer format: int32 pattern: ([0-9]+) totalHours: type: - string - 'null' - integer format: int32 pattern: ([0-9]+) totalCosts: type: - string - 'null' - integer format: int32 pattern: ([0-9]+) totalSeconds: type: - string - 'null' - integer format: int32 pattern: ([0-9]+) required: - totalCosts - totalHours - totalMins - totalSeconds examples: Valid responses Definitions: value: totalMins: 5 totalHours: 12 totalCosts: 1000 totalSeconds: 24 getTimeEntryByTaskIdResponse: description: getTimeEntryByTaskIdResponse template definitions content: application/json: schema: allOf: - type: object properties: data: type: array items: type: object properties: owner: type: - 'null' - object additionalProperties: false maxProperties: 5 minProperties: 5 properties: photoURL: type: - string - 'null' maxLength: 100 minLength: 0 pattern: ([0-9a-zA-Z_\-\.\$@\?\,\:\'\/\!\P{InBasicLatin}\s])+ firstName: type: - string - 'null' maxLength: 50 minLength: 0 lastName: type: - string - 'null' maxLength: 50 minLength: 0 name: type: - string - 'null' maxLength: 50 minLength: 0 id: type: - string - 'null' - integer format: int64 pattern: ([0-9]+) required: - firstName - id - lastName - name - photoURL - type: - 'null' - object additionalProperties: false properties: data: $ref: ./TaskTimeEntry.json#/components/schemas/data required: - data examples: Valid responses Definitions: value: data: - owner: firstName: Eswer lastName: KM photoURL: https://contacts.zoho.com/file?t=user&ID=4851669 name: Eswer KM id: '4000000008688129' secondsSpent: '21' parent: ticketNumber: '1003' associatedTicketId: '4000000030017' subject: Tasks subject id: '4000000031014' type: TASKS cf: cf_timeentryname: time1 executedTime: 1466627400000 fixedCost: null departmentId: '4000000008694' minutesSpent: '23' creatorId: '4000000008692' agentCostPerHour: '3.0' description: Time Entry description hoursSpent: '3' ownerId: '4000000008692' isBillable: true mode: MANUAL isTrashed: 'false' billingType: FIXED_COST_FOR_TICKETS createdTime: 1466061884000 invoiceId: '40000000086881212' id: '4000000033001' requestChargeType: Customer Service additionalCost: '10.0' totalCost: '20.17' - owner: firstName: Eswer lastName: KM photoURL: https://contacts.zoho.com/file?t=user&ID=4851669 name: Eswer KM id: '4000000008688129' secondsSpent: '21' parent: ticketNumber: '1003' associatedTicketId: '4000000030017' subject: Tasks subject id: '4000000031014' type: TASKS cf: cf_timeentryname: time2 executedTime: 1466796600000 fixedCost: null departmentId: '4000000008694' minutesSpent: '34' creatorId: '4000000008692' agentCostPerHour: '10.0' description: Time Entry description hoursSpent: '3' ownerId: '4000000012090' isBillable: true mode: MANUAL isTrashed: 'false' billingType: FIXED_COST_FOR_TICKETS createdTime: 1466063199000 invoiceId: '40000000086881212' id: '4000000033006' requestChargeType: Product Consultation additionalCost: '10.0' totalCost: '45.72' - owner: firstName: Eswer lastName: KM photoURL: https://contacts.zoho.com/file?t=user&ID=4851669 name: Eswer KM id: '4000000008688129' secondsSpent: '22' parent: ticketNumber: '1003' associatedTicketId: '4000000030017' subject: Tasks subject id: '4000000031014' type: TASKS cf: cf_timeentryname: time3 executedTime: 1465846200000 fixedCost: null departmentId: '4000000008694' minutesSpent: '22' creatorId: '4000000008692' agentCostPerHour: '20.0' description: Time Entry description hoursSpent: '32' ownerId: '4000000008692' isBillable: true mode: MANUAL isTrashed: 'false' billingType: FIXED_COST_FOR_TICKETS createdTime: 1466063392000 invoiceId: '40000000086881212' id: '4000000033011' requestChargeType: Customer Service additionalCost: '10.0' totalCost: '657.46' requestBodies: updateTimeEntryForTask_timeEntryJson: content: application/json: schema: type: - 'null' - object additionalProperties: false properties: secondsSpent: type: - string - 'null' - integer format: int32 description: Number of seconds in the time entry. pattern: ([0-9]+) cf: type: - 'null' - object additionalProperties: false patternProperties: ([0-9a-zA-Z_\-\.\$@\?\,\:\'\/\!\P{InBasicLatin}\s])+: type: - string - 'null' maxLength: 100 minLength: 0 pattern: ([0-9a-zA-Z_\-\.\$@\?\,\:\'\/\!\P{InBasicLatin}\s])+ executedTime: type: - string - 'null' description: Time when work related to the time entry was started. maxLength: 100 minLength: 0 pattern: (((19|20)\d\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\d]{0,3})?(Z)) customFields: type: - 'null' - object additionalProperties: false patternProperties: ([0-9a-zA-Z_\-\.\$@\?\,\:\'\/\!\P{InBasicLatin}\s])+: type: - string - 'null' maxLength: 100 minLength: 0 pattern: ([0-9a-zA-Z_\-\.\$@\?\,\:\'\/\!\P{InBasicLatin}\s])+ fixedCost: type: - string - 'null' description: Fixed cost maxLength: 100 minLength: 0 pattern: ([0-9]{1,13}(\.[0-9]*)?) minutesSpent: type: - string - 'null' - integer format: int32 description: Number of minutes in the time entry. pattern: ([0-9]+) agentCostPerHour: type: - string - 'null' description: Per hour cost of an agent. maxLength: 100 minLength: 0 pattern: ([0-9]{1,13}(\.[0-9]*)?) description: type: - string - 'null' description: Description of the time entry maxLength: 100 minLength: 0 hoursSpent: type: - string - 'null' - integer format: int32 description: Number of hours in the time entry. pattern: ([0-9]+) ownerId: type: - string - 'null' - integer format: int64 description: ID of the user associated with the time entry pattern: ([0-9]+) isBillable: type: - boolean - 'null' description: Billing Preference mode: type: - string - 'null' description: Mode configured in time tracking. Supported values are @Manual@ and @Auto@ enum: - MANUAL - AUTO maxLength: 100 minLength: 0 requestChargeType: type: - string - 'null' description: Type of request in the ticket. Values supported are Customer Service, Upgrade Request, Product Consultation, and Support and Maintenance. enum: - Customer Service - Upgrade Request - Product Consultation - Support and Maintenance maxLength: 100 minLength: 0 additionalCost: type: - string - 'null' description: Additional cost incurred maxLength: 100 minLength: 0 pattern: ([0-9]{1,13}(\.[0-9]*)?) totalCost: type: - string - 'null' description: Total cost incurred maxLength: 100 minLength: 0 pattern: ([0-9]{1,13}(\.[0-9]*)?) examples: Valid requestBody Definitions: value: null timeEntryJson: content: application/json: schema: type: - 'null' - object additionalProperties: false properties: secondsSpent: type: - string - 'null' - integer format: int32 description: Number of seconds in the time entry. pattern: ([0-9]+) cf: type: - 'null' - object additionalProperties: false patternProperties: ([0-9a-zA-Z_\-\.\$@\?\,\:\'\/\!\P{InBasicLatin}\s])+: type: - string - 'null' maxLength: 100 minLength: 0 pattern: ([0-9a-zA-Z_\-\.\$@\?\,\:\'\/\!\P{InBasicLatin}\s])+ executedTime: type: - string - 'null' description: Time when work related to the time entry was started. maxLength: 100 minLength: 0 pattern: (((19|20)\d\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\d]{0,3})?(Z)) customFields: type: - 'null' - object additionalProperties: false patternProperties: ([0-9a-zA-Z_\-\.\$@\?\,\:\'\/\!\P{InBasicLatin}\s])+: type: - string - 'null' maxLength: 100 minLength: 0 pattern: ([0-9a-zA-Z_\-\.\$@\?\,\:\'\/\!\P{InBasicLatin}\s])+ fixedCost: type: - string - 'null' description: Fixed cost maxLength: 100 minLength: 0 pattern: ([0-9]{1,13}(\.[0-9]*)?) minutesSpent: type: - string - 'null' - integer format: int32 description: Number of minutes in the time entry. pattern: ([0-9]+) agentCostPerHour: type: - string - 'null' description: Per hour cost of an agent. maxLength: 100 minLength: 0 pattern: ([0-9]{1,13}(\.[0-9]*)?) description: type: - string - 'null' description: Description of the time entry maxLength: 100 minLength: 0 hoursSpent: type: - string - 'null' - integer format: int32 description: Number of hours in the time entry. pattern: ([0-9]+) ownerId: type: - string - 'null' - integer format: int64 description: ID of the user associated with the time entry pattern: ([0-9]+) isBillable: type: - boolean - 'null' description: Billing Preference mode: type: - string - 'null' description: Mode configured in time tracking. Supported values are @Manual@ and @Auto@ enum: - MANUAL - AUTO maxLength: 100 minLength: 0 requestChargeType: type: - string - 'null' description: Type of request in the ticket. Values supported are Customer Service, Upgrade Request, Product Consultation, and Support and Maintenance. enum: - Customer Service - Upgrade Request - Product Consultation - Support and Maintenance maxLength: 100 minLength: 0 additionalCost: type: - string - 'null' description: Additional cost incurred maxLength: 100 minLength: 0 pattern: ([0-9]{1,13}(\.[0-9]*)?) totalCost: type: - string - 'null' description: Total cost incurred maxLength: 100 minLength: 0 pattern: ([0-9]{1,13}(\.[0-9]*)?) required: - executedTime examples: Valid requestBody Definitions: value: secondsSpent: '21' cf: cf_timeentryname: time2 executedTime: 1466627400000 minutesSpent: '23' agentCostPerHour: '3.0' description: Time Entry description hoursSpent: '3' ownerId: '4000000008692' requestChargeType: Customer Service additionalCost: '10.0' totalCost: '20.17' parameters: taskId: name: taskId in: path required: true style: simple explode: false schema: type: - string - 'null' - integer format: int64 pattern: ([0-9]+) taskTimeEntryId: name: taskTimeEntryId in: path required: true style: simple explode: false schema: type: - string - 'null' - integer format: int64 pattern: ([0-9]+) billStatus: name: billStatus in: query description: 'Key that filters time entries, based on their billing status: @nonBillable@ , @billable@ or @billed@' required: false style: form explode: true schema: type: - string - 'null' description: 'Key that filters time entries, based on their billing status: @nonBillable@ , @billable@ or @billed@' enum: - nonBillable - billable - billed maxLength: 100 minLength: 0 securitySchemes: iam-oauth2-schema: $ref: ./Common.json#/components/securitySchemes/iam-oauth2-schema x-entity: Helpcenter