> ## 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.

# Decline an overtime entry

> Declines 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 decline for any approver). Whether one decline closes the entry depends on the member's approval process. Where it does not, the entry stays pending until the last step is decided, so read the entry before retrying after a lost response.



## OpenAPI

````yaml https://api.absentify.com/api/v1/openapi.json post /overtime-entries/{id}/decline
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}/decline:
    post:
      tags:
        - Overtime
      summary: Decline an overtime entry
      description: >-
        Declines 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 decline for any approver). Whether one
        decline closes the entry depends on the member's approval process. Where
        it does not, the entry stays pending until the last step is decided, so
        read the entry before retrying after a lost response.
      operationId: overtime-declineOvertimeEntry
      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: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  minLength: 1
                  maxLength: 2500
                  description: Why the entry is declined. The member sees it.
              required:
                - reason
      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.