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.
Configure the Webhook
See the Webhooks guide for details on how to create a webhook. Specifically, you’ll want to configure a Document Submission alert to send to the webhook. Once you’ve configured the webhook and the alert, you’ll receive a JSON payload like the following whenever a document is submitted:driver object in the webhook payload contains an id field.
The document ID is located in the details field of the webhook payload, and always has the following structure:
A {documentTemplateName} document was submitted by {driverName} at {submissionTime}. Document: {documentUrl} (ID: {documentId})
You can use regex or other string operations to extract the document ID from this field.
Retrieve the Document
The Fetches a document endpoint allows you to retrieve the document object using the driver ID and document ID collected from the webhook notification payload. For example, using the driver ID and document ID extracted from the webhook payload above:driverDocument object with orgId, driverId, id, driverCreatedAtMs, serverCreatedAtMs, serverUpdatedAtMs, dispatchJobId, notes, state, documentType, vehicleId, and a fields array containing each field’s label, valueType, and value.
See the Document Object overview for details on the document object.