Update Order Status
Endpoint: https://api.youcan.shop/orders/{id}/status/{context}
Method: PUT
Required Scopes
edit-orders
Note
To update the status of an order we have to follow these steps below :
- Specify the order id that meant to be updated
- Add the status context in the url prefix
- Provide the status slug with it's context from the custom statuses list
*Note: If you provide a non existent slug from the statuses list, we will default back to the slug as status label
Context | Url prefix | Description |
---|---|---|
status | / | We use this context to change the general order status |
shipping | /shipping | To change the shipping scope of an order |
payment | /payment | To change the payment scope of an order |
URL Parameters
id
: Order idcontext
: Order status context from the list above
Body
Param Name | Param Type | Description | Required |
---|---|---|---|
status | string | Add the slug of the existing status from the list of statuses | yes |
Response
[200] Status is successfully updated
json
{
"status": 200,
"detail": "Status is successfully updated",
"meta": []
}
[404] Order not found
json
{
"status": 404,
"detail": "order not found",
"meta": []
}