PUT request to update order succeeds but order is not update on store

WMatos
New Member
1 0 0

Hello everyone!

I am sending a PUT request to update an order's shipping address. I'm using Postman to ensure the issue is not on my API. The request succeeds, I get a 200 with the updated order as part of the response body, however when I look at the order on the store backend, the order is not updated.

This is my request details:

URL: https://{{api_key}}:{{api_password}}@{{store_name}}.myshopify.com/admin/api/2019-04/orders/{{order_id}}.json

 

{
    "order":{
        "id":"0000000",
        "email":"email@gmail.com",
        "tags":"HC",
        "billing_address":{
        "province":"HC"
        },
        "shipping_address":{
        "first_name":"Test",
        "last_name":"Test",
        "address1":"08765678921",
        "address2":"",
        "zip":"POSTCODE",
        "city":"London",
        "phone":"00000000",
        "province":"HC"
        }
    }
}

 

Please note I replaced info such as email, tel, etc.

The response comes with 200, the updated order details with the newly updated shipping address.

This is the X-Request-ID:

 

00044421-d640-47d3-b704-c8f5b16e743d

 

But when I check the order via Shopify's backend (login into store > order > my order) the order has not been updated.

This is something I have successfully done in the past and the issue seems to be happening from the 19th of April. Before this, my private app was successfully creating and updating orders every day.

Any ideas of what's going on?

0 Likes
CalD
Shopify Staff
Shopify Staff
130 15 19

Hey @WMatos,

From the logs, it looks like there's a correction happening because the order already has a postal code that doesn't align with the "province" you're sending.

Also, on another note, the API version you're using (2019-04) has long since been unsupported, so you're being served the oldest still-available version (2020-04). I'd recommend reviewing the changelog since then and updating to the newest version if possible.

CalD | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes