Skip to main content
PUT
Update Cargo Vehicle

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer <key>. Create one in the SWITCH Copilot under Settings → API keys (needs the API keys permission in your company), or with POST /auth/api-keys. The key is shown once, at creation.

Path Parameters

vehicle_id
integer
required

ID of the cargo vehicle.

Body

application/json

Schema for partially updating a cargo vehicle.

Only provided fields are applied; omitted fields remain unchanged.

name
string | null

Updated name.

Example:

"Cargo Van 01"

icon
string | null

Updated icon.

Example:

"Truck"

capacities
Capacities · object | null

New capacities; replaces the whole object.

Example:
company_slug
string | null

Move the vehicle to another company you can manage.

Example:

"acme-mobility"

Response

Cargo vehicle updated successfully. Returns the updated vehicle profile including capacity specs and company ownership.

Public schema for a cargo vehicle resource.

Exposes cargo vehicle details to API consumers, including capacity specs and company ownership.

id
integer
required

Unique ID.

Example:

1

name
string
required

Vehicle display name.

Example:

"Cargo Van 01"

icon
string
required

Name of the icon shown for the vehicle, e.g. Truck.

Example:

"Truck"

capacities
Capacities · object
required

How many items of each kind the vehicle carries, e.g. batteries, scooters, bikes, vehicles.

Example:
company_slug
string
required

Owning company slug.

Example:

"acme-mobility"

created_at
string<date-time>
required

Datetime when the record was created.

updated_at
string<date-time> | null

Datetime when the record was last updated, if ever.