Supplier orders. 6 operations.
0 of them work. 6 are in the contract and not built yet. Each needs a bearer token with its scope. All operations.
Operations
GET/api/v1/supplier-orders/{id}supplier-orders.getsuppliers.readContract only
GET/api/v1/supplier-orderssupplier-orders.listsuppliers.readContract only
This operation is in the contract, and the engine refuses every call of it until it is built.
Parameters
statequery | stringOnly the supplier orders in this state: made, sent, accepted, shipped or cancelled. |
supplierquery | stringOnly the supplier orders of the supplier with this key. |
orderquery | integerOnly the supplier orders of the order with this number. |
not_sentquery | booleanOnly the ones made whose send failed. |
fromquery | stringA day, yyyy-mm-dd: made on or after it. |
toquery | stringA day, yyyy-mm-dd: made before it. |
limitquery | integerThe most supplier orders in the page: 1 to 200; 50 when left out. |
afterquery | stringThe cursor of the page: the next of the page before; the first page when left out. The supplier orders follow it. |
Answer
Errors: 401, 403, 405, 422, 429
curl -X GET -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/supplier-orders
POST/api/v1/orders/{number}/supplier-orderssupplier-orders.makesuppliers.writeContract only
This operation is in the contract, and the engine refuses every call of it until it is built.
Parameters
numberpath | string |
numberpath | string |
Idempotency-Keyheader | stringSee common parameters |
Request body
Answer
array of SupplierOrder
Errors: 401, 403, 404, 405, 409, 413, 422, 429
curl -X POST -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/orders/{number}/supplier-orders
POST/api/v1/supplier-orders/{id}/sendsupplier-orders.sendsuppliers.writeContract only
This operation is in the contract, and the engine refuses every call of it until it is built.
Parameters
idpath | string |
idpath | string |
Idempotency-Keyheader | stringSee common parameters |
Answer
Errors: 401, 403, 404, 405, 409, 422, 429
curl -X POST -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/supplier-orders/{id}/send
POST/api/v1/supplier-orders/{id}/statesupplier-orders.set-statesuppliers.writeContract only
This operation is in the contract, and the engine refuses every call of it until it is built.
Parameters
idpath | string |
idpath | string |
Idempotency-Keyheader | stringSee common parameters |
Request body
Answer
Errors: 401, 403, 404, 405, 409, 413, 422, 429
curl -X POST -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/supplier-orders/{id}/state
GET/api/v1/supplier-orders/to-sendsupplier-orders.to-sendsuppliers.readContract only
Schemas 11
LineChoice
LineChoice is a buyer's answer on a cart line or an order line: the label the field had at the confirm, and the value. An order never changes it, and a privacy erasure of the buyer replaces a text value with the catalogue's word "erased".
keyrequired | string |
labelrequired | string |
valuerequired | string |
MakeSupplierOrdersRequest
MakeSupplierOrdersRequest makes and sends the supplier orders of one order, with a note for them (the button of ). It is Refused for an order that has them, is cancelled, or has no made-to-order line with a supplier.
noterequired | string |
SupplierDelivery
SupplierDelivery is where a supplier whose ShipsTo is buyer sends the goods: the buyer's delivery name, address and phone and nothing more. Absent for a supplier that ships to the store.
addressrequired | array of string |
namerequired | string |
phonerequired | string |
SupplierOrder
SupplierOrder is what the store sends one supplier for one order. Supplier and Emails are the copy made then.
delivery | SupplierDelivery |
dispatch_byrequired | string |
emailsrequired | array of string |
historyrequired | array of SupplierOrderEvent |
idrequired | integer |
linesrequired | array of SupplierOrderLine |
made_atrequired | string (date-time) |
not_sentrequired | boolean |
noterequired | string |
numberrequired | string |
orderrequired | integer |
order_closedrequired | boolean |
staterequired | string |
supplierrequired | string |
supplier_archivedrequired | boolean |
supplier_namerequired | string |
updated_atrequired | string (date-time) |
updated_byrequired | string |
updated_by_name | string |
SupplierOrderCount
SupplierOrderCount is how many supplier orders a supplier has in a state.
countrequired | integer |
staterequired | string |
SupplierOrderEvent
SupplierOrderEvent is a line of a supplier order's history: a state change or a send, with who, when, the note and the reference or the reason.
atrequired | string (date-time) |
byrequired | string |
by_name | string |
fromrequired | string |
noterequired | string |
reasonrequired | string |
refrequired | string |
sentrequired | boolean |
torequired | string |
SupplierOrderLine
SupplierOrderLine is a line of a supplier order: what the supplier makes. It holds no price.
choicesrequired | array of LineChoice |
optionsrequired | array of string |
quantityrequired | integer |
skurequired | string |
titlerequired | string |
SupplierOrderList
SupplierOrderList is a page of supplier orders, newest first, with the totals of all the filter holds.
nextrequired | string |
ordersrequired | array of SupplierOrder |
totalsrequired | SupplierOrderTotals |
SupplierOrderStateRequest
SupplierOrderStateRequest changes a supplier order's state: From is the state the screen read, and a change at another state is Refused. State is accepted, shipped (Ref is optional, 0 to 120 characters) or cancelled (Reason is needed, 1 to 200 characters; SharedReason is what the supplier is told, 0 to 200, and "" tells none).
fromrequired | string |
reasonrequired | string |
refrequired | string |
shared_reasonrequired | string |
staterequired | string |
SupplierOrderTotals
SupplierOrderTotals count all the supplier orders a filter holds by state, not only the page.
by_staterequired | array of SupplierOrderCount |
countrequired | integer |
not_sentrequired | integer |
SupplierOrdersToSend
SupplierOrdersToSend is how many orders need their supplier orders sent: paid, or placed on cash on delivery or account terms, not cancelled or refunded in full, with a made-to-order line that has a supplier and no supplier order. Home shows the line when Orders is above 0.
ordersrequired | integer |
Made from engine/internal/openapi/openapi.json at commit 6c4cbd921. The contract-only operations come from the engine’s stub file, engine/internal/ops.