Draft Order API

Topic summary

Topic: Retrieving Shopify Draft Orders filtered by customer ID.

  • The requester wants an endpoint like /admin/api/2023-07/draft_orders.json?customer_id={customer-id} to get draft orders for a specific customer.
  • Current capability: The Shopify Draft Orders API returns a list of all draft orders; it does not support filtering by customer_id via query parameters.

Latest guidance/outcome:

  • There is no direct URL or query parameter to fetch draft orders by customer ID.
  • Workaround: Fetch all draft orders from /admin/api/2023-07/draft_orders.json and filter client-side by the customer object (e.g., draft_order.customer.id matching the target customer ID).

Status:

  • Limitation acknowledged; no server-side filter provided in the API as of version 2023-07.
  • Discussion effectively concluded with the workaround; no additional action items or API changes indicated.
Summarized with AI on January 18. AI used: gpt-5.

Hello Hope you are doing well,

I make code for get Draft orders in Jason Format, I have successfully get the all orders in Jason?

can you please help me to get customer ID based get all orders?

API URL: /admin/api/2023-07/draft_orders.json

I wish to use like this: /admin/api/2023-07/draft_orders.json?customer_id={customer-id}

Can you please provide URL for get draft orders User ID wise?

Thank you in Advance!!!

Hi Devsinfluencer,

Unfortunately it looks like the Shopify Draft Orders API does not support fetching draft orders by a customer ID directly from the endpoint URL. It only provides a list of all draft orders.

However, you could fetch all draft orders and then process the data on your side to filter out the orders relevant to the particular customer ID.

Hope this helps!

1 Like