Move stock between yards
const url = 'https://example.com/stock/transfers';const options = { method: 'POST', headers: { cookie: 'bottle.session_token=<bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"fromLocationId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","toLocationId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","method":"recorded","lines":[{"productId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","condition":"full","quantity":1}],"plannedFor":"2026-04-15","roundId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","happenedAt":"2026-04-15T12:00:00Z","carrierName":"example","carrierReference":"example","note":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/stock/transfers \ --header 'Content-Type: application/json' \ --cookie bottle.session_token=<bottle.session_token> \ --data '{ "fromLocationId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "toLocationId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "method": "recorded", "lines": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "condition": "full", "quantity": 1 } ], "plannedFor": "2026-04-15", "roundId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "happenedAt": "2026-04-15T12:00:00Z", "carrierName": "example", "carrierReference": "example", "note": "example" }'Two ways. recorded is a transfer that has already happened: received in one step at happenedAt, which may be in the past but not the future, with both ends in the ledger at that time. carrier is one a courier or the supplier is taking: it starts as planned and is moved on with the advance call. round is carried on one of the business’s own vans: give the roundId, which must still be planned, and the van calls at both yards as ordinary stops, or collects with its morning load when it leaves from the yard the stock is in. Both ends must be yards of this business, not somebody’s home.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fobject
UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fResponses
Section titled “Responses”The transfer, with its lines and every stage it has been through
object
UUID v7
UUID v7
UUID v7
UUID v7
object
object
UUID v7
object
UUID v7
object
Example
{ "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "fromLocationId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "toLocationId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "method": "recorded", "status": "planned", "roundId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "proofs": [ { "leg": "collection", "kind": "signature" } ], "round": { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }, "lines": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "condition": "full" } ], "history": [ { "status": "planned" } ]}Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or without the permission this needs
object
Example
{ "error": "not_found", "message": "Customer not found"}A product, yard or transfer that is not this business’s
object
Example
{ "error": "not_found", "message": "Customer not found"}The transfer is not at a stage that allows this
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}