PUT
Edit a trip
Company space For: Stock keeper, Manager · Permission: trips.update Conditions
  • Only the company that owns the trip can change it; a trip shared by another company can be read but not modified.
  • stops, legs, rates, vehicles, company_id and is_private are refused on update; ownership and visibility cannot change after creation.
  • name, when sent, must stay unique under the same rule as on creation (shared trips by organization, private trips by company).
  • An archived trip accepts only a payload containing nothing but status; this is how it is reactivated.
  • status must be active or archived.
What else happens
  • Fields that are not sent keep their value; description can be cleared with null.
  • Archiving a trip freezes its stops, legs, rates and vehicles, which can no longer be changed until it is made active again.
Part of Reusable trips and waypoints.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

trip
string
required

Identifier of the trip (27-character KSUID). The trip must be visible to the calling company.

Response

TripResource

id
string
required

Identifier of the trip (27-character KSUID).

company_id
string
required

Identifier of the company the record belongs to.

is_private
boolean
required

True when only the owning company sees the trip; false when the trip is shared with every company of the organization. Set at creation and never changed.

name
string
required

Name of the trip, unique among shared trips of the organization or among the private trips of the owning company.

description
string | null
required

Free-text description of the trip; null when none.

status
string
required

active: the trip and its stops, legs, rates and vehicles can be modified. archived: they are frozen until the trip is set back to active.

creator_user_id
string | null
required

Identifier of the member who created the trip, set by the server.

created_at
string<date-time>
required

Date and time the record was created (ISO 8601, UTC).

updated_at
string<date-time>
required

Date and time the record was last changed (ISO 8601, UTC).

stops
TripStopResource · object[]

Stops of the trip, ordered by position.

legs
TripLegResource · object[]

Legs of the trip, ordered by the position of their source stop. Each leg carries only the rates of the calling company.

rates
TripRateResource · object[]

Trip-level rates (not attached to a leg) owned by the calling company; rates of other companies are never returned.

vehicles
TripVehicleResource · object[]

Vehicle assets attached to the trip.