Stock not decrementing when order created using API

New Member
4 0 0

Hello!

 

I am currently encountering an issue with the create order endpoint in the API not decrementing stock. I have set the `inventory_behaviour` option to `decrement_obeying_policy` but this is having no effect.

 

The application I am working on has a slightly unique usecase as the order is created traditionally through a Shopify website and then we use that order to create the same order in a different shop.

 

Here is a gist of the request data that I am passing: https://gist.github.com/cjquinn/6bfec31aaae3bc10d29f01913641c082

 

Any help would be much appreciated!

0 Likes
Highlighted
Shopify Staff
Shopify Staff
297 32 61

Hey there,

 

I took a look at the gist you posted as well as the product inventory history, and see that the stock was decremented when order #1019 was placed.Screen Shot 2019-05-27 at 3.00.10 PM.png

 

What data were you referencing for the inventory level after the order was placed?

0 Likes
New Member
4 0 0

Hello!

 

Thanks for replying.

 

The stock level does decrement on the shop that is was created. The issue is that when we create that order on another shop using the API call the stock doesn't decrement there.

 

I've created a diagram that hopefully helps illustrate the setup.

 

application_setup.png

0 Likes
New Member
4 0 0

Any advise on this would be much appreciated :)

0 Likes
Shopify Staff
Shopify Staff
297 32 61

Hey @cjquinn, can you please provide me with some of the `X-Request-Id` response headers for the API order create calls which aren't decrementing properly? It'll allow me to have a closer look at this. Thanks!

0 Likes
New Member
4 0 0

Thanks @Zameer here it is - "8a379f4a-6350-45d6-94a0-799e77153d4c"

0 Likes
Tourist
3 0 1

@Zameer Christy's actually now left our company so I'll be following up on this query. Have you managed to look at this at all yet? We're really keen to get this fixed ASAP, if we can. 

 

Tom

0 Likes