Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVDOCS-6130: [update] #596

Merged
merged 5 commits into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions docs/storefront/graphql/orders.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# GraphQL Storefront API: Orders (beta)

<Callout type="info">
This feature is currently in beta and the following operation is only available to participants.
</Callout>

## Overview

The GraphQL Storefront `orders` object schema can power requests to your [headless](/docs/storefront/headless) storefront or [Stencil](/docs/storefront/stencil/start) 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](/docs/storefront/graphql).
Expand Down Expand Up @@ -47,6 +43,10 @@ To learn more about authenticating requests to the GraphQL Storefront API, see [

## Example queries

<Callout type="info">
Before running the example queries, you will need to [sign in as a customer](https://developer.bigcommerce.com/docs/start/authentication/graphql-storefront#signing-customers-in) for the queries to work.
</Callout>

### Get all orders and details

#### Filter by order status
Expand All @@ -56,7 +56,7 @@ In this example, the query is set up to return a filtered list of all orders wit
<Tab>
```graphql filename="Example query: Get all orders and details" showLineNumbers copy
query GetAllOrders {
site {
customer {
orders(filters: {status: COMPLETED}) {
edges {
node {
Expand All @@ -69,7 +69,6 @@ In this example, the query is set up to return a filtered list of all orders wit
node {
brand
entityId
imageUrl
name
productOptions {
name
Expand Down Expand Up @@ -98,7 +97,7 @@ In this example, the query is set up to return a filtered list of all orders wit
```graphql filename="Example response: Get all orders and details" showLineNumbers copy
{
"data": {
"site": {
"customer": {
"orders": {
"edges": [
{
Expand All @@ -114,7 +113,6 @@ In this example, the query is set up to return a filtered list of all orders wit
"node": {
"brand": "default",
"entityId": "1",
"imageUrl": "https://cdn11.bigcommerce.com/s-xyzfeyee1r/products/111/images/371/smithjournal1.1721236910.386.513.jpg?c=1null",
"name": "[Sample] Smith Journal 13",
"productOptions": [
{
Expand Down Expand Up @@ -179,7 +177,6 @@ In this example, the query is set up to get details for order #106. Use `entityI
node {
brand
entityId
imageUrl
name
subTotalListPrice {
currencyCode
Expand Down Expand Up @@ -267,7 +264,6 @@ In this example, the query is set up to get details for order #106. Use `entityI
"node": {
"brand": "default",
"entityId": 1,
"imageUrl": "https://cdn11.bigcommerce.com/s-xyzfeyee1r/products/111/images/371/smithjournal1.1721236910.386.513.jpg?c=1null",
"name": "[Sample] Smith Journal 13",
"subTotalListPrice": {
"currencyCode": "USD",
Expand Down Expand Up @@ -349,4 +345,4 @@ Join our [Developer community](/community) to share your feedback with us in the

### Community

* [Developer community](/community)
* [Developer community](/community)
Loading