Create Order REST API is returning 200 status code but no response body or not creating an order

sreddy
Visitor
1 0 1

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": []
}

Screenshot 2023-08-23 at 12.00.11 AM.png

Replies 5 (5)

admchrs1
Tourist
9 0 3

Have the same problem but with price rules.

 

Uhrick
Shopify Partner
433 68 98

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?

Shopify Developer
Hire me for theme customizations at ricardomsilvestre@outlook.com or Upwork
Was my answer helpful to you? Please like or mark as solution
admchrs1
Tourist
9 0 3

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?

Uhrick
Shopify Partner
433 68 98

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

Shopify Developer
Hire me for theme customizations at ricardomsilvestre@outlook.com or Upwork
Was my answer helpful to you? Please like or mark as solution

edwinso
Shopify Partner
2 0 0

I have the same problem but to load images, any ideas?