> ## Documentation Index
> Fetch the complete documentation index at: https://absentify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Approve an overtime entry

> Approves one approval step of a pending entry on behalf of the API key's member: their own step first if they are an approver, otherwise the next pending one (an admin key can approve for any approver). In chains that need more than one approval the entry stays pending until the last step is approved and is credited then, so call it once per step and read the entry before retrying after a lost response. Send a lower `recognized_amount` to approve less than was logged; a `reason` is then required.



## OpenAPI

````yaml https://api.absentify.com/api/v1/openapi.json post /overtime-entries/{id}/approve
openapi: 3.1.0
info:
  title: absentify CRUD API
  description: OpenAPI compliant REST API
  version: 1.0.0
servers:
  - url: https://api.absentify.com/api/v1
security: []
tags:
  - name: Departments
  - name: Leave types
  - name: Members
  - name: Requests
  - name: Public holidays
  - name: Workspace
  - name: Absences
  - name: Allowance Management
  - name: Overtime
  - name: Out of office
  - name: Exports
externalDocs:
  url: https://absentify.com/docs/en/api-reference
paths:
  /overtime-entries/{id}/approve:
    post:
      tags:
        - Overtime
      summary: Approve an overtime entry
      description: >-
        Approves one approval step of a pending entry on behalf of the API key's
        member: their own step first if they are an approver, otherwise the next
        pending one (an admin key can approve for any approver). In chains that
        need more than one approval the entry stays pending until the last step
        is approved and is credited then, so call it once per step and read the
        entry before retrying after a lost response. Send a lower
        `recognized_amount` to approve less than was logged; a `reason` is then
        required.
      operationId: overtime-approveOvertimeEntry
      parameters:
        - in: path
          name: id
          schema:
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
            description: The id of the overtime entry.
          required: true
          description: The id of the overtime entry.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                recognized_amount:
                  description: >-
                    Approve less than was logged. Never more than the current
                    recognized amount. Days (0.5 or 1) when `allowance_unit` is
                    `days`, whole MINUTES when it is `hours` (for example 90 = 1
                    hour 30 minutes).
                  type: number
                reason:
                  description: Required when `recognized_amount` is lower.
                  type: string
                  maxLength: 2500
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  member:
                    type: object
                    properties:
                      id:
                        type: string
                      custom_id:
                        anyOf:
                          - type: string
                          - type: 'null'
                      name:
                        anyOf:
                          - type: string
                          - type: 'null'
                      email:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - id
                      - custom_id
                      - name
                      - email
                    additionalProperties: false
                    description: The member the overtime was worked by.
                  allowance_type_id:
                    type: string
                  allowance_unit:
                    type: string
                    enum:
                      - days
                      - hours
                    description: >-
                      The unit of the allowance type. Amounts are in days for
                      `days` and in MINUTES for `hours`.
                  date:
                    type: string
                    description: The day the overtime was worked, `YYYY-MM-DD`.
                  amount:
                    type: number
                    description: >-
                      The amount that was logged. Days (0.5 or 1) when
                      `allowance_unit` is `days`, whole MINUTES when it is
                      `hours` (for example 90 = 1 hour 30 minutes).
                  recognized_amount:
                    type: number
                    description: >-
                      The amount an approver recognized, never more than
                      `amount`. Equal to `amount` until someone lowers it. Days
                      (0.5 or 1) when `allowance_unit` is `days`, whole MINUTES
                      when it is `hours` (for example 90 = 1 hour 30 minutes).
                  day_kind:
                    type: string
                    enum:
                      - WORKDAY
                      - DAY_OFF
                      - PUBLIC_HOLIDAY
                    description: What kind of day it was when the entry was logged.
                  factor:
                    type: number
                    description: >-
                      The multiplier applied to the recognized amount, fixed
                      when the entry was logged.
                  credit_expiry_date:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      The LAST day (inclusive, `YYYY-MM-DD`) the credit can
                      still be used, or null when it does not expire.
                  comment:
                    anyOf:
                      - type: string
                      - type: 'null'
                  status:
                    type: string
                    enum:
                      - PENDING
                      - APPROVED
                      - DECLINED
                      - CANCELED
                  decided_by:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                          custom_id:
                            anyOf:
                              - type: string
                              - type: 'null'
                          name:
                            anyOf:
                              - type: string
                              - type: 'null'
                          email:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - id
                          - custom_id
                          - name
                          - email
                        additionalProperties: false
                      - type: 'null'
                    description: Who made the final decision. Null while the entry is open.
                  decided_at:
                    anyOf:
                      - type: string
                      - type: 'null'
                  created_by:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                          custom_id:
                            anyOf:
                              - type: string
                              - type: 'null'
                          name:
                            anyOf:
                              - type: string
                              - type: 'null'
                          email:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - id
                          - custom_id
                          - name
                          - email
                        additionalProperties: false
                      - type: 'null'
                    description: >-
                      Who logged the entry. It differs from `member` when an
                      admin logged it for someone else. Null for entries from
                      before this was recorded and once that member has been
                      deleted.
                  created_at:
                    type: string
                  canceled_at:
                    anyOf:
                      - type: string
                      - type: 'null'
                  canceled_by:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                          custom_id:
                            anyOf:
                              - type: string
                              - type: 'null'
                          name:
                            anyOf:
                              - type: string
                              - type: 'null'
                          email:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - id
                          - custom_id
                          - name
                          - email
                        additionalProperties: false
                      - type: 'null'
                    description: >-
                      Who withdrew the entry. It differs from `member` when the
                      member who logged it for them withdrew it. Null unless the
                      status is CANCELED.
                  decline_reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      The reason given when the entry was declined, also when an
                      admin declined for the approver.
                  credited_amount:
                    anyOf:
                      - type: number
                      - type: 'null'
                    description: >-
                      What was credited to the allowance: the recognized amount
                      times `factor`, as booked. Null while there is no credit.
                      Days (rounded to two decimals, for example 0.75 or 1.5)
                      when `allowance_unit` is `days`, whole MINUTES when it is
                      `hours`.
                  credit_removed:
                    type: boolean
                    description: >-
                      True when the entry is approved but its credit was deleted
                      from the allowance afterwards.
                required:
                  - id
                  - member
                  - allowance_type_id
                  - allowance_unit
                  - date
                  - amount
                  - recognized_amount
                  - day_kind
                  - factor
                  - credit_expiry_date
                  - comment
                  - status
                  - decided_by
                  - decided_at
                  - created_by
                  - created_at
                  - canceled_at
                  - canceled_by
                  - decline_reason
                  - credited_amount
                  - credit_removed
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      security:
        - ApiKey: []
components:
  schemas:
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Authorization not provided
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
    error.FORBIDDEN:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Insufficient access
        code:
          type: string
          description: The error code
          example: FORBIDDEN
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
  securitySchemes:
    ApiKey:
      type: apiKey
      name: X-API-KEY
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.