POST
Add a trip rate
Company space For: Stock keeper, Manager · Permission: trip_rates.create 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.
  • label and amount are required; amount is in major units, cannot be negative and may have at most the currency’s decimals; amount_minor is refused.
  • When trip_leg_id is sent, the leg must belong to the trip (422).
  • A label can be used only once per company on the same level (trip level, or per leg).
What else happens
  • Creates the rate for the calling company, converted to minor units with the team’s currency exponent. Other companies do not see it.
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

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