POST
Add a transfer line
Company space For: Stock keeper · Permission: transfer_lines.create Conditions
  • Only the company that owns the transfer can do this.
  • The transfer must be in draft or running status.
  • Neither step of the segment may be current, done or skipped.
  • stockable_id and base_quantity (at least 1) are required; the item must be tracked in inventory.
  • A stockable_unit_id must belong to that item.
  • When dispatches are sent, each asset must be a location of the source step’s location group that the company can use, the dispatched quantities must add up to base_quantity, a source cannot be repeated, and FIFO and explicit group dispatches cannot be mixed for one asset.
  • remaining_quantity, stock_withdrawals, stock_sources, cost fields and reroute fields are refused.
What else happens
  • Creates the line with remaining_quantity equal to base_quantity, no withdrawals, and records the current company and user as creators.
  • Replaces nothing else; stock does not move until the transfer steps are executed.
  • Saves the planned dispatches when dispatches are sent.
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).

Response

TransferLineResource

id
string
required

Identifier of the line (27-character KSUID).

transfer_id
string
required

Identifier of the transfer.

transfer_segment_id
string
required

Identifier of the segment carrying the line.

stockable_id
string
required

Identifier of the item transferred.

stockable_unit_id
string | null
required

Unit of the quantities; null when they are in the base unit.

base_quantity
integer
required

Quantity planned for the line, in the line's unit.

remaining_quantity
integer
required

Quantity not yet received at the destination, in the line's unit; it decreases with receptions and loss declarations.

in_transit_quantity
integer
required

Quantity already withdrawn from stock and still on its way: equal to remaining_quantity once withdrawals are executed, otherwise 0.

created_by_company_id
string
required

Company that created the line; a rerouted line keeps the company of the original line.

creator_user_id
string | null
required

Member who created the line; null when unknown.

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

resolutions
TransferLineResolutionResource · object[]

Loss declarations of the line; present only when loaded.

dispatches
TransferStepDispatchResource · object[]

Planned or recorded sources the goods leave from, with asset, group and quantity.

stockable
object

Summary of the item.

stockable_unit
object | null

Summary of the unit; null when the line uses the base unit.