Skip to content

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

ContextUrl prefixDescription
status/We use this context to change the general order status
shipping/shippingTo change the shipping scope of an order
payment/paymentTo change the payment scope of an order

URL Parameters

  • id: Order id
  • context: Order status context from the list above

Body

Param NameParam TypeDescriptionRequired
statusstringAdd the slug of the existing status from the list of statusesyes

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": []
}