POST
Start a transfer
Company space For: Stock keeper, Manager · Permission: transfers.execute Conditions
  • Only the company that owns the transfer can do this.
  • Only a draft transfer can be started.
  • The transfer needs at least two steps and exactly one route leg between each pair of consecutive steps.
  • Every line must refer to a stock item tracked in inventory.
  • The first step must be accessible to the current company: it must hold a location of the step’s group.
  • started_at, when sent, must be a valid date.
What else happens
  • The transfer becomes running, started_at is set (now by default) and the current member is recorded as pilot.
  • The first step becomes current, with approver company, member and time recorded.
  • Pending route leg costs are allocated to the goods of eligible segments.
  • Stock is withdrawn (stock out, strict tracking, operation type transfer) from the dispatch locations of the first step for the lines leaving it; withdrawals are recorded on the lines and the segment gets its start time. Stock in is done for segments arriving at that step, if any.
  • The step is marked as operations executed, so they are not repeated.
Part of Plan and run stock transfers.

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
started_at
string<date-time> | null

Start date and time, ISO 8601. Optional; defaults to the time of the call.

Response

TransferResource

id
string
required

Identifier of the transfer.

trip_id
string | null
required

Identifier of the trip template it was created from; null otherwise.

company_id
string
required

Identifier of the company the record belongs to.

organization_id
string
required

Identifier of the organization the record belongs to.

motif
string
required

Reason of the transfer, free text.

type
string
required

Legacy classification, simple or complex. New transfers are complex.

status
string
required

draft (being planned), running, finished or cancelled. Finished and cancelled are final.

cost_distribution_method
string
required

How route costs are spread over the goods: average or prorata. Fixed at creation.

creator_user_id
string | null
required

Member who created the transfer.

pilot_user_id
string | null
required

Member who started the transfer; null until it starts.

started_at
string<date-time> | null
required

When the transfer was started, ISO 8601; null for a draft.

finished_at
string<date-time> | null
required

When it was finished or cancelled, ISO 8601; null until then.

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

in_transit
array

Goods currently in transit: one entry per stock item with stockable_id and the quantity in the reference unit of the item.

steps
TransferStepResource · object[]

Steps of the route, in the loaded detail view.

route_legs
TransferRouteLegResource · object[]

Route legs between consecutive steps, with costs for the owner company.

segments
TransferSegmentResource · object[]

Segments carrying lines of goods between two steps.

vehicles
TransferVehicleResource · object[]

Vehicles assigned to the transfer.