Create a stock transfer
How to create a stock transfer via API
To create a new stock transfer, send a POST request to the /api/stock_transfers endpoint, passing the resource arguments in the request body.
Request
POST https://yourdomain.commercelayer.io/api/stock_transfers
Arguments
type
string
Required
attributes.number
string
Optional, default to numeric id
attributes.sku_code
string
Optional
attributes.quantity
integer
Required
attributes.reference
string
Optional
attributes.reference_origin
string
Optional
attributes.metadata
object
Optional
relationships.sku
object
Required
relationships.origin_stock_location
object
Required
relationships.destination_stock_location
object
Required
relationships.shipment
object
Optional
relationships.line_item
object
Optional
Example
The following request creates a new stock transfer:
On success, the API responds with a 201 Created status code, returning the created resource object:
Last updated