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

# Create Reserve

> Lock or release business reserves (e.g. security deposits)



## OpenAPI

````yaml /openapi/workforce-management.yaml post /v1/businesses/{businessId}/reserves
openapi: 3.0.0
info:
  description: APIs for interacting with Cadana Payroll Platform
  version: 1.0.0
  title: Business Workforce Management
  termsOfService: https://cadanapay.com/terms-and-conditions
  contact:
    email: api@cadanapay.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.cadanapay.com
    description: Prod Server
  - url: https://dev-api.cadanapay.com
    description: Dev Server
security:
  - Authorization: []
tags:
  - name: Custom Auth
    description: APIs for interacting with Custom Authentication
  - name: Persons
    description: APIs for interacting with the HR module
  - name: Milestones
    description: APIs for milestone-based contractor pay
  - name: Instant Pay
    description: APIs for interacting with Instant Pay functionality
  - name: Users
    description: APIs for interacting with employee/contractor Cadana accounts
  - name: Files
    description: APIs for interacting with file uploads
  - name: Payrolls
    description: APIs for interacting with Payroll
  - name: Platform
    description: Platform APIs for interacting with businesses
  - name: Businesses
    description: APIs for interacting with Business
  - name: Contracts
    description: APIs for interacting with contracts
  - name: Sandbox
    description: APIs for relevant sandbox simulations
  - name: Invoices
    description: APIs for interacting with invoices
  - name: Reimbursements
    description: APIs for interacting with reimbursements
  - name: Entities
    description: >-
      APIs for managing legal sub-entities (subsidiaries, branches) under a
      parent business
paths:
  /v1/businesses/{businessId}/reserves:
    post:
      tags:
        - Businesses
      summary: Create Reserve
      description: Lock or release business reserves (e.g. security deposits)
      operationId: createReserve
      parameters:
        - $ref: '#/components/parameters/businessId'
        - $ref: '#/components/parameters/XMultiTenantKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReserveRequest'
      responses:
        '200':
          $ref: '#/components/responses/ReserveResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        5XX:
          $ref: '#/components/responses/InternalError'
      security:
        - Authorization: []
components:
  parameters:
    businessId:
      name: businessId
      in: path
      description: The unique identifier for the business
      required: true
      schema:
        type: string
    XMultiTenantKey:
      name: X-MultiTenantKey
      in: header
      required: false
      schema:
        type: string
      description: >-
        Required when using a Platform API token. The tenant key identifying
        which business to operate on.
  schemas:
    ReserveRequest:
      type: object
      required:
        - action
        - type
        - personId
        - amount
        - idempotencyKey
        - description
      properties:
        action:
          type: string
          enum:
            - LOCK
            - RELEASE
          description: The reserve action to perform
          example: LOCK
        type:
          type: string
          enum:
            - SECURITY_DEPOSIT
            - SEVERANCE
            - NOTICE_PERIOD
          description: The type of reserve
          example: SECURITY_DEPOSIT
        personId:
          type: string
          format: uuid
          description: The person this reserve is for
          example: 550e8400-e29b-41d4-a716-446655440000
        amount:
          $ref: '#/components/schemas/Amount'
        idempotencyKey:
          type: string
          format: uuid
          description: Idempotency key for the request
          example: 550e8400-e29b-41d4-a716-446655440002
        description:
          type: string
          description: Description of the reserve action
          example: Security deposit for new employee
    Amount:
      type: object
      required:
        - value
        - currency
      properties:
        value:
          type: string
          description: The value of the amount
          example: '10.00'
        currency:
          type: string
          description: The currency of the asset
          example: USD
    BadRequestError:
      description: Bad input provided by client
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            params:
              description: A map for meta data around the error that occurred
              type: object
      example:
        code: invalid_request_body
        message: The request body provided is not valid
        params:
          field: Value is invalid.
    NotFoundError:
      description: Not Found
      allOf:
        - $ref: '#/components/schemas/Error'
      example:
        code: resource_not_found
        message: Requested resource could not be found.
    InternalError:
      description: Internal server error
      allOf:
        - $ref: '#/components/schemas/Error'
      example:
        code: internal_error
        message: An unexpected error occurred. Please try again later.
    Error:
      type: object
      properties:
        code:
          description: A machine parsable error code
          type: string
          enum:
            - invalid_request_body
            - resource_not_found
            - forbidden
            - internal_error
        message:
          description: A human readable message describing the error
          type: string
  responses:
    ReserveResponse:
      description: reserve action response
      content:
        application/json:
          schema:
            type: object
            properties:
              disbursementId:
                type: string
                format: uuid
                description: The ID of the created disbursement
                example: 550e8400-e29b-41d4-a716-446655440001
    BadRequestError:
      description: Bad input provided by client
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestError'
    NotFoundError:
      description: Requested resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFoundError'
    InternalError:
      description: Internal error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalError'
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      bearerFormat: API_SECRET_KEY

````