POST
Cancel 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 cancelled; a draft is deleted instead, and finished or cancelled transfers are final.
  • Refused while any line with a quantity still to receive still carries withdrawn stock (goods in transit): receive, reroute or resolve them first.
  • cancelled_at, when sent, must be a valid date.
What else happens
  • The transfer becomes cancelled and finished_at is set to cancelled_at (now by default).
  • Nothing is returned to stock and the steps and lines are not changed.
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
cancelled_at
string<date-time> | null

Cancellation date and time, ISO 8601, stored as finished_at. 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.