work_order

Fetch work order records matching the supplied arguments.

Arguments

ArgumentTypeRequiredDefaultDescription
idInt!Yes

Filter by ID; pass the public API ID unless the field name says legacy ID. Required.

analyzeBooleanNo

If true, the query will only be analyzed (cost estimated) without executing it.

Return Type

WorkOrderQueryResult

Query

query work_order(
  $id: Int!,
  $analyze: Boolean
) {
  work_order(
    id: $id,
    analyze: $analyze
  ) {
    request_id
    complexity
    data {
      ...WorkOrderIdentifiableTypeFragment
    }
  }
}

Variables

{
  "id": 1234,
  "analyze": true
}

Response

{
  "data": {
    "work_order": {
      "request_id": "UmVjb3JkOjEyMzQ=",
      "complexity": 100,
      "data": {id: "T3JkZXI6MTIzNA==", order_number: "SO-100045"}
    }
  }
}