GraphQL Storefront API: Orders (beta)
GraphQL Storefront API: Orders (beta)
GraphQL Storefront API: Orders (beta)
The GraphQL Storefront orders object schema can power requests to your headless storefront or Stencil theme supplying you with instant access to your Orders storefront data. To learn more about how the BigCommerce Storefront graph works, see GraphQL Storefront API overview.
In this document, you can learn how to use queries and operation types to fetch order data using the BigCommerce Storefront graph. Create arguments for fields like filtering orders by entity_Id. You’re encouraged to read on and put these example queries into practice by using the BigCommerce GraphQL Playground.
orders detailUse the orders object type to fetch data in order to display the orders and details on the storefront graph.
Use the GetAllOrders query field to fetch all orders for a specific customer. You can get a customer’s order history, and get details like:
The following features are coming soon
order detailsUse the order object type to get detailed information on the storefront graph.
Use the GetOrderDetails field query to fetch order details like:
Note: Don’t forget to include cursor pagination to refine the fetched information.
Use your bearer token to perform the example queries on your storefront instance in the next section.
To learn more about authenticating requests to the GraphQL Storefront API, see Authenticating requests to the GraphQL Storefront API.
Before running the example queries, you will need to sign in as a customer for the queries to work.
In this example, the query is set up to return a filtered list of all orders with a COMPLETED status.
In this example, the query is set up to get details for order #106. Use entityId to query by customer.
In this example, the query is set up to get a metafield for order #102. Use entityId to query by order.
In this example, the query is set up to get metafields for a customer. Ensure the customer is logged-in.
Join our Developer community to share your feedback with us in the BigCommerceDevs Slack or on our Discord server.