openapi: 3.2.0 info: title: Karbonhq Timesheets and Time Entries API version: v3 contact: name: API Support url: https://developers.karbonhq.com/issues/ license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html termsOfService: https://karbonhq.com/terms-of-use/ description: 'Operations tagged Timesheets and Time Entries across 2 of this provider''s published API definitions: KarbonAPI.json, karbonhq-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.karbonhq.com description: The production API server security: - ApiKeyAuth: [] BearerAuth: [] tags: - name: Timesheets and Time Entries description: 'Retrieve individual (non-aggregated) time entries, each record represents a single time entry for a specific day, user, and work item. Read more. **Deprecated** Review Time aggregate Timesheets for colleagues. Read more' paths: /v3/Timesheets: get: deprecated: true tags: - Timesheets and Time Entries summary: Gets a list of Timesheets parameters: - in: query name: $filter schema: type: string examples: StartDate: value: StartDate gt 2024-01-01T00:00:00Z summary: Return Timesheets where the Timesheet Start Date after January 1, 2024 EndDate: value: EndDate lt 2024-03-01T00:00:00Z summary: Return Timesheets where the Timesheet End Date before March 1, 2024 UserKey: value: UserKey in ('2mYzTtly89Lq', '2Qy48WVCRBcP') summary: Return Timesheets where the UserKey is '2mYzTtly89Lq' or '2Qy48WVCRBcP' WorkItemKeys: value: 'WorkItemKeys/any(x: x eq ''5mGnTfly34Rf'')' summary: 'Return Timesheets where the Work Item key is ''5mGnTfly34Rf'' ' Status: value: Status eq 'Draft' summary: Return Timesheets where the Timesheet status is 'Draft' description: 'When this parameter is combined with the URI, this endpoint will return a subset of the Timesheets that satisfy the `$filter` expression. ' - in: query name: $orderby schema: example: StartDate desc type: string enum: - StartDate - StartDate desc - EndDate - EndDate desc default: TimesheetKey example: StartDate description: 'When this parameter is combined with the URI, this endpoint will return a list of Timesheets, sorted by the available properties. ' - $ref: '#/components/parameters/SkipRecords' - $ref: '#/components/parameters/TopRecords' - in: query name: $expand schema: type: string enum: - TimeEntries example: TimeEntries description: 'When this parameter is combined with the URI, this endpoint will also return the Time Entries associated with the Timesheets. ' description: 'Use the `GET` method on this endpoint to receive a paginated list of Timesheets from your tenant. Using the query parameters available to this endpoint, you can also filter the list of Timesheets by their StartDate, EndDate, UserKey, WorkItemKeys, and Status. **Notes** * Timesheets and Time Entries are aggregated to the time period matching your timesheet frequency (by default this is weekly, but it can be from 1-31 days long, depending on your Karbon settings). It is not possible to get a daily breakdown from this endpoint. If you need finer grained data, see here. * This endpoint returns a maximum of 100 Timesheets at once. * If the query results in more than 100 Timesheets, a link to the next set of the results will be given in the `@odata.nextLink` field of the response. * The `$filter` query parameter supports 8 logical operators, 3 functions and 6 properties to help you form an expression. They are listed below with examples of usage. ### $filter operators for DateTime properties Logical OperatorsPurposeStartDateEndDate eqFull-text search/v3/Timesheets?$filter=StartDate eq 2022-07-04T00:00:00Z/v3/Timesheets?$filter=EndDate eq 2022-07-17T00:00:00Z gtGreater than/v3/Timesheets?$filter=StartDate gt 2021-04-27T00:00:00Z/v3/Timesheets?$filter=EndDate gt 2021-06-21T00:00:00Z geGreater than and equals/v3/Timesheets?$filter=StartDate ge 2021-04-27T00:00:00Z/v3/Timesheets?$filter=EndDate ge 2021-06-21T00:00:00Z ltLesser than/v3/Timesheets?$filter=StartDate lt 2021-04-27T00:00:00Z/v3/Timesheets?$filter=EndDate lt 2021-06-21T00:00:00Z leLesser than and equals/v3/Timesheets?$filter=StartDate le 2021-04-27T00:00:00Z/v3/Timesheets?$filter=EndDate le 2021-06-21T00:00:00Z andCombines properties/v3/Timesheets?$filter=StartDate gt 2021-04-27T00:00:00Z and StartDate lt 2021-06-27T00:00:00Z/v3/Timesheets?$filter=EndDate gt 2021-04-27T00:00:00Z and EndDate lt 2021-06-21T00:00:00Z ### Functions for DateTime properties FunctionsStartDateEndDate day/v3/Timesheets?$filter=day(StartDate) eq 4/v3/Timesheets?$filter=day(EndDate) eq 17 month/v3/Timesheets?$filter=month(StartDate) eq 4/v3/Timesheets?$filter=month(EndDate) eq 8 year/v3/Timesheets?$filter=year(StartDate) eq 2021/v3/Timesheets?$filter=year(EndDate) eq 2022 ### $filter operators for the rest of the properties Logical OperatorsPurposeUserKeyWorkItemKeys Status eq Full-text search /v3/Timesheets?$filter=UserKey eq ''2mYzTtly89Lq'' /v3/Timesheets?$filter=WorkItemKeys/any(x: x eq ''5mGnTfly34Rf'') /v3/Timesheets?$filter=Status eq ''Draft'' in Combines multiple ORs /v3/Timesheets?$filter=UserKey in (''2mYzTtly89Lq'', ''2Qy48WVCRBcP'' ) /v3/Timesheets?$filter=WorkItemKeys/any(x: x in (''2m6pSFxRzcF2'', ''2y7H6dhQL7mD'')) /v3/Timesheets?$filter=Status in (''Draft'', ''Approved'')' operationId: getAllTimesheets responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/GetTimeSheets' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Unsupported Property: $ref: '#/components/examples/Unsupported_Property_Filter' Unsupported Orderby Property: $ref: '#/components/examples/Orderby_Unsupported_Property' Unsupported Logical Operator: $ref: '#/components/examples/Unsupported_Logical_Operator' $top limit exceeded: $ref: '#/components/examples/Limit_Exceeded_Top' Unsupported Option: $ref: '#/components/examples/Unsupported_option' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' servers: - url: https://api.karbonhq.com description: The production API server /v3/Timesheets/{Timesheetkey}: get: deprecated: true tags: - Timesheets and Time Entries summary: Gets a Timesheets using Timesheetkey parameters: - required: true in: path name: Timesheetkey schema: type: string example: QbQFGnqPDDs description: The Karbon-generated Timesheet key - in: query name: $expand schema: type: string enum: - TimeEntries example: TimeEntries description: 'When this parameter is combined with the URI, this endpoint will also return the Time Entries associated with the Timesheets. ' description: 'Use the `GET` method on this endpoint to receive the details of a Timesheet specified using the `Timesheetkey`. Using the query parameter available to this endpoint, you can also include the Time Entries associated with the Timesheet in the response. **Notes**: Timesheets and Time Entries are aggregated to the time period matching your timesheet frequency (by default this is weekly, but it can be from 1-31 days long, depending on your Karbon settings). It is not possible to get a daily breakdown from this endpoint. If you need finer grained data, see here.' operationId: getTimesheetByID responses: '200': description: Successful operation content: application/json: schema: allOf: - type: object properties: '@odata.context': type: string description: The information about Karbon controllers generating this response. example: https://api.karbonhq.com/v3/$metadata#Timesheets(TimeEntries())/$entity - $ref: '#/components/schemas/GetSingleTimeSheet' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Unsupported Option: $ref: '#/components/examples/Unsupported_option' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Key Not Found: $ref: '#/components/examples/Timesheet_Key_Not_Found_404' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' servers: - url: https://api.karbonhq.com description: The production API server /v3/IndividualTimeEntries: get: tags: - Timesheets and Time Entries summary: Gets a list of individual time entries parameters: - in: query name: $filter schema: type: string examples: Date: value: Date gt 2024-01-01T00:00:00Z summary: Return entries where Date is after January 1, 2024 DateRange: value: Date ge 2024-01-01T00:00:00Z and Date le 2024-03-31T00:00:00Z summary: Return entries within a date range TimesheetKey: value: TimesheetKey eq '3TxlnQ4Pd8zJ' summary: Return all entries for a specific timesheet UserKey: value: UserKey eq '2xfLMq5PFqb7' summary: Return entries for a specific user WorkItemKey: value: WorkItemKey eq '3cC1vkWmhGb1' summary: Return entries for a specific work item description: 'When this parameter is combined with the URI, this endpoint will return a subset of the individual time entries that satisfy the `$filter` expression. ' - in: query name: $orderby schema: type: string enum: - Date - Date desc default: Date example: Date desc description: 'Sort the results by Date. ' - $ref: '#/components/parameters/SkipRecordsUnbounded' - $ref: '#/components/parameters/TopRecordsLimitedTo1000' - in: query name: $count schema: type: boolean example: true description: 'Default is `false` (`false` is recommended). When set to `true`, the response will include the total count of matching entries in `@odata.count`. ' description: 'Use the `GET` method on this endpoint to receive a paginated list of individual (non-aggregated) time entries from your tenant. Using the query parameters available to this endpoint, you can also filter the list of individual time entries by their Date, TimesheetKey, EntityKey, WorkItemKey, ClientKey, UserKey, RoleName, and TaskTypeName. Unlike the Timesheets endpoint, each record represents a single time entry for a specific day, user, and work item / contact — not aggregated in any way. **Notes** * This endpoint returns a maximum of 1000 entries at once. * The `$filter` query parameter supports 6 logical operators, 3 functions and 8 properties to help you form an expression. They are listed below with examples of usage. ### $filter operators for DateTime properties Logical OperatorsPurposeDate eqFull-text search/v3/IndividualTimeEntries?$filter=Date eq 2024-07-04T00:00:00Z gtGreater than/v3/IndividualTimeEntries?$filter=Date gt 2024-01-01T00:00:00Z geGreater than and equals/v3/IndividualTimeEntries?$filter=Date ge 2024-01-01T00:00:00Z ltLesser than/v3/IndividualTimeEntries?$filter=Date lt 2024-03-31T00:00:00Z leLesser than and equals/v3/IndividualTimeEntries?$filter=Date le 2024-03-31T00:00:00Z andCombines properties/v3/IndividualTimeEntries?$filter=Date ge 2024-01-01T00:00:00Z and Date lt 2024-04-01T00:00:00Z ### Functions for DateTime properties FunctionsDate day/v3/IndividualTimeEntries?$filter=day(Date) eq 4 month/v3/IndividualTimeEntries?$filter=month(Date) eq 7 year/v3/IndividualTimeEntries?$filter=year(Date) eq 2024 ### $filter operators for the rest of the properties All of the following properties support `eq` (and `and` to combine conditions). PropertyExample TimesheetKey/v3/IndividualTimeEntries?$filter=TimesheetKey eq ''3TxlnQ4Pd8zJ'' EntityKey/v3/IndividualTimeEntries?$filter=EntityKey eq ''3cC1vkWmhGb1'' WorkItemKey/v3/IndividualTimeEntries?$filter=WorkItemKey eq ''3cC1vkWmhGb1'' ClientKey/v3/IndividualTimeEntries?$filter=ClientKey eq ''ZGNmtYyLm4z'' UserKey/v3/IndividualTimeEntries?$filter=UserKey eq ''2xfLMq5PFqb7'' RoleName/v3/IndividualTimeEntries?$filter=RoleName eq ''Director'' TaskTypeName/v3/IndividualTimeEntries?$filter=TaskTypeName eq ''Tax Return''' operationId: getAllIndividualTimeEntries responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/GetIndividualTimeEntries' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Unsupported Property: $ref: '#/components/examples/Unsupported_Property_Filter' Unsupported Logical Operator: $ref: '#/components/examples/Unsupported_Logical_Operator' $top limit exceeded: $ref: '#/components/examples/Limit_Exceeded_Top' Unsupported Option: $ref: '#/components/examples/Unsupported_option' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' servers: - url: https://api.karbonhq.com description: The production API server /v3/IndividualTimeEntries/{IndividualTimeEntryKey}: get: tags: - Timesheets and Time Entries summary: Gets an individual time entry by key parameters: - required: true in: path name: IndividualTimeEntryKey schema: type: string maxLength: 32 example: a1b2c3d4e5f67890abcdef1234567890 description: The Karbon-generated GUID key for the individual time entry (32-character hex string, no hyphens) description: Use the `GET` method on this endpoint to receive the details of a single individual time entry specified using the `IndividualTimeEntryKey`. operationId: GetIndividualTimeEntryByKey responses: '200': description: Successful operation content: application/json: schema: allOf: - type: object properties: '@odata.context': type: string description: The information about Karbon controllers generating this response. example: https://api.karbonhq.com/v3/$metadata#IndividualTimeEntries/$entity - $ref: '#/components/schemas/GetIndividualTimeEntry' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Invalid Key: $ref: '#/components/examples/IndividualTimeEntry_Invalid_Key_400' Unsupported Option: $ref: '#/components/examples/Unsupported_option' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Key Not Found: $ref: '#/components/examples/IndividualTimeEntry_Key_Not_Found_404' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' servers: - url: https://api.karbonhq.com description: The production API server components: examples: Unsupported_option: description: The error returned when the query option in a request is not allowed for by the API value: error: code: '4002' message: Query option '