Skip to main content
POST
/
maintenance
/
invoice-scans
Process an invoice scan.
curl --request POST \
  --url https://api.samsara.com/maintenance/invoice-scans \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "file": {
    "base64Content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8P...",
    "contentType": "application/pdf"
  },
  "assetId": "281474993384538",
  "workOrderId": "123456"
}
'
{
  "data": {
    "workOrderId": "123456"
  }
}

Documentation Index

Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Invoice scan request

file
object
required

Invoice file object

assetId
string

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.

Example:

"281474993384538"

workOrderId
string

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:

"123456"

Response

OK response.

data
object
required

Invoice scan response data