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

# Create Worker Order

> Creates an order for a specific worker. The `id` in the request body refers to the orderable item ID from configuration, and `p_id` is the worker's personnel ID.

<Tip>
  The `id` in the request body refers to an orderable item configured under `time_tracking.personnel_orderables` in [GET /config](/api-reference/v01.12.00/configuration/get-configuration).
</Tip>


## OpenAPI

````yaml api-reference/v01.12.00/openapi-v01.12.00.json POST /workers/{id}/orders
openapi: 3.0.0
info:
  title: Roosted
  version: 0.1.12
  contact:
    name: Support
    url: https://support.roostedhr.com/support/home
    email: support@roostedhr.com
  description: |-
    Enterprise API

    Sandbox keys and Production keys are requested from support
servers:
  - url: https://api.roostedhr.com/api/1_12
  - url: https://sandbox.roostedhr.com/api/1_12
security:
  - X-API-KEY: []
tags:
  - name: Announcements
  - name: Areas
  - name: Clients
  - name: Company
  - name: Configuration
  - name: Events
  - name: Locations
  - name: Payroll Groups
  - name: Rate Cards
  - name: Shifts
  - name: Skillsets
  - name: Time Tracking
  - name: Wage Rules
  - name: Workers
paths:
  /workers/{id}/orders:
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        description: Worker ID
    post:
      tags:
        - Workers
      summary: Create Worker Order
      description: >-
        Creates an order for a specific worker. The `id` in the request body
        refers to the orderable item ID from configuration, and `p_id` is the
        worker's personnel ID.
      operationId: post-worker-order
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - id
                - p_id
              properties:
                id:
                  type: string
                  description: >-
                    Orderable item ID from [GET
                    /config](/api-reference/v01.12.00/configuration/get-configuration)
                    (`time_tracking.personnel_orderables`).
                p_id:
                  type: string
                  description: Worker's personnel ID.
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkerOrder'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: WRK-1300
                  error:
                    type: string
                    example: Invalid orderable item ID.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ATH-100
                  error:
                    type: string
                    example: Invalid or missing API key.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: WRK-800
                  error:
                    type: string
                    example: Insufficient permissions to manage workers.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: WRK-300
                  error:
                    type: string
                    example: Worker not found.
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: WRK-1400
                  error:
                    type: string
                    example: An unexpected error occurred while creating the order.
components:
  schemas:
    WorkerOrder:
      type: object
      description: A worker order for an orderable item (e.g., uniforms, equipment).
      properties:
        id:
          type: string
          description: Order identifier.
        personnel_id:
          type: string
          description: Worker's personnel identifier.
        company_id:
          type: string
          description: Company identifier.
        ordering_personnel_id:
          type: string
          description: Personnel ID of the user who placed the order.
        companies_personnel_orderables_id:
          type: string
          description: Orderable item ID from configuration.
        name:
          type: string
          description: Name of the ordered item.
        cost:
          type: string
          description: Cost of the order (e.g. "27.00").
        date:
          type: string
          description: Raw order timestamp (YYYY-MM-DD HH:mm:ss).
        formatted_date:
          type: string
          description: Human-readable order date (e.g. "Mar 19, 2026").
        status:
          type: string
          enum:
            - '0'
            - '1'
            - '2'
          description: 'Order status: `"0"` = pending, `"1"` = approved, `"2"` = completed.'
        response_message:
          type: string
          nullable: true
          description: Response message from the approver, if any.
        submitter:
          type: string
          description: Name of the person who submitted the order.
        reach_out_email:
          type: string
          description: Email address associated with the order.
        deduction_types_id:
          type: string
          description: Deduction type identifier for payroll.
        status_datetime:
          type: string
          description: Timestamp of the last status change (YYYY-MM-DD HH:mm:ss).
  securitySchemes:
    X-API-KEY:
      name: X-API-KEY
      type: apiKey
      in: header

````