Skip to main content
PUT
Update Depot

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

depot_id
integer
required

ID of the depot.

Body

application/json

Schema for partially updating a depot.

Only provided fields are applied; omitted fields remain unchanged. Latitude and longitude are only applied when both are sent.

name
string | null

Updated name.

Example:

"Lambrate Depot"

address
string | null

Updated address.

Example:

"Via Rombon 11, 20134 Milano MI"

latitude
number | null

New latitude; applied only together with longitude.

Example:

45.4887

longitude
number | null

New longitude; applied only together with latitude.

Example:

9.2415

company_slug
string | null

Move the depot to another company you can manage.

Example:

"acme-mobility"

Response

Depot updated successfully. Returns the updated depot profile including coordinates, address, and company ownership.

Public schema for a depot resource.

Exposes depot details to API consumers, including coordinates, address, and company ownership.

id
integer
required

Unique ID.

Example:

1

name
string
required

Depot name.

Example:

"Lambrate Depot"

address
string
required

Full address.

Example:

"Via Rombon 11, 20134 Milano MI"

latitude
number
required

Latitude.

Example:

45.4887

longitude
number
required

Longitude.

Example:

9.2415

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.