Update an order
PATCH
/orders/{id}
const url = 'https://acme.mykreezalid.com/api/v1/orders/1';const options = { method: 'PATCH', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"status":"accepted","fulfillment_status":"started"}'};
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/v1/orders/1 \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "status": "accepted", "fulfillment_status": "started" }'Updates the fields you send and leaves the others unchanged. You may also send them wrapped in an order key. No notification is sent: see Notifications. Check success in the response.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Order’s unique identifier
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
status
string
fulfillment_status
string
refusal_reason
Why the order was declined
string
tracking_number
string
order_items
Changes to items of the order, each named by its id; items is accepted too. Only the last entry of the list is applied, so send one item per request. Items of other orders are ignored.
Array<object>
object
id
required
Identifier of the order item
integer
status
string
refusal_reason
string
Example
{ "status": "accepted", "fulfillment_status": "started"}Responses
Section titled “Responses”Whether the order has been updated
Media typeapplication/json
object
success
boolean
message
Order updated, or Error. No update. when nothing was saved
string
Example
{ "success": true, "message": "Order updated"}No order has this identifier, or status or fulfillment_status is not one of the values listed.