Storefront GraphQL is the headless API for Tringify stores. One endpoint per store reads the catalog, runs carts and wishlists, submits and votes on reviews, authenticates customers, and resolves localization. It is the same runtime context hosted storefronts render from, so a headless build and a hosted theme never disagree about a price, a stock state, or a review count.
The endpoint#
POST https://<your-store-domain>/graphql
Every store exposes GraphQL on its own domain. Requests carry a Storefront access token; the token pins the storefront and the API version, so the endpoint never changes as versions evolve.
Authentication#
Header |
What it is |
When |
|---|---|---|
X-Storefront-Access-Token |
The storefront access token (issued in StoreAdmin). Pins storefront + API version. |
Every request |
X-Tringify-Session-Token |
A visitor session from visitorSessionCreate — the guest identity carts, wishlists, votes, and review photos bind to. |
Guest state |
X-Customer-Access-Token |
A customer token from customerLogin — logged-in state, required by stores that gate reviews behind purchases. |
Customer state |
Your first cart#
Create a visitor session, query products, and add one to the cart. You can run all three from the Developer Portal playground before writing any client code.
mutation Start {
visitorSessionCreate {
token
userErrors { code message }
}
}
# then, with X-Tringify-Session-Token set:
query FirstProducts {
products(first: 5) {
edges { node { id title slug } }
}
}
mutation FirstCartAdd($input: AddToCartInput!) {
addToCart(input: $input) {
cart { totalItems }
userErrors { code field message }
}
}
What the API covers#
Area |
What you get |
|---|---|
Catalog |
Products, variants, collections, categories, vendors, brands, pages, policies, blog — localized, market-priced. |
Cart |
Guest and customer carts over the same command boundary hosted stores use. |
Wishlist |
Session or customer wishlists, honoring the store's guest policy. |
Reviews |
Approved reviews with photos and star aggregates; submit and vote — every store review setting enforced server-side. |
Customers |
Login, sessions, account state; customer tokens unlock purchase-gated features. |
Localization & consent |
Locales, countries, currencies, consent capture — the storefront's legal surface. |