PUT
Change a trip rate
Company space For: Stock keeper, Manager · Permission: trip_rates.update Conditions
  • Only the company that owns the trip can change it; a trip shared by another company can be read but not modified.
  • Only a trip whose status is active can be modified; an archived trip is refused with a validation error.
  • trip_leg_id is refused: a rate cannot move to another leg.
  • The rate must have been entered by the calling company (422).
  • amount, when sent, follows the same rules as on creation.
What else happens
  • Fields not sent keep their value; the amount is stored in minor units.
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.

rate
string
required

Identifier of the trip rate; it must belong to the trip in the URL.

Response

TripRateResource

id
string
required

Identifier of the rate (27-character KSUID).

trip_id
string
required

Identifier of the trip the rate belongs to.

trip_leg_id
string | null
required

Identifier of the leg the rate applies to; null for a trip-level rate.

label
string
required

Name of the rate, unique per company on the same trip or leg.

amount
number
required

Amount in major units (stored in minor units and divided by 10 to the power currency_exponent).

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).