Access and endpoint
GraphQL queryDelta syncVariant prices
All requests go through the Countera GraphQL endpoint:
POST https://{your-countera-domain}/graphql
Content-Type: application/json
Authorization: Bearer {token}
Authenticate first using the login mutation documented in Authentication and bearer tokens.
GraphQL query
The external product price delta API is exposed through the public GraphQL field externalProductPrices.
query ExternalProductPrices(
$variantId: ID
$locationId: ID
$variantUpdatedSince: DateTime
$page: Int
$size: Int
) {
externalProductPrices(
variantId: $variantId
locationId: $locationId
variantUpdatedSince: $variantUpdatedSince
page: $page
size: $size
) {
page
totalRecords
variants {
variantId
name
upc
ean
sku
sellUomCode
locationId
basePrice
salePrice
currency
}
}
}
Provide either variantId for a direct lookup or variantUpdatedSince for a delta sync. If neither is supplied, the API returns an error.
Delta sync request
Use this mode to retrieve variants changed after the last successful sync cursor. The cursor should be an ISO-8601 instant in UTC.
curl -X POST "https://api.example.countera.ai/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $COUNTERA_TOKEN" \
-d '{
"query": "query ExternalProductPrices($locationId: ID, $variantUpdatedSince: DateTime, $page: Int, $size: Int) { externalProductPrices(locationId: $locationId, variantUpdatedSince: $variantUpdatedSince, page: $page, size: $size) { page totalRecords variants { variantId name upc ean sku sellUomCode locationId basePrice salePrice currency } } }",
"variables": {
"locationId": "0c59b311-9af6-41d9-8b79-8b855a963efa",
"variantUpdatedSince": "2026-09-27T00:00:00Z",
"page": 0,
"size": 200
}
}'
Variables
{
"locationId": "0c59b311-9af6-41d9-8b79-8b855a963efa",
"variantUpdatedSince": "2026-09-27T00:00:00Z",
"page": 0,
"size": 200
}
Response
{
"data": {
"externalProductPrices": {
"page": 0,
"totalRecords": 1284,
"variants": [
{
"variantId": "b044f02c-c945-4330-bed6-c7152c42dace",
"name": "Banana Plantain per lb",
"upc": "100000078150",
"ean": null,
"sku": "FP1060",
"sellUomCode": "LB",
"locationId": "0c59b311-9af6-41d9-8b79-8b855a963efa",
"basePrice": 0.99,
"salePrice": null,
"currency": "USD"
}
]
}
}
}
Single variant request
Use this mode when your system already knows the Countera variant id and needs the current price row for that variant. You may include locationId to return only that store's price.
curl -X POST "https://api.example.countera.ai/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $COUNTERA_TOKEN" \
-d '{
"query": "query ExternalProductPrices($variantId: ID!, $locationId: ID) { externalProductPrices(variantId: $variantId, locationId: $locationId) { page totalRecords variants { variantId name upc ean sku sellUomCode locationId basePrice salePrice currency } } }",
"variables": {
"variantId": "b044f02c-c945-4330-bed6-c7152c42dace",
"locationId": "0c59b311-9af6-41d9-8b79-8b855a963efa"
}
}'
Response
{
"data": {
"externalProductPrices": {
"page": 0,
"totalRecords": 1,
"variants": [
{
"variantId": "b044f02c-c945-4330-bed6-c7152c42dace",
"name": "Banana Plantain per lb",
"upc": "100000078150",
"ean": null,
"sku": "FP1060",
"sellUomCode": "LB",
"locationId": "0c59b311-9af6-41d9-8b79-8b855a963efa",
"basePrice": 0.99,
"salePrice": null,
"currency": "USD"
}
]
}
}
}
Request fields
| Argument | Type | Required | Description |
|---|---|---|---|
variantId | ID | Conditional | Countera product variant UUID. If supplied, the API returns prices for this variant. |
locationId | ID | No | Store/location UUID. When supplied, returns only the matching store price. When omitted, returns all available store price rows or the global variant price. |
variantUpdatedSince | DateTime | Conditional | UTC ISO-8601 timestamp used for delta sync. Required when variantId is omitted. |
page | Int | No | Zero-based page number for delta sync. Defaults to 0. |
size | Int | No | Page size for delta sync. Defaults to 200. Maximum accepted size is 500. |
variantId or variantUpdatedSince. Sending neither is invalid.
Response fields
| Field | Type | Description |
|---|---|---|
page | Int | Zero-based page number returned by the API. |
totalRecords | Long | Total matching product records for the request. For direct variant lookup, this is the number of returned variant price rows. |
variants | ExternalProductPrice[] | List of variant price rows for the requested page or variant lookup. |
variants[].variantId | ID | Countera product variant UUID. |
variants[].name | String | Variant display name or variant name. |
variants[].upc | String | Variant UPC, when available. |
variants[].ean | String | Variant EAN, when available. |
variants[].sku | String | Countera SKU. |
variants[].sellUomCode | String | Selling unit of measure code, such as EA or LB. |
variants[].locationId | ID | Store/location UUID for store-scoped price rows. May be null for global variant price rows. |
variants[].basePrice | Float | Primary selling price. ESL integrations should use this as the shelf price. |
variants[].salePrice | Float | Optional promotional sale price from the price row, when populated. |
variants[].currency | String | Currency code, normally USD. |
Errors
| Condition | Expected result | Resolution |
|---|---|---|
| No token | Request rejected as unauthenticated. | Call login and pass the bearer token. |
No variantId and no variantUpdatedSince | GraphQL error from pricing service. | Provide one of the two required filters. |
Unknown variantId | variants is empty and totalRecords is 0. | Confirm the variant id exists and is active in Countera. |
Sync guidance
- Use UTC timestamps for
variantUpdatedSince, for example2026-09-27T00:00:00Z. - Advance your cursor only after processing the full page successfully.
- Use
pageandsizefor backfills or large change windows. - For store-specific ESL systems, always send
locationIdso you receive the price for that store only. - Use
basePriceas the canonical shelf price unless Countera explicitly instructs your integration to usesalePrice.
