Discussing APIs and development related to customers, discounts, and order management.
I am trying to create an Order using the Admin REST API. The API is returning the 200 status code instead of 201, and also not creating an order in the Shopify store, and not getting any error.
I am using this Shopify API docs https://shopify.dev/docs/api/admin-rest/2023-07/resources/order#post-orders
Can someone please help to root cause the issue? Is there any issue with the Shopify Admin Order Rest API?
Below is the request body:
{ "order": { "line_items": [{ "title": "EatSmart Precision GetFit Body Fat Scale", "price": 64.89, "quantity": 1 }], "shipping_address": { "address1": "110 Cedar St", "address2": "Apt 12", "city": "Austin", "country": "USA", "first_name": "Testing FN", "last_name": "Testing LN", "province": "Texas", "zip": "78727", "name": "Customer Name", "country_code": "USA", "province_code": "TX" }, "transactions": [{ "kind": "sale", "status": "success", "amount": 64.89 }], "currency": "USD" } }
Below is the response I am getting:
{ "orders": [] }
Have the same problem but with price rules.
Hi there, were you able to solve this? I seem to recall that there was some other access scope you needed to clear other than the write_orders one. Did you take a look at that?
Hi, I thought that might be the problem so I tried creating an access token with only the access scopes mentioned in the api documentation and there was no problem (with my store, the problem is on my client's store). So no problem when I use it on my store, but doesn't work with my client's store (same access scopes etc). So I'm a bit lost... Do you have a link to the issue, that way I can have a look?
I don't have a specific link. If I'm not mistaken this was something I've read at some point in either the documentation or as an error in my app. But, if I remember correctly, for me, when I was getting 200 was because my request was going through, but my scope was lacking
I have the same problem but to load images, any ideas?