POST
Add a route leg cost
Company space For: Stock keeper, Manager · Permission: transfer_route_leg_costs.create 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, including when it owns the transfer.
  • The transfer must be draft or running.
  • Costs are frozen once the destination step of the leg is no longer upcoming.
  • label and amount are required; label is up to 255 characters; amount is a non-negative number in major units with at most currency_exponent decimals.
  • amount_minor and allocated_at are refused: they are set by the server.
What else happens
  • The cost is recorded for the current company and the current user, and is not allocated yet.
  • It will be spread over the goods carried when the destination step of the leg is reached (stock-in); nothing is allocated by this call.
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.

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