PUT
Change a transfer segment
Company space For: Stock keeper · Permission: transfer_segments.update Conditions
  • Only the company that owns the transfer can do this.
  • The transfer must be in draft or running status.
  • The segment must belong to the transfer and neither of its steps may be current, done or skipped.
  • Both endpoints are required, each by step id or position; the destination must come after the source and, when the transfer is running, the new steps cannot be current, done or skipped.
  • The route legs between the endpoints must form a complete continuous path.
  • A transfer cannot hold two segments with the same source and destination steps.
  • cost, costs, started_at and ended_at are refused.
What else happens
  • Changes the endpoints and re-attaches the route legs of the segment.
  • When the source step changes, the planned dispatches of the segment are deleted.
Part of Load goods and handle losses in transit.

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.

segment
string
required

Identifier of the transfer segment (27-character KSUID).

Body

application/json
from_step_id
string | null

Identifier of the step the segment leaves from (27-character KSUID). Required unless from_step_position is sent.

Required string length: 27
from_step_position
integer | null

Position (starting at 1) of the step the segment leaves from, as an alternative to from_step_id. Required unless from_step_id is sent.

Required range: x >= 1
to_step_id
string | null

Identifier of the step the segment arrives at (27-character KSUID). Required unless to_step_position is sent; it must come after the source step.

Required string length: 27
to_step_position
integer | null

Position (starting at 1) of the destination step, as an alternative to to_step_id. Required unless to_step_id is sent.

Required range: x >= 1
cost
string

Not accepted: segment costs come from the route-leg costs of the transfer, not from the segment.

costs
string

Not accepted: segment costs come from the route-leg costs of the transfer, not from the segment.

started_at
string

Not accepted: the start time is set by the server.

ended_at
string

Not accepted: the end time is set by the server.

Response

TransferSegmentResource

id
string
required

Identifier of the segment.

transfer_id
string
required

Identifier of the transfer.

from_step_id
string
required

Step the goods leave.

to_step_id
string
required

Step the goods go to; later in the route than the source.

started_at
string<date-time> | null
required

When goods were first withdrawn for this segment, ISO 8601; null before.

ended_at
string<date-time> | null
required

When goods were first received at the destination, ISO 8601; null before.

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

route_leg_ids
array

Identifiers of the route legs the segment travels over.

cost_total_minor
integer

Total of the segment's costs in minor units. Present only for the owner company.

from_step
TransferStepResource · object

Source step, when included.

to_step
TransferStepResource · object

Destination step, when included.

costs
TransferSegmentCostResource · object[]

Costs allocated to the segment; shown to the owner company only.

lines
TransferLineResource · object[]

Lines of goods carried by the segment.