Beta APIs

[beta] Create an asset assignment.

Create an asset assignment.

<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 Assignments under the Assignments 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/fleet/assets/assignments

Request

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

Request body

assetIdstring required

Samsara ID of the asset.

assigneeIdstring required

Samsara ID of the assignee.

assigneeType'driver' | 'asset' | 'geofence' required

Type of the assignee. This required field has no default. Valid values: driver, asset, geofence

expectedEndTimestring date-time

Optional. The expected end time of the assignment in RFC 3339 format. Must be strictly after the current time.

Example request

{
  "assetId": "281474978683353",
  "assigneeId": "494123",
  "assigneeType": "driver",
  "expectedEndTime": "2024-09-08T17:00:00Z"
}

Response

OK response.

Example response

{
  "data": {
    "asset": {
      "id": "12345"
    },
    "assignee": {
      "assigneeType": "driver",
      "id": "494123"
    },
    "endTime": "2024-09-01T13:00:00Z",
    "expectedEndTime": "2024-09-08T17:00:00Z",
    "startTime": "2024-09-01T12:00:00Z"
  }
}

Changes

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