Update an order (PUT)
PUT
/orders/{id}
const url = 'https://acme.mykreezalid.com/api/v1/orders/1';const options = { method: 'PUT', 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 PUT \ --url https://acme.mykreezalid.com/api/v1/orders/1 \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "status": "accepted", "fulfillment_status": "started" }'Same as PATCH /orders/{id}: only the fields you send are changed.
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
string
Example
{ "success": true, "message": "Order updated"}No order has this identifier, or status or fulfillment_status is not one of the values listed.