When I try to creating an order through shopify API always return an empty order list

When I call the admin/api/2024-01/orders.json to create an order, it always returns a response with 200 status and an empty order list.

Request:

{
“order”: {
“email”: “vendorsupport@xxx.com”,
“inventory_behaviour”: “decrement_obeying_policy”,
“line_items”: [{
“variant_id”: “46924554109270”,
“price”: 473.33,
“quantity”: 1
}],
“test”: false,
“shipping_address”: {
“first_name”: “xxxxxx”,
“last_name”: “xxxxx”,
“address1”: “xxxxx”,
“city”: “xxxxx”,
“country”: “xxxxxx”,
“province”: " ",
“zip”: “3000”,
“phone”: " "
},
“billing_address”: {
“first_name”: “xxxxxx”,
“last_name”: “xxxxxx”,
“address1”: “xxxxxxxx”,
“city”: “xxxxxxxx”,
“country”: “xxxxxxxxx”,
“province”: " ",
“zip”: “3000”,
“phone”: " "
},
“customer”: {
“first_name”: “xxxxxxxxx”,
“last_name”: “xxxxxxxx”,
“email”: “vendorsupport@xxx.com
},
“name”: “6727”
}
}

Response:

{
“orders”:
}

Anyone know what’s wrong with this?

Thanks for your help.

Hi,

as this is a developer focussed question, you might have more luck in the new Shopify Dev/Partner community: https://community.shopify.dev/
It launched a few months ago, and Shopify itself is working hard on making it make sense and active :slightly_smiling_face:

In addition to the information that you are using Postman to send the request, additional information could help resolve your issue:

  • an example JSON payload

  • the other parts of the request in addition to the body (authorization, params, and headers)

If you have resolved your issue already, it would be great if you can share what did the trick, so others can benefit from it.

Cheers

Joda