POST
Add a transfer segment
Company space For: Stock keeper · Permission: transfer_segments.create Conditions
  • Only the company that owns the transfer can do this.
  • The transfer must be in draft or running status.
  • Each endpoint must be given by step id or by step position (at least one of the two); the step must belong to the transfer.
  • The destination step must come after the source step in the route.
  • When the transfer is running, neither step may be current, done or skipped.
  • The route legs between the two steps must form a complete continuous path, otherwise the call is refused.
  • 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
  • Creates the segment with no start or end time and attaches the route legs between its two steps.
  • Stock does not move.
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.

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.