Sending to Shopify API 406 error (update order)

Hello Parabola users,

I’m trying to update Shopify order email adresses. It should be rather simple.
As Shopify intgration does not allow to update an order, I have to use “Send to API” method.

However I’m not able to update anything, getting a 406 (not acceptable) error.

API request looks like this.

{
“data”: {
“order”: {
“email”: “example@web.com”,
“id”: valid-order-id
}
},
“headers”: {
“Content-Type”: “application/json”
},
“method”: “PUT”,
“url”: “https://xxx:xxx@xxx.myshopify.com/admin/api/2020-10/valid-order-id.json
}

Anyone could shed some light on this, please?

I suspect data should not be encapsulated with “data” as read in Shopify docs:

Change an order’s email address
PUT /admin/api/2020-10/orders/450789469.json
{
“order”: {
“id”: 450789469,
“email”: “a-different@email.com
}
}

Have a nice day,

Hello @Francois_Prigent,

Looks like you’re pretty close!

As you’ve noted, Shopify’s API docs mention the API PUT request would include /admin/api/2020-10/orders/450789469.json in the API Endpoint URL, where 450789469 would be changed to the valid-order-id, or the column’s name (the one with these IDs in it) wrapped in curly braces like {id}.


The API request you mentioned trying showed a section that likely needs adjusting:

This API request would need to include /orders/ in that API Endpoint URL for the Send to an API step to connect. Can you try updating that API export step with this API Endpoint URL?:
https://xxx:xxx@shopify-store-name.myshopify.com/admin/api/2020-10/orders/{id column name}.json


Should be a quick fix. Let us know how that works out for you!

1 Like

Hello,

It worked like a charm :slight_smile: Thanks for helping out.

1 Like