Guys I want to update order status using API. I am using this api to change the order status but it's not working:


"status" : "Out-for-delivery",
"entity" : 1,
"items": {
        "order_id" : 1

Any help will be appreciated.


If you look at the swagger api documents (either on your local machine at /swagger or at the devdocs). You should find the API V1/orders. If you are using your local version you will also have the button to try to calls direct from swagger which is nice for debugging. From looking through the documents you should be able to post something like the following to the api.

  "entity": {
    "entity_id": 0,
    "status": "string"

Remember to replace the entity_id with the correct order id and the status with the status you would like to change to.

  • This will create problems with increment_id (as experienced in Magento 2.2) - order's increment id will be changed (from scope 1 1000000005, to scope 0 (admin) 000000008). – epson121 Jan 4 '18 at 12:43

You can do this:

PUT /V1/orders/create

'entity' => [
                'entity_id'=> 1,
                'increment_id' => '000000001',
                'status'=> 'processing',

You currently (v 2.1.*) get the same result with calls:

PUT /V1/orders/create


POST /V1/orders



I think a better answer is to use the following api entry point

("/rest/V1/orders/{orderId}/comments", Method.POST);

pass the StatusHistory object in the post body, setting the appropriate fields to update the order status.

{ "statusHistory": { "comment": "string", "createdAt": "string", "entityId": 0, "entityName": "string", "isCustomerNotified": 0, "isVisibleOnFront": 0, "parentId": 0, "status": "string", "extensionAttributes": {} } }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.