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

# Get work orders

> Get work orders



## OpenAPI

````yaml https://spec.speakeasy.com/idalia-r5y/idalia/api-documentation-with-code-samples get /work-orders
openapi: 3.0.0
info:
  title: API Documentation
  version: 1.0.0
  description: This is the OpenAPI specification for your project.
servers:
  - url: https://idalia.app/api
    description: Idalia API server
security: []
paths:
  /work-orders:
    get:
      tags:
        - Work-orders
      summary: Get work orders
      description: Get work orders
      operationId: getWorkOrders
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkOrdersQueryResponse'
        '400':
          $ref: '#/components/responses/400'
        '500':
          $ref: '#/components/responses/500'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Idalia } from "idalia";

            const idalia = new Idalia({
              apiKeyAuth: process.env["IDALIA_API_KEY_AUTH"] ?? "",
            });

            async function run() {
              const result = await idalia.workOrders.get();

              console.log(result);
            }

            run();
components:
  schemas:
    WorkOrdersQueryResponse:
      type: array
      items:
        $ref: '#/components/schemas/WorkOrderResponse'
    WorkOrderResponse:
      type: object
      properties:
        id:
          type: string
          description: The ID
        createdAt:
          type: string
          description: Datetime when the work order was created
        updatedAt:
          type: string
          nullable: true
          description: Datetime the work order was last updated
        workspaceId:
          type: string
          description: ID of the workspace the work order belongs to
        name:
          type: string
          description: Work order name
        typeId:
          type: string
          description: ID of the work order type
        reference:
          type: string
          nullable: true
          description: Reference code of the work order
        projectId:
          type: string
          nullable: true
          description: ID of the project
        statusId:
          type: string
          nullable: true
          description: ID of the work order status
        locationId:
          type: string
          nullable: true
          description: ID of the work order location
        startDate:
          type: string
          nullable: true
          description: Datetime the work order starts
        endDate:
          type: string
          nullable: true
          description: Datetime the work order ends
        notes:
          type: string
          nullable: true
          description: Notes
        createdBy:
          type: string
          nullable: true
          description: ID of the user who created the work order
        updatedBy:
          type: string
          nullable: true
          description: ID of the user who last updated the work order
        externalIds:
          type: object
          additionalProperties:
            type: string
          nullable: true
      required:
        - id
        - createdAt
        - workspaceId
        - name
        - typeId
  responses:
    '400':
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Invalid request parameters
              code:
                type: string
                example: '400'
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: An unexpected error occurred
              code:
                type: string
                example: '500'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````