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

# Parts booked to a work order. quantity_used is consumption net of returns.

> Quantity_outstanding is what the job is still short of; line_cost is derived from the unit cost
rather than read from the stored total, which no write path maintains.



## OpenAPI

````yaml /api-reference/openapi.json get /work_order_parts
openapi: 3.0.0
info:
  description: ''
  title: >-
    The only schema PostgREST exposes (ADR-014). Reads are security_invoker
    views; writes are SECURITY DEFINER functions. Rebuilt wholesale on every
    deploy — it holds no data.
  version: 12.2.3
servers:
  - url: https://app.assetinfinity.ai/api
security: []
tags:
  - name: Signing in
  - name: Profile
  - name: Assets
  - name: Asset lifecycle
  - name: Work lifecycle
  - name: Maintenance
  - name: Inventory
  - name: Inventory detail
  - name: Procurement
  - name: Contracts
  - name: Workforce
  - name: Capacity
  - name: Dispatch
  - name: Routing
  - name: Tools
  - name: Inspections
  - name: Verification
  - name: Reliability
  - name: Parts demand
  - name: Sensors and meters
  - name: Map
  - name: Floor plans
  - name: Labels
  - name: Lost and found
  - name: Root cause analysis
  - name: Reports
  - name: Audit center
  - name: Activity
  - name: Notifications
  - name: Channels
  - name: Search
  - name: Copilot
  - name: Import
  - name: Files
  - name: Sync
  - name: Support
  - name: Admin
  - name: Access
  - name: Lookups
  - name: Read models
  - name: Branding
  - name: Custom fields
  - name: Form studio
  - name: Workflows
  - name: Workflow studio
  - name: Rules
  - name: Statuses and transitions
  - name: Currencies and locales
  - name: Work configuration
  - name: Asset configuration
  - name: Inventory configuration
  - name: Tool configuration
  - name: Workforce configuration
  - name: Vendor and contract configuration
  - name: Document configuration
  - name: Inspection configuration
  - name: Sites, locations and the organisation
  - name: Platform
  - name: Self verification
  - name: Setup
  - name: Tools on a job, and who has them out
  - name: Vendors and contracts
  - name: Work order execution
  - name: Workforce detail
externalDocs:
  description: PostgREST Documentation
  url: https://postgrest.org/en/v12/references/api.html
paths:
  /work_order_parts:
    get:
      tags:
        - Work order execution
      summary: >-
        Parts booked to a work order. quantity_used is consumption net of
        returns.
      description: >-
        Quantity_outstanding is what the job is still short of; line_cost is
        derived from the unit cost

        rather than read from the stored total, which no write path maintains.
      parameters:
        - $ref: '#/components/parameters/rowFilter.work_order_parts.id'
        - $ref: '#/components/parameters/rowFilter.work_order_parts.work_order_id'
        - $ref: '#/components/parameters/rowFilter.work_order_parts.part_id'
        - $ref: '#/components/parameters/rowFilter.work_order_parts.part_number'
        - $ref: '#/components/parameters/rowFilter.work_order_parts.part_name'
        - $ref: '#/components/parameters/rowFilter.work_order_parts.warehouse_id'
        - $ref: '#/components/parameters/rowFilter.work_order_parts.warehouse_code'
        - $ref: >-
            #/components/parameters/rowFilter.work_order_parts.substituted_part_id
        - $ref: >-
            #/components/parameters/rowFilter.work_order_parts.substituted_part_number
        - $ref: '#/components/parameters/rowFilter.work_order_parts.quantity_required'
        - $ref: '#/components/parameters/rowFilter.work_order_parts.quantity_reserved'
        - $ref: '#/components/parameters/rowFilter.work_order_parts.quantity_issued'
        - $ref: '#/components/parameters/rowFilter.work_order_parts.quantity_consumed'
        - $ref: '#/components/parameters/rowFilter.work_order_parts.quantity_returned'
        - $ref: >-
            #/components/parameters/rowFilter.work_order_parts.quantity_shortfall
        - $ref: '#/components/parameters/rowFilter.work_order_parts.quantity_used'
        - $ref: >-
            #/components/parameters/rowFilter.work_order_parts.quantity_outstanding
        - $ref: '#/components/parameters/rowFilter.work_order_parts.unit_cost'
        - $ref: >-
            #/components/parameters/rowFilter.work_order_parts.unit_cost_currency_id
        - $ref: '#/components/parameters/rowFilter.work_order_parts.currency_code'
        - $ref: '#/components/parameters/rowFilter.work_order_parts.line_cost'
        - $ref: >-
            #/components/parameters/rowFilter.work_order_parts.is_warranty_covered
        - $ref: '#/components/parameters/rowFilter.work_order_parts.notes'
        - $ref: '#/components/parameters/rowFilter.work_order_parts.row_version'
        - $ref: '#/components/parameters/select'
        - $ref: '#/components/parameters/order'
        - $ref: '#/components/parameters/range'
        - $ref: '#/components/parameters/rangeUnit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/preferCount'
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/work_order_parts'
                type: array
            application/vnd.pgrst.object+json:
              schema:
                items:
                  $ref: '#/components/schemas/work_order_parts'
                type: array
            application/vnd.pgrst.object+json;nulls=stripped:
              schema:
                items:
                  $ref: '#/components/schemas/work_order_parts'
                type: array
            text/csv:
              schema:
                items:
                  $ref: '#/components/schemas/work_order_parts'
                type: array
          description: OK
        '206':
          description: Partial Content
