Preview APIs

[preview] Stream orders

Returns live order create and update state for replication.

<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 Routes under the Driver Workflow 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>

Endpoints in this section are in Preview. These APIs are not functional and are instead for soliciting feedback from our API users on the intended design of this API. Additionally, it is not guaranteed that we will be releasing an endpoint included in this section to production. This means that developers should NOT rely on these APIs to build business critical applications

  • Samsara may change the structure of a preview API's interface without versioning or any notice to API users.

  • When an endpoint becomes generally available, it will be announced in the API changelog.

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/preview/fleet/orders/stream

Request

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

Query parameters

startTimestring date-time required

Inclusive updatedAtTime lower bound in RFC 3339 format.

endTimestring date-time

Exclusive updatedAtTime upper bound in RFC 3339 format.

routeIdstring

Optional route ID scope.

includeExternalIdsboolean

Include external IDs in returned orders.

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.

Response

OK response.

Example response

{
  "data": [
    {
      "createdAtTime": "1990-08-31T23:49:19Z",
      "customerProperties": [
        {
          "key": "purchaseOrderNumber",
          "value": "PO-12345"
        }
      ],
      "externalIds": {
        "Atque error at mollitia.": "Non sed sed sed quam et delectus.",
        "Et ea.": "Enim aspernatur sit soluta provident et sit.",
        "Eum expedita omnis quos repellendus.": "Aut sed est quisquam ut voluptas."
      },
      "id": "018f7b62-7d55-7b9e-a92f-2a6b7ff10392",
      "samsaraCustomerOrderName": "Order 12345",
      "tasks": [
        {
          "createdAtTime": "1977-01-10T23:36:08Z",
          "customerProperties": [
            {
              "key": "purchaseOrderNumber",
              "value": "PO-12345"
            }
          ],
          "dispatcherNotes": "Customer requires lift gate",
          "driverNotes": "Use loading dock 4",
          "hubId": "018f7b62-7d55-7b9e-a92f-2a6b7ff10392",
          "id": "12345678",
          "positionConstraintType": "unknown",
          "quantities": [
            {
              "capacityId": "018f7b62-7d55-7b9e-a92f-2a6b7ff10392",
              "id": "018f7b62-7d55-7b9e-a92f-2a6b7ff10392",
              "label": "pallets",
              "value": 0.23962707185822993
            }
          ],
          "routeId": "12345678",
          "serviceDurationSeconds": 1920015009061035500,
          "serviceLocation": {
            "addressId": "12345678",
            "customAddress": {
              "addressLine1": "123 Main St",
              "addressLine2": "Dock 4",
              "city": "Oakland",
              "country": "US",
              "formattedAddress": "123 Main St, Oakland, CA 94607",
              "latitude": 0.8920050879069387,
              "longitude": 0.8199449418715566,
              "postalCode": "94607",
              "state": "CA"
            },
            "serviceLocationType": "unknown"
          },
          "serviceWindows": [
            {
              "endTime": "1975-07-07T21:36:20Z",
              "id": "018f7b62-7d55-7b9e-a92f-2a6b7ff10392",
              "startTime": "1975-02-20T04:43:33Z"
            }
          ],
          "taskType": "unknown",
          "updatedAtTime": "2014-02-20T05:13:14Z"
        }
      ],
      "updatedAtTime": "2003-10-18T15:58:15Z"
    }
  ],
  "pagination": {
    "endCursor": "MjkY",
    "hasNextPage": true
  }
}

Changes

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