PUT
Change a route leg
Company space For: Stock keeper, Manager · Permission: transfer_route_legs.update Conditions
  • Only the company that owns the transfer can change a leg.
  • The transfer must be draft or running.
  • Both current steps of the leg must still be upcoming.
  • Both ends are required (step id or step position); the new steps must belong to the transfer, be consecutive, and no other leg may already join the same pair.
  • costs is refused on update.
  • After the change every transfer segment must still be covered by a complete, continuous chain of legs, otherwise the call is refused.
What else happens
  • The route-leg links of the transfer segments are recomputed.
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.

Body

application/json
from_step_id
string | null

Identifier of the step where the leg starts (27 characters). Required unless from_step_position is sent; when both are sent the id is used.

Required string length: 27
from_step_position
integer | null

Position (1 or more) of the step where the leg starts. Required unless from_step_id is sent.

Required range: x >= 1
to_step_id
string | null

Identifier of the step where the leg ends. Required unless to_step_position is sent. The end step must come right after the start step.

Required string length: 27
to_step_position
integer | null

Position of the step where the leg ends; it must equal the start position plus one. Required unless to_step_id is sent.

Required range: x >= 1
costs
object[] | null

Costs to record on the new leg at creation. Not accepted on update; use the route leg cost endpoints instead.

Response

TransferRouteLegResource

id
string
required

Identifier of the route leg.

transfer_id
string
required

Identifier of the transfer.

from_step_id
string
required

Step the leg starts from.

to_step_id
string
required

Step the leg arrives at; always the next step in order.

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

cost_total_minor
integer

Total of the leg's costs in minor units (divide by 10 to the power currency_exponent). Present only when costs are loaded.

costs
TransferRouteLegCostResource · object[]

Cost lines of the leg (label and amount); shown to the owner company only.

from_step
TransferStepResource · object

Starting step, when included.

to_step
TransferStepResource · object

Arrival step, when included.