Skip to content

Update one of your orders

PATCH
/orders/{id}
curl --request PATCH \
--url https://acme.mykreezalid.com/front_api/v1/orders/4242 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "status": "accepted", "fulfillment_status": "scheduled" }'

Updates an order of the signed-in member, who must be its customer or its vendor. PUT is accepted too and behaves the same. Send the fields to change, at the top level or wrapped in an order object. The customer may only set status to customer_confirmed. The vendor may set status to accepted, declined, shipped, service_provided, supplier_confirmed or canceled, and change fulfillment_status, tracking_number, shipping_carrier, refusal_reason, external_id, note, note_attributes, tags and meta_data; on items, status, refusal_reason and external_id. No amount can be changed. Any other field or status answers 403. Otherwise the response is 200 whether or not the order was saved: read success.

id
required
integer

Identifier of the order.

Example

4242
Media typeapplication/json
object
order

Optional wrapper: when present, the fields are read from it instead of the top level.

object
status

New status of the order: customer_confirmed for the customer, the others for the vendor.

string
Allowed values: accepted shipped service_provided customer_confirmed supplier_confirmed declined canceled
fulfillment_status

New fulfillment status of the order.

string
nullable
Allowed values: started scheduled prepared shipped in_transit available delivered executed canceled error
order_items

Vendor only. Items of the order to update, each identified by its id, with status, refusal_reason or external_id. items is accepted as an alias. Items that do not belong to the order are ignored.

Array<object>
object
id
required
integer
key
additional properties
any

Example

{
"status": "accepted",
"fulfillment_status": "scheduled"
}

Outcome of the update.

Media typeapplication/json
object
success

Whether the order was saved.

boolean
message

Order updated on success, Error. No update. otherwise.

string

Example

{
"success": true,
"message": "Order updated"
}

No signed-in member, or a field or status the member may not change (the message names it).

Media typeapplication/json

Error body returned by the Front API when it refuses a request.

object
code

HTTP status code, repeated in the body.

integer
status
string
message

Human-readable reason.

string

Example

{
"code": 403,
"status": "error",
"message": "Token not found in request"
}

The order does not exist, the signed-in member is neither its customer nor its vendor, or status or fulfillment_status holds an unknown value (the message lists the valid ones).