Skip to main content
POST
/
fleet
/
carrier-proposed-assignments
Create an assignment
curl --request POST \
  --url https://api.samsara.com/fleet/carrier-proposed-assignments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "driverId": "42",
  "vehicleId": "123",
  "activeTime": "2020-01-27T07:06:25Z",
  "shippingDocs": "Delivery 123, chips and soda",
  "trailerIds": [
    "123456789",
    "maintenanceId:250020"
  ],
  "trailerNames": [
    "Trailer123",
    "TrailerABC"
  ]
}
'
{
  "data": {
    "activeTime": "2020-01-27T07:06:25Z",
    "id": "08b3aeada5f4ab3010c0b4efa28d2d1890dbf8d48d2d",
    "acceptedTime": "2020-01-27T07:06:25Z",
    "driver": {
      "id": "88668",
      "name": "Susan Bob",
      "externalIds": {
        "maintenanceId": "250020",
        "payrollId": "ABFS18600"
      }
    },
    "firstSeenTime": "2020-01-27T07:06:25Z",
    "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"
    }
  }
}

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

The assignment to create.

New assignment for a driver.

driverId
string
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.

Example:

"42"

vehicleId
string
required

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

Example:

"123"

activeTime
string

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.

Example:

"2020-01-27T07:06:25Z"

shippingDocs
string

Shipping Documents that this assignment will propose to the driver.

Maximum string length: 40
Example:

"Delivery 123, chips and soda"

trailerIds
string[]

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)

Example:
["123456789", "maintenanceId:250020"]
trailerNames
string[]

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

Example:
["Trailer123", "TrailerABC"]

Response

Return the created assignment

A carrier-proposed assignment response object.

data
object
required

A carrier proposed assignment object