Join us today @ 1pm EDT for an AMA with 2H Media: Holiday Marketing for Your Shopify Store and have your marketing questions answered by marketing experts 2H Media | Plus watch the 2H Media AMA Livestream on Twitch!

Get order using the "order_number" or "name" field with either REST or GraphQL

Get order using the "order_number" or "name" field with either REST or GraphQL

Zelf
Shopify Partner
40 0 17

In the past you could get an order using the...

 

orders.json?name=123456&status=any

..."orders.json" REST endpoint with parameters. In fact, using API 2023-01 this still works, but returns a deprecated notice. I've searched the Customers and Order API notes for both REST and GraphQL, but I don't see any options to get an order using the "order_number" or "name" field in the Order JSON resource object.

 

Any devs or Shopify devs, in the community, that can point me to documentation on how to do this or is the only way to do this via the Order "id" field? The problem is, in my app, users would never enter the "id", they would enter the "order_number".

 

I guess I could create a map between order id's and order number's to reference when searching by order number so I could provide the order "id", but it seems odd that there is no documentation to search by the common "order_number" or "name" field in the Order JSON resource object? If there is not, Shopify, this should be at the top of the features to add list. The order number is likely the most common field in the Order JSON resource object that humans use to find orders. It needs to be in Order API, please.

Replies 0 (0)