Work Orders

Gets work orders.

Gets work orders.

<b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select Read Work Orders under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

get/maintenance/work-orders

Request

  • Base URL
    https://api.samsara.com
  • Auth
    HTTP bearer

Query parameters

idsstring[]

Filter by the IDs. Up to 100 ids. Returns all if no ids are provided.

afterstring

If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.

includeExternalIdsboolean

When true, populates externalId on each work order and maintenanceSite.placeExternalIds by resolving the linked Place's external ids. Defaults to false. Adds one batch lookup per response page.

includeAttributesboolean

Whether to include the work order's custom fields (attributes) in the response. Defaults to false.

Response

OK response.

Example response

{
  "data": [
    {
      "archivedAtTime": "2019-06-13T19:08:25Z",
      "assetId": "12443",
      "assignedUserId": "1234",
      "assignees": [
        {
          "userId": "67890"
        }
      ],
      "attachments": [
        {
          "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
          "processingStatus": "processing",
          "url": "https://samsara-forms-submission-media-uploads.s3.us-west-2.amazonaws.com/123456",
          "urlExpiresAt": "2019-06-13T19:08:25Z"
        }
      ],
      "attributes": [
        {
          "dateValues": [
            "2024-01-15",
            "2024-12-31"
          ],
          "id": "494123",
          "name": "Compliance/ELD",
          "numberValues": [
            867,
            5309
          ],
          "stringValues": [
            "HQ",
            "Leased"
          ]
        }
      ],
      "category": "PREVENTIVE",
      "closingNotes": "Everything was fixed without issues.",
      "completedAtTime": "2019-06-13T19:08:25Z",
      "createdAtTime": "2019-06-13T19:08:25Z",
      "createdByUserId": "1234",
      "description": "The vehicle is not starting.",
      "discount": {
        "basisPoints": 500,
        "money": {
          "amount": "94.01",
          "currency": "usd"
        }
      },
      "dueAtTime": "2019-06-13T19:08:25Z",
      "engineHours": 91823,
      "externalId": "WO-10482",
      "id": "5",
      "invoiceNumber": "123456",
      "items": [
        {
          "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
          "type": "ISSUE"
        }
      ],
      "maintenanceSite": {
        "name": "LAX Service Bay 3",
        "placeExternalIds": {
          "Blanditiis laborum.": "Quis nesciunt excepturi voluptatem.",
          "Occaecati repellendus.": "Adipisci velit nihil.",
          "Placeat id.": "Totam ipsum quaerat."
        },
        "placeId": "123456"
      },
      "odometerMeters": 91823,
      "poNumber": "123456",
      "priority": "HIGH",
      "serviceTaskInstances": [
        {
          "assignees": [
            {
              "userId": "67890"
            }
          ],
          "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
          "laborHourlyCost": {
            "amount": "94.01",
            "currency": "usd"
          },
          "laborTimeMinutes": 60,
          "notes": "Replaced gasket; will revisit next service.",
          "parts": [
            {
              "costCentsOverride": 1000,
              "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
              "partId": "P0077",
              "quantity": 2.5
            }
          ],
          "partsCost": {
            "amount": "94.01",
            "currency": "usd"
          },
          "serviceTaskId": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
          "status": "Unknown",
          "subtasks": [
            {
              "form": {
                "formSubmissionUuid": "5523a39f-42ef-4820-83d0-dfe73dbe7853"
              },
              "procedure": {
                "name": "Inspect brakes"
              }
            }
          ],
          "timeEntries": [
            {
              "clockInAtTime": "2026-05-11T14:00:00Z",
              "clockOutAtTime": "2026-05-11T15:30:00Z",
              "driverId": "12345",
              "userId": "67890"
            }
          ]
        }
      ],
      "startedAtTime": "2019-06-13T19:08:25Z",
      "status": "OPEN",
      "tax": {
        "basisPoints": 700,
        "money": {
          "amount": "94.01",
          "currency": "usd"
        }
      },
      "unallocatedLabor": {
        "cost": {
          "amount": "94.01",
          "currency": "usd"
        },
        "timeMinutes": 60
      },
      "updatedAtTime": "2019-06-13T19:08:25Z",
      "vendorUuid": "5523a39f-42ef-4820-83d0-dfe73dbe7853",
      "workOrderTemplateIds": [
        "5523a39f-42ef-4820-83d0-dfe73dbe7853",
        "5523a39f-42ef-4820-83d0-dfe73dbe7853"
      ]
    }
  ],
  "pagination": {
    "endCursor": "MjkY",
    "hasNextPage": true
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.