Sage HR Timesheets API

The Timesheets API from Sage HR — 1 operation(s) for timesheets.

OpenAPI Specification

sage-hr-timesheets-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: All requests are required to be sent to your subdomain. To learn how to enable API in your Sage HR account, please visit https://support.sage.hr/en/articles/3246469-how-does-cakehr-api-work
  title: Sage HR Documents Timesheets API
  version: '1.0'
  x-konfig-ignore:
    potential-incorrect-type: true
  x-konfig-uses-multipart-form-data: true
servers:
- url: https://subdomain.sage.hr/api
tags:
- name: Timesheets
paths:
  /timesheets/clock-in:
    summary: Time clocking
    post:
      description: Employees will be only clocked in & out if API time clocking is enabled for Timesheet group
      operationId: Timesheets_clockInOut
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TimesheetsClockInOutRequest'
        description: Times on specific dates for specific employees as json
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                    - error 1
                    - error 2
              schema:
                $ref: '#/components/schemas/TimesheetsClockInOutResponse'
          description: Successful Response
      security:
      - api_key: []
      summary: Clock in & out employees on specific days
      tags:
      - Timesheets
      x-konfig-operation-can-have-single-parameter: true
      x-konfig-single-parameter-schema: konfig-generated-schema-single-parameter-schema-post--timesheets-clock-in
      x-content-type: application/json
      x-accepts: application/json
components:
  schemas:
    TimesheetsClockInOutRequest:
      example:
        clocked_time:
          YYYY/MM/DD:
            employee_id:
            - clock_in: clock_in
              clock_out: clock_out
            - clock_in: clock_in
              clock_out: clock_out
        override: override
      properties:
        override:
          description: '''true'' if override provided days clocked entries'
          type: string
        clocked_time:
          $ref: '#/components/schemas/TimesheetsClockInOutRequest_clocked_time'
      type: object
    TimesheetsClockInOutRequest_clocked_time_YYYY_MM_DD:
      example:
        employee_id:
        - clock_in: clock_in
          clock_out: clock_out
        - clock_in: clock_in
          clock_out: clock_out
      properties:
        employee_id:
          items:
            $ref: '#/components/schemas/TimesheetsClockInOutRequest_clocked_time_YYYY_MM_DD_employee_id_inner'
          type: array
      type: object
    TimesheetsClockInOutRequest_clocked_time_YYYY_MM_DD_employee_id_inner:
      example:
        clock_in: clock_in
        clock_out: clock_out
      properties:
        clock_in:
          description: YYYY/MM/DD HH:MM
          type: string
        clock_out:
          description: YYYY/MM/DD HH:MM
          type: string
      type: object
    TimesheetsClockInOutRequest_clocked_time:
      example:
        YYYY/MM/DD:
          employee_id:
          - clock_in: clock_in
            clock_out: clock_out
          - clock_in: clock_in
            clock_out: clock_out
      properties:
        YYYY/MM/DD:
          $ref: '#/components/schemas/TimesheetsClockInOutRequest_clocked_time_YYYY_MM_DD'
      type: object
    TimesheetsClockInOutResponse:
      example:
        errors:
        - error 1
        - error 2
      properties:
        errors:
          items:
            example: error 1
            type: string
            x-konfig-original-example: error 1
            x-konfig-generated-schema: konfig-generated-schema-components-schemas-TimesheetsClockInOutResponse-properties-errors-items
          type: array
      type: object
      x-konfig-original-example:
        errors:
        - error 1
        - error 2
      x-konfig-generated-schema: konfig-generated-schema-components-schemas-TimesheetsClockInOutResponse
      x-konfig-is-used-in-successful-response: true
  securitySchemes:
    api_key:
      description: All request are required to pass a `X-Auth-Token` header.
      in: header
      name: X-Auth-Token
      type: apiKey
      x-konfig-globally-required-security: false