POST
Finish a transfer
Company space Cannot be undone For: Stock keeper, Manager · Permission: transfers.execute Conditions
  • Only the company that owns the transfer can do this.
  • Only a running transfer can be finished.
  • No step may be current or upcoming: every step must be done or skipped.
  • No line may still carry withdrawn stock with a quantity left to receive.
  • Every route leg cost must already be allocated to goods (otherwise ‘route-leg costs remain unallocated’).
  • finished_at, when sent, must be a valid date.
What else happens
  • The transfer becomes finished and finished_at is set (now by default). No stock or accounting change.
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
finished_at
string<date-time> | null

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