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

# Reject a submitted timesheet



## OpenAPI

````yaml /api-reference/openapi.json post /timesheets/{id}/reject
openapi: 3.1.0
info:
  title: Shor Public API
  version: 1.0.0
servers:
  - url: /v1
security: []
paths:
  /timesheets/{id}/reject:
    post:
      summary: Reject a submitted timesheet
      operationId: rejectTimesheet
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            $schema: https://json-schema.org/draft/2020-12/schema
            type: string
            minLength: 16
            maxLength: 128
            pattern: ^[A-Za-z0-9_-]+$
          description: >-
            Unique intent ID. Preserve across retries; use a new value for an
            intentional new operation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                expectedVersion:
                  type: string
                  minLength: 1
                  maxLength: 128
                reason:
                  type: string
                  minLength: 1
                  maxLength: 2000
              required:
                - expectedVersion
                - reason
              additionalProperties: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  contractId:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  status:
                    type: string
                    enum:
                      - submitted
                      - approved
                      - rejected
                  periodStart:
                    type: string
                    format: date
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                  periodEnd:
                    type: string
                    format: date
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                  unitsWorked:
                    type: string
                  rate:
                    type: object
                    properties:
                      amount:
                        type: string
                        maxLength: 40
                        pattern: ^-?(0|[1-9]\d*)(\.\d+)?$
                      currency:
                        type: string
                        pattern: ^[A-Z]{3,4}$
                    required:
                      - amount
                      - currency
                    additionalProperties: false
                  total:
                    type: object
                    properties:
                      amount:
                        type: string
                        maxLength: 40
                        pattern: ^-?(0|[1-9]\d*)(\.\d+)?$
                      currency:
                        type: string
                        pattern: ^[A-Z]{3,4}$
                    required:
                      - amount
                      - currency
                    additionalProperties: false
                  paymentScheduledDate:
                    type: string
                    format: date
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                  autoPayEnabled:
                    type: boolean
                  paymentId:
                    anyOf:
                      - type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      - type: 'null'
                  createdAt:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  updatedAt:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  version:
                    type: string
                    minLength: 1
                    maxLength: 128
                required:
                  - id
                  - contractId
                  - status
                  - periodStart
                  - periodEnd
                  - unitsWorked
                  - rate
                  - total
                  - paymentScheduledDate
                  - autoPayEnabled
                  - paymentId
                  - createdAt
                  - updatedAt
                  - version
                additionalProperties: false
        '400':
          description: Error
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - authentication_error
                          - permission_error
                          - validation_error
                          - not_found
                          - conflict
                          - rate_limit_error
                          - api_error
                      code:
                        type: string
                      message:
                        type: string
                      status:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      requestId:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            code:
                              type: string
                          required:
                            - path
                            - code
                          additionalProperties: false
                    required:
                      - type
                      - code
                      - message
                      - status
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '401':
          description: Error
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - authentication_error
                          - permission_error
                          - validation_error
                          - not_found
                          - conflict
                          - rate_limit_error
                          - api_error
                      code:
                        type: string
                      message:
                        type: string
                      status:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      requestId:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            code:
                              type: string
                          required:
                            - path
                            - code
                          additionalProperties: false
                    required:
                      - type
                      - code
                      - message
                      - status
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '403':
          description: Error
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - authentication_error
                          - permission_error
                          - validation_error
                          - not_found
                          - conflict
                          - rate_limit_error
                          - api_error
                      code:
                        type: string
                      message:
                        type: string
                      status:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      requestId:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            code:
                              type: string
                          required:
                            - path
                            - code
                          additionalProperties: false
                    required:
                      - type
                      - code
                      - message
                      - status
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '404':
          description: Error
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - authentication_error
                          - permission_error
                          - validation_error
                          - not_found
                          - conflict
                          - rate_limit_error
                          - api_error
                      code:
                        type: string
                      message:
                        type: string
                      status:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      requestId:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            code:
                              type: string
                          required:
                            - path
                            - code
                          additionalProperties: false
                    required:
                      - type
                      - code
                      - message
                      - status
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '409':
          description: Error
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - authentication_error
                          - permission_error
                          - validation_error
                          - not_found
                          - conflict
                          - rate_limit_error
                          - api_error
                      code:
                        type: string
                      message:
                        type: string
                      status:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      requestId:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            code:
                              type: string
                          required:
                            - path
                            - code
                          additionalProperties: false
                    required:
                      - type
                      - code
                      - message
                      - status
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '413':
          description: Error
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - authentication_error
                          - permission_error
                          - validation_error
                          - not_found
                          - conflict
                          - rate_limit_error
                          - api_error
                      code:
                        type: string
                      message:
                        type: string
                      status:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      requestId:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            code:
                              type: string
                          required:
                            - path
                            - code
                          additionalProperties: false
                    required:
                      - type
                      - code
                      - message
                      - status
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '422':
          description: Error
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - authentication_error
                          - permission_error
                          - validation_error
                          - not_found
                          - conflict
                          - rate_limit_error
                          - api_error
                      code:
                        type: string
                      message:
                        type: string
                      status:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      requestId:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            code:
                              type: string
                          required:
                            - path
                            - code
                          additionalProperties: false
                    required:
                      - type
                      - code
                      - message
                      - status
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '429':
          description: Error
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - authentication_error
                          - permission_error
                          - validation_error
                          - not_found
                          - conflict
                          - rate_limit_error
                          - api_error
                      code:
                        type: string
                      message:
                        type: string
                      status:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      requestId:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            code:
                              type: string
                          required:
                            - path
                            - code
                          additionalProperties: false
                    required:
                      - type
                      - code
                      - message
                      - status
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '500':
          description: Error
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - authentication_error
                          - permission_error
                          - validation_error
                          - not_found
                          - conflict
                          - rate_limit_error
                          - api_error
                      code:
                        type: string
                      message:
                        type: string
                      status:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      requestId:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            code:
                              type: string
                          required:
                            - path
                            - code
                          additionalProperties: false
                    required:
                      - type
                      - code
                      - message
                      - status
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '503':
          description: Error
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - authentication_error
                          - permission_error
                          - validation_error
                          - not_found
                          - conflict
                          - rate_limit_error
                          - api_error
                      code:
                        type: string
                      message:
                        type: string
                      status:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      requestId:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            code:
                              type: string
                          required:
                            - path
                            - code
                          additionalProperties: false
                    required:
                      - type
                      - code
                      - message
                      - status
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````