PUT
Change a route leg cost
Company space For: Stock keeper, Manager · Permission: transfer_route_leg_costs.update Conditions
  • The transfer must be visible to the current company (owned by it, or not a draft and with a step at a location the company can use).
  • The leg must be accessible to the current company.
  • Only the company that recorded the cost can change it, even when it owns the transfer.
  • The transfer must be draft or running.
  • The cost cannot change once allocated or once the destination step has been reached.
  • label (up to 255 characters) and amount (non-negative, major units, at most currency_exponent decimals) are optional; omitted fields keep their value. amount_minor and allocated_at are refused.
Part of Transport legs, vehicles and costs.

Authorizations

Authorization
string
header
required

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

Path Parameters

transfer
string
required

Identifier of the transfer.

route_leg
string
required

Identifier of the route leg, which must belong to the transfer.

cost
string
required

Identifier of the route leg cost, which must belong to the leg.

Response

TransferRouteLegCostResource

id
string
required

Identifier of the cost (27-character KSUID string).

transfer_route_leg_id
string
required

Identifier of the route leg the cost is recorded on.

company_id
string
required

Identifier of the company the record belongs to.

creator_user_id
string | null
required

Identifier of the member who recorded the cost; null when no authenticated user was known; costs copied from a trip are also recorded for the member who creates the transfer.

label
string
required

Free text describing the cost.

amount
number
required

Amount of the cost in major units (amount_minor divided by 10 to the power of currency_exponent).

amount_minor
integer
required

Amount of the cost in minor units (integer).

allocated_at
string<date-time> | null
required

Date and time the cost was spread over the goods carried (ISO 8601); null while it is pending. Set by the server when the destination step is reached; once set the cost can no longer change or be deleted.

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