Admin GraphQL API / 2026-07

Order object now has the
cartToken field

You can now retrieve the token tied to the "cart" that generated an order directly from the GraphQL Admin API. A field that returns the same value as the REST Admin API's cart_token .

On this page
  1. What changed (in 30 seconds)
  2. How it works: the cart token carries over to the order
  3. cart_token in REST and cartToken in GraphQL
  4. How to write the query (example)
  5. 5 key points for developers
  6. 3 practical use cases
  7. A one-line summary for your pitch

1What changed

In the GraphQL Admin API's Order object, a cartToken field has been added.
What you get back is "the token of the cart from which the order was created." This is the long-standing REST Admin API field cart_token withthe same value.
REST only

Before

The token that links a cart to an order was only available from the REST Admin API's cart_token . Even if you had standardized on GraphQL, you still had to use REST alongside it just for this one value.

Going forward

Order.cartToken can now be retrieved directly from GraphQL. Because it returns the same value as in REST, you can move your existing reconciliation logic straight over to the GraphQL side.

2How it works: the cart token carries over to the order

Cart created token = abc123... A unique ID for the shopping cart Purchase Order is placed Order record created cartToken = abc123... Keeps the same token GraphQL Admin API query { order { ... } } cartToken ← NEW Looked up in reverse from the order The cart and the order, matched by the same key
What cartToken does : An ID that links "which cart became this order." Even after the order is placed, the token issued at the cart stage remains on the Order side. This lets you tie the cart (before purchase) and the order (after purchase) together with the same key.

3REST's cart_token and GraphQL's cartToken

ItemREST Admin APIGraphQL Admin API
Field name cart_token(snake_case) cartToken(camelCase)
Where it appears Order resource Order Object
Returned value Same Token of the cart that created the order
Availability Available previously Newly added
API version Not specified The changelog tag is 2026-07
The token's format and length, and what the value becomes (whether null) for orders not created via a cart (such as manually created, POS, or draft-originated orders), are not specified in the changelog. Before implementing, verify against the official reference and a sandbox for the target API version.

4How to write the query (illustrative)

Since the changelog includes no query example, the following is a general illustration of how to fetch the new field on the Order object. Verify the actual field structure against the reference for the target version.

query { order(id: "gid://shopify/Order/123456789") { id name cartToken # ← added here. Same value as REST's cart_token } }
The REST call that until now had been kept solely to obtain cart_token can now be consolidated into GraphQL. It's enough to add, to the same query you use to fetch the order list, cartToken as a single line.

5Five points engineers should keep in mind

REST GQL

1. The value is exactly identical to REST

cartToken returns the same value as REST's cart_token . Only the naming becomes camelCase; matching logic and compatibility with stored data remain intact.

2026-07

2. The version is the 2026-07 tag

The changelog tag is 2026-07. To use it, you must specify this version or later. Note that apps pinned to an older version may not see it yet.

3. You can consolidate your REST dependency

Code that used REST alongside GraphQL solely for this value can be moved to GraphQL. This reduces dual-API setups and unifies authentication and rate limiting into a single path.

null ?

4. Behavior for non-cart orders is undocumented

What the value becomes (whether it turns null) for "orders that don't go through a cart"—such as manually created, POS, or draft-originated orders—is, according to the changelog,not specified. It's safest to add handling that assumes null.

5. A bridging key between the cart (pre-purchase) and the order (post-purchase)

cartToken can serve as a common key linking "same cart → same order." It's well suited for later JOINing confirmed orders with the logs and behavioral data accumulated at the cart stage. The token itself is not a confidential value, but since it's an ID that could let someone uniquely infer an order, handle it with care when writing logs.

6Three use cases you can apply to your work

Cart → order conversion
USE CASE 1

Reconcile the cart-abandonment-to-purchase funnel with GraphQL alone

Challenge
You want to link cart-stage behavioral data with confirmed orders, but to get the join key cart_token , you had to call REST through a separate path, duplicating the aggregation pipeline.
Solution
To the order-fetch query, add cartToken , then JOIN it with the token in your cart-side logs. Reconstruct which cart became which order from the GraphQL response alone.
Impact
Cart-to-purchase conversion analysis is completed with a single API, making it easy to measure the effect of abandoned-cart initiatives.
Technical notes
The value is the same as REST's cart_token , so you can reuse your existing reconciliation table as is. Handle it on the assumption that it can be null for non-cart orders.
REST GraphQL Consolidation
USE CASE 2

Remove the "last REST dependency" in a REST → GraphQL migration project

Challenge
You're migrating order integration to GraphQL, butcart_token alone wasn't available in GraphQL, forcing you to keep REST, so the migration couldn't be fully completed.
Solution
To the order query, add cartToken and retire the REST call. Unify authentication, rate control, and error handling into a single GraphQL path.
Impact
The maintenance burden of dual APIs drops and rate-limit management becomes simpler, letting you close out the migration project.
Technical notes
Update the target app's API version to 2026-07 or later before switching over. If you stay pinned to an old version, the field won't be visible.
key
USE CASE 3

Unify the order-linking key with external BI / data platforms

Challenge
You want to later join Shopify orders with the cart tokens held in GA4, your own DWH, and cart-measurement tools, but the order-side key wasn't available in GraphQL.
Solution
In your order-sync batch, also fetch cartToken and save it, making it the common key for reconciliation with the cart token on the external platform side.
Impact
You can track ad click → cart → order with a consistent ID, improving attribution accuracy.
Technical notes
The token is an ID that can uniquely identify an order. Decide its handling scope when integrating with BI or forwarding logs. Since the token format isn't documented in the changelog, keep it as a string.

7A one-line summary for your pitch

"The token of the cart that created the order (cartToken) is now in the GraphQL Admin API's Order can be retrieved directly from.
The value is identical to REST's cart_token , soyou can consolidate cart-to-order reconciliation into GraphQL, reducing your reliance on REST by one."