Update an order
const url = 'https://acme.mykreezalid.com/api/partners/v1/orders/1';const options = { method: 'PATCH', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"status":"accepted","fulfillment_status":"shipped","order_items":[{"id":4242}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://acme.mykreezalid.com/api/partners/v1/orders/1 \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "status": "accepted", "fulfillment_status": "shipped", "order_items": [ { "id": 4242 } ] }'Updates one of the orders received by your vendor account, typically its status or fulfillment_status. PUT /orders/{id} behaves the same. Send the order fields to change, at the top level of the body or wrapped in an order object. The order always stays yours. To update an order item, send it in order_items (or items) with the id of an existing item of this order. Only the last item of that list is taken into account: update items one request at a time.
status must be one of: draft, pending, new, accepted, shipped, service_provided, customer_confirmed, supplier_confirmed, declined, completed, failed, canceled. fulfillment_status must be empty or one of: started, scheduled, prepared, shipped, in_transit, available, delivered, executed, canceled, error. Any other value is refused with HTTP status 404.
When the order cannot be saved, the response still has HTTP status 200, with success: false. No notification is sent.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Order’s unique identifier
Request Bodyrequired
Section titled “Request Bodyrequired”object
Example
acceptedExample
shippedOrder item to update, identified by its id. Only the last entry is taken into account.
object
Example
4242Responses
Section titled “Responses”Success
object
Order updated, or Error. No update.
Example
{ "success": true, "message": "Order updated"}Missing or wrong API credentials.
No order of yours has this ID, or status / fulfillment_status is not a valid value.