Work Orders

Process an invoice scan.

Process an invoice scan to create or update a work order with AI-extracted data. Accepts base64 encoded invoice files (PDF, JPEG, PNG) up to 10MB.

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

To use this endpoint, select Write 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.

post/maintenance/invoice-scans

Request

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

Request body

assetIdstring

Asset ID to create a new work order for the invoice. Provide either workOrderId OR assetId, but not both. If assetId is provided, a new work order will be created for that asset. If workOrderId is provided instead, the invoice will be attached to the existing work order.

workOrderIdstring

Work order ID to attach the invoice to an existing work order. Provide either workOrderId OR assetId, but not both. If workOrderId is provided, the invoice will be attached to the existing work order. If assetId is provided instead, a new work order will be created for that asset.

Example request

{
  "assetId": "281474993384538",
  "file": {
    "base64Content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8P...",
    "contentType": "application/pdf"
  },
  "workOrderId": "123456"
}

Response

OK response.

Example response

{
  "data": {
    "workOrderId": "123456"
  }
}

Changes

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