components:
  parameters:
    rowFilter.work_order_parts.id:
      in: query
      name: id
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.work_order_id:
      in: query
      name: work_order_id
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.part_id:
      in: query
      name: part_id
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.part_number:
      in: query
      name: part_number
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.part_name:
      in: query
      name: part_name
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.warehouse_id:
      in: query
      name: warehouse_id
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.warehouse_code:
      in: query
      name: warehouse_code
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.substituted_part_id:
      in: query
      name: substituted_part_id
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.substituted_part_number:
      in: query
      name: substituted_part_number
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.quantity_required:
      in: query
      name: quantity_required
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.quantity_reserved:
      in: query
      name: quantity_reserved
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.quantity_issued:
      in: query
      name: quantity_issued
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.quantity_consumed:
      in: query
      name: quantity_consumed
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.quantity_returned:
      in: query
      name: quantity_returned
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.quantity_shortfall:
      in: query
      name: quantity_shortfall
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.quantity_used:
      in: query
      name: quantity_used
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.quantity_outstanding:
      in: query
      name: quantity_outstanding
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.unit_cost:
      in: query
      name: unit_cost
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.unit_cost_currency_id:
      in: query
      name: unit_cost_currency_id
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.currency_code:
      in: query
      name: currency_code
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.line_cost:
      in: query
      name: line_cost
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.is_warranty_covered:
      in: query
      name: is_warranty_covered
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.notes:
      in: query
      name: notes
      required: false
      schema:
        type: string
    rowFilter.work_order_parts.row_version:
      in: query
      name: row_version
      required: false
      schema:
        type: string
    select:
      description: Filtering Columns
      in: query
      name: select
      required: false
      schema:
        type: string
    order:
      description: Ordering
      in: query
      name: order
      required: false
      schema:
        type: string
    range:
      description: Limiting and Pagination
      in: header
      name: Range
      required: false
      schema:
        type: string
    rangeUnit:
      description: Limiting and Pagination
      in: header
      name: Range-Unit
      required: false
      schema:
        default: items
        type: string
    offset:
      description: Limiting and Pagination
      in: query
      name: offset
      required: false
      schema:
        type: string
    limit:
      description: Limiting and Pagination
      in: query
      name: limit
      required: false
      schema:
        type: string
    preferCount:
      description: Preference
      in: header
      name: Prefer
      required: false
      schema:
        enum:
          - count=none
        type: string
  schemas:
    work_order_parts:
      description: >-
        Parts booked to a work order. quantity_used is consumption net of
        returns.


        Quantity_outstanding is what the job is still short of; line_cost is
        derived from the unit cost

        rather than read from the stored total, which no write path maintains.
      properties:
        currency_code:
          format: character varying
          maxLength: 3
          type: string
        id:
          description: |-
            Note:
            This is a Primary Key.<pk/>
          format: uuid
          type: string
        is_warranty_covered:
          format: boolean
          type: boolean
        line_cost:
          format: numeric
          type: number
        notes:
          format: text
          type: string
        part_id:
          description: >-
            Note:

            This is a Foreign Key to `inventory_available.part_id`.<fk
            table='inventory_available' column='part_id'/>
          format: uuid
          type: string
        part_name:
          format: character varying
          maxLength: 250
          type: string
        part_number:
          format: character varying
          maxLength: 80
          type: string
        quantity_consumed:
          format: numeric
          type: number
        quantity_issued:
          format: numeric
          type: number
        quantity_outstanding:
          format: numeric
          type: number
        quantity_required:
          format: numeric
          type: number
        quantity_reserved:
          format: numeric
          type: number
        quantity_returned:
          format: numeric
          type: number
        quantity_shortfall:
          format: numeric
          type: number
        quantity_used:
          format: numeric
          type: number
        row_version:
          format: bigint
          type: integer
        substituted_part_id:
          description: >-
            Note:

            This is a Foreign Key to `inventory_available.part_id`.<fk
            table='inventory_available' column='part_id'/>
          format: uuid
          type: string
        substituted_part_number:
          format: character varying
          maxLength: 80
          type: string
        unit_cost:
          format: numeric
          type: number
        unit_cost_currency_id:
          format: uuid
          type: string
        warehouse_code:
          format: character varying
          maxLength: 60
          type: string
        warehouse_id:
          description: >-
            Note:

            This is a Foreign Key to `warehouse_settings.id`.<fk
            table='warehouse_settings' column='id'/>
          format: uuid
          type: string
        work_order_id:
          description: >-
            Note:

            This is a Foreign Key to
            `inspection_failures.found_in_work_order_id`.<fk
            table='inspection_failures' column='found_in_work_order_id'/>
          format: uuid
          type: string
      type: object

````

## Related topics

- [Inside a part](/inventory/part-detail.md)
- [The part catalogue](/inventory/parts.md)
- [Working a job](/field/job.md)
- [Inside a work order](/work/work-order-detail.md)
- [Purchase orders](/commercial/purchase-orders.md)
