latestOpenAPI 3.0.02026-08-2217901.1 MB

ef9153fcac7c

Work Orders

List sub work orders

get/workorders/{id}/subworkorders

Query parameters

cursorstring

Last pagination reference

limitinteger

max number of Subworkorders returned

expandstring[]

To expand multiple fields: expand=assignees&expand=asset

Response

Successfully fetched Subworkorders list

nextCursorstring nullable required

The cursor to retrieve the next page of Subworkorders.

nextPageUrlstring nullable required

Path with query parameters that can be used to retrieve the next page of Subworkorders.

Example response

{
  "subworkorders": [
    {
      "assetId": 42,
      "completedAt": "2022-01-01T00:00:00.000Z",
      "createdAt": "2022-01-01T00:00:00.000Z",
      "deletedAt": "2022-01-01T00:00:00.000Z",
      "description": "A work order sample description",
      "dueDate": "2022-01-01T00:00:00.000Z",
      "lastMessageSentAt": "2022-01-01T00:00:00.000Z",
      "locationId": 611,
      "priority": "MEDIUM",
      "startDate": "2022-01-01T00:00:00.000Z",
      "updatedAt": "2022-01-01T00:00:00.000Z",
      "assignees": [
        {
          "type": "USER"
        }
      ],
      "asset": {
        "id": 963,
        "name": "Forklift",
        "description": "Forklift that is used to to move heavy equipments around the warehouse",
        "parentId": 852,
        "criticalityId": 150,
        "locationId": 852,
        "serialNumber": "000123ABC",
        "createdAt": "2022-01-01T00:00:00.000Z",
        "updatedAt": "2022-01-01T00:00:00.000Z",
        "creatorId": 851
      },
      "location": {
        "id": 963,
        "name": "Warehouses",
        "description": "The warehouse where we store the forklifts",
        "address": "1090 main street, Franklin",
        "parentId": 852,
        "createdAt": "2022-01-01T00:00:00.000Z",
        "updatedAt": "2022-01-01T00:00:00.000Z"
      },
      "parts": [
        {
          "id": 963,
          "name": "Locknut - 1/8",
          "area": "tool room",
          "unitCost": 120,
          "availableQuantity": 10,
          "minimumQuantity": 5,
          "barcode": "bWFpbnRhaW54Cg==",
          "quantityUsed": 120,
          "locationId": 852
        }
      ],
      "categories": [
        "Cleaning"
      ],
      "estimatedTime": 3600,
      "extraFields": {
        "Estimated Budget": "$250"
      },
      "procedure": {
        "id": 1234,
        "templateIds": [
          1234,
          1235
        ],
        "title": "Control dashboard audit",
        "maxScore": 2,
        "score": 1,
        "fields": [
          {
            "id": 1234,
            "parentId": 1233,
            "procedureTemplateId": 1234,
            "procedureTemplateFieldId": 5678,
            "description": "Number of green lights",
            "type": "NUMBER",
            "label": "Number of green lights",
            "maxScore": 2,
            "score": 1,
            "value": {
              "text": "12",
              "attachment": {
                "id": 12345,
                "mimeType": "image/png",
                "fileName": "image.png",
                "url": "http://example.com/image.png",
                "createdAt": "2022-01-01T00:00:00.000Z",
                "width": 220,
                "height": 100
              },
              "attachments": [
                {
                  "id": 12345,
                  "mimeType": "image/png",
                  "fileName": "image.png",
                  "url": "http://example.com/image.png",
                  "createdAt": "2022-01-01T00:00:00.000Z",
                  "width": 220,
                  "height": 100
                }
              ],
              "notes": {
                "text": "1 light bulb is burned out."
              }
            },
            "meter": {
              "id": 123
            }
          }
        ]
      }
    }
  ]
}