Carrier Proposed Assignments

Create an assignment

Creates a new assignment that a driver can later use. Each driver can only have one future assignment.

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.

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

post/fleet/carrier-proposed-assignments

Request

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

Request body

activeTimestring

Time after which this assignment will be active and visible to the driver on the mobile app. Not setting it makes it active now. UTC timestamp in RFC 3339 format. Example: 2020-01-27T07:06:25Z.

driverIdstring required

ID for the driver for the driver that this assignment is for. This can be either a unique Samsara ID or an external ID for the driver.

shippingDocsstring

Shipping Documents that this assignment will propose to the driver.

trailerIdsstring[]

IDs of trailers to propose. This can be either a unique Samsara IDs or an external IDs for the trailers. (forbidden if trailerNames is set)

trailerNamesstring[]

Names of trailers to propose. (forbidden if trailerIds is set)

vehicleIdstring required

ID for the vehicle to propose. This can be either a unique Samsara ID or an external ID for the vehicle.

Example request

{
  "activeTime": "2020-01-27T07:06:25Z",
  "driverId": "42",
  "shippingDocs": "Delivery 123, chips and soda",
  "trailerIds": [
    "123456789",
    "maintenanceId:250020"
  ],
  "trailerNames": [
    "Trailer123",
    "TrailerABC"
  ],
  "vehicleId": "123"
}

Response

Return the created assignment

Example response

{
  "data": {
    "acceptedTime": "2020-01-27T07:06:25Z",
    "activeTime": "2020-01-27T07:06:25Z",
    "driver": {
      "id": "88668",
      "name": "Susan Bob",
      "externalIds": {
        "maintenanceId": "250020",
        "payrollId": "ABFS18600"
      }
    },
    "firstSeenTime": "2020-01-27T07:06:25Z",
    "id": "08b3aeada5f4ab3010c0b4efa28d2d1890dbf8d48d2d",
    "rejectedTime": "2020-01-27T07:06:25Z",
    "shippingDocs": "Delivery 123, chips and soda",
    "trailers": [
      {
        "id": "123456789",
        "name": "Midwest Trailer #5",
        "externalIds": {
          "maintenanceId": "250020",
          "payrollId": "ABFS18600"
        }
      }
    ],
    "vehicle": {
      "ExternalIds": {
        "maintenanceId": "250020",
        "payrollId": "ABFS18600"
      },
      "id": "123456789",
      "name": "Midwest Truck #4"
    }
  }
}

Changes

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