Catalog GraphQL
View as MarkdownQuery and mutate the commerce catalog subgraph for a store.
Store-scoped catalog GraphQL over HTTP. Use commerce.product:read to query and
commerce.product:write to mutate. See Commerce API Scopes.
Endpoint: POST /v2/commerce/stores/{storeId}/catalog-subgraph
Send the same store ID in the {storeId} path and the x-store-id header. The
header is required. If they differ, the subgraph uses the header.
Rate limit: Read RateLimit-Limit, RateLimit-Remaining, and
RateLimit-Reset on every response. On HTTP 429, wait for
RateLimit-Reset or Retry-After. See Handle rate limits.
For SimpleMoneyInput.value, send 1999 for $19.99 USD, not 19.99. Copy the sample
variables as-is (1000) or convert dollars to cents before calling.
The GraphQL domain model uses SKU / SKU group (not a Product type). PAT
scopes stay commerce.product:* for historical naming.
Sidebar is grouped by action/resource. Expand a resource, then Query
(commerce.product:read, 27 fields) or Mutation
(commerce.product:write, 108 fields).
Example query
queryRequires commerce.product:read. See sku for the full schema.
query GetSku($id: String!) {
sku(id: $id) {
id
name
status
}
}curl -X POST "https://api.godaddy.com/v2/commerce/stores/{storeId}/catalog-subgraph" \
-H "Authorization: Bearer $GODADDY_PAT" \
-H "Content-Type: application/json" \
-H "x-store-id: {storeId}" \
-d '{
"query": "query GetSku($id: String!) { sku(id: $id) { id name status } }",
"variables": { "id": "SKU_ID" }
}'Example mutation
mutationRequires commerce.product:write. See createSku for the full schema.
mutation CreateSku($input: CreateSKUInput!) {
createSku(input: $input) {
id
name
status
}
}HTTP reference
OpenAPI contract for the subgraph POST (headers, auth, response envelope):
Personal Access Token (PAT). Include as Authorization: Bearer $GODADDY_PAT. Required scopes: commerce.product:read, commerce.product:write.
In: header
Scope: commerce.product:read
Path Parameters
A universally unique identifier (UUID) in RFC-4122 format.
uuidHeader Parameters
Required store ID. Send the same value as {storeId} in the path. If they differ, the subgraph uses this header.
uuidRequest Body
application/json
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/catalog-subgraph" \ -H "x-store-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "query": "query GetSku($id: String!) { sku(id: $id) { id name status } }", "variables": { "id": "SKU_ID" } }'{ "data": {}, "errors": [ {} ]}Last updated on
How is this guide?