Unable to write Draft Orders to Shopify store

Unable to write Draft Orders to Shopify store

danfkelly
Shopify Partner
3 0 3

Hi there, 

 

I hope someone can give me any clues. 

 

I have an external Ruby on Rails application, and within my application I've set up an integration with a Shopify store. 

 

Through the building process, I've been using my Shopify Dev store to test everything. It all works well. I'm able to create Draft Orders with the Admin API, and then initiate a Shopify Checkout for users to pay, after which the order is created. When testing this in Insomnia, I send the query, get a 201 Success, and it returns the successfully created draft order. 

 

But now, it is time to test it all out in the actual Production Shopify store. In this store, I have all the required permissions, the exact same as in my Dev store. I am able to successfully fetch any data, like products and orders. But, I seem unable to write anything. When I try to create a draft order, instead of a 201 with the returned Draft Order, it produces a 200, and lists a heap of irrelevant old draft orders. When I try to create an Order with CreateOrder, I get a 404 Not Found. 

 

I have spoken to Support about this, and they reset the cache of the store, though that hasn't helped. I'm currently waiting for a reply from the Shopify Developer team, but in the meantime, thought I'd see if anyone can shed some light? 

 

The Production store is an older store (I think 8-10 years old), and they have thousands of Orders and Draft Orders in their database. Below is the Draft Order query that works in my Dev store, but not in the Production store. 

 

POST   /admin/api/2024-07/graphql.json

 

danfkelly_0-1747014595641.png

 

Thanks in advance to anyone who can contribute!

Replies 2 (2)
danfkelly
Shopify Partner
3 0 3

Hey Josh, 

 

Thanks for your message! 

 

Here are some other strange behaviours. I can successfully fetch anything using the REST API (products, draft orders, orders), but when using GraphQL to fetch, I get a 404 Not Found. So it seems like I'm currently limited to fetching with the REST API! 

As you suggested, I did try making small write requests, by adding a note to a pre-existing draft order. With GraphQL I just get 404 Not Found. Then with the REST API (PATCH), keep getting this error: 

danfkelly_0-1747093042267.png

 

I just also found out that the Production store has 37 Shopify apps installed. 

How would I see if other apps or integrations are intercepting my API calls? 

danfkelly
Shopify Partner
3 0 3

Thanks Josh! So I don't yet have such direct access to the Production store, but seems like I may have to. The company I'm integrating with have been somewhat conservative with permissions, and they have a busy online store, so I'd feel nervous about doing any toggling of their current apps. But, I might have to approach them about setting me up as a Staff on their store so that I can view the logs etc. Thanks a lot, I'll get back to you.