Skip to content

GraphQL

Read the store, products, collections, sellers, reviews, payment methods and articles in one request to POST /graphql.

With GraphQL you fetch the store, a product and its related products in one request, and you get back only the fields you select. The schema is read-only: carts, checkout, customers and every write go through REST.

Quick start

Send the query with POST and put the store's slug or domain in x-Store-Domain:

Terminal
curl --request POST "https://storefront.ecomiq.pe/graphql" \
  --header "Content-Type: application/json" \
  --header "x-Store-Domain: my-store" \
  --data-binary '{
    "query": "query Store { store { id name currency language } }"
  }'
Response
{
  "data": {
    "store": {
      "id": "7204558912004325301",
      "name": "My store",
      "currency": "PEN",
      "language": "es"
    }
  }
}

The endpoint takes one operation per request, always over POST. IDs are opaque strings: store them and send them back unchanged.

Queries

GraphQL or REST

ToUse
Combine store, seller and products in one responseGraphQL
Request only some fields of a resourceGraphQL
Search products with filters and facetsGraphQL or REST
Create or update a cart, checkout or customerREST
Read geography, tracking or analyticsREST
Work with OpenAPI or a Postman collectionREST

Next steps

Last updated:

On this page