POST
Approve a transfer step
Company space For: Stock keeper, Manager · Permission: transfers.approve Conditions
  • The company does not need to own the transfer: once it is no longer a draft, a company that holds a location of one of its step groups can act.
  • The step must be accessible to the company: it must hold a location of the step’s group.
  • The transfer must be running and the step must belong to it.
  • Only an upcoming step can be approved; no other step may be current; the previous step must be done or skipped.
  • When receipts are sent, each line must arrive at this step, each location must be an accessible location of the step’s group, and received quantities per line are checked against what remains. When dispatches are sent, each segment must start from this step, a line must belong to its segment, a location/lot source may appear once per line, FIFO and explicit lots cannot be mixed for the same line and location, and an explicit lot must hold enough stock at that location.
What else happens
  • The step becomes current, with approver company, member and time.
  • When receipts or dispatches are sent, the whole reception plan or dispatch plan of the step is replaced by the one sent; keys not sent keep the existing plan.
  • Pending route leg costs up to this step are allocated to goods.
  • Stock is received (stock in) at the receiving locations for segments arriving at this step, lines’ remaining quantity is reduced and segments get an end time; stock is withdrawn from the dispatch locations for lines leaving this step. Operations run once per step.
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.

step
string
required

Identifier of the transfer step, which must belong to the transfer.

Body

application/json
receipts
object[] | null

Reception plan of the step. When the key is sent it replaces all receptions already planned for the step (an empty list clears them).

dispatches
object[] | null

Dispatch plan of the step. When sent it replaces all dispatches already planned for the step.

Response

TransferStepResource

id
string
required

Identifier of the step.

transfer_id
string
required

Identifier of the transfer.

position
integer
required

Order of the step in the route, from 1.

location_group_id
string
required

Location group visited at this step.

status
string
required

upcoming (not reached), current (being operated), done or skipped.

operations_executed_at
string<date-time> | null
required

When the planned stock movements of the step were executed, ISO 8601; null before.

approved_by_company_id
string | null
required

Company that made the step current.

approved_by_user_id
string | null
required

Member who made the step current.

approved_at
string<date-time> | null
required

When the step became current, ISO 8601.

completed_by_company_id
string | null
required

Company that completed the step.

completed_by_user_id
string | null
required

Member who completed the step.

completed_at
string<date-time> | null
required

When the step was completed, ISO 8601.

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

location_group
object

The group of the step (id and name), when loaded.

receipts
TransferStepReceiptResource · object[]

Planned or executed receptions of goods at the locations of the step.

dispatches
TransferStepDispatchResource · object[]

Planned or executed withdrawals of goods from the locations of the step.