Attributes
Attributes define variant axes (Size: S/M/L, Color: red/blue) — every variant of a variable product is the cartesian product of its parent's attribute options.
List attributes with pagination
Lists attributes, 20 per page.
Admin API key (server-to-server). Issue via the dashboard at Settings → API keys. Plain-text key is shown once — store in a secret manager. Format: Authorization: Bearer brainerce_xxxxxxxxx.
In: header
Query Parameters
Only attributes imported from this platform code.
GLOBAL attributes belong to the store, PLATFORM attributes were imported from a platform.
"GLOBAL" | "PLATFORM"Text search on the attribute name.
Items per page. Default 20. Maximum 100.
201 <= value <= 1001-based page number.
11 <= valuecurl -X GET "https://api.brainerce.com/api/v1/attributes?platform=string&source=GLOBAL&search=string&limit=20&page=1"{
"data": [
{
"id": "clx1a2b3c4d5e6f7g8h9",
"accountId": "clx1a2b3c4d5e6f7g8h9",
"storeId": "clx1a2b3c4d5e6f7g8h9",
"name": "Color",
"displayType": "COLOR_SWATCH",
"source": "GLOBAL",
"platform": "SHOPIFY",
"externalId": "clx1a2b3c4d5e6f7g8h9",
"platformMetadata": {
"slug": "string",
"type": "string",
"orderBy": "string",
"hasArchives": true
},
"translations": {},
"isActive": true,
"deletedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"productCount": 15,
"options": [
{
"id": "clx1a2b3c4d5e6f7g8h9",
"attributeId": "clx1a2b3c4d5e6f7g8h9",
"name": "Black",
"value": "black",
"swatchColor": "#000000",
"swatchColor2": "#FFFFFF",
"swatchImageUrl": "https://cdn.example.com/swatches/black.png",
"source": "GLOBAL",
"platform": "SHOPIFY",
"externalId": "clx1a2b3c4d5e6f7g8h9",
"platformMetadata": {
"slug": "string",
"description": "string",
"productCount": 0
},
"translations": {},
"position": 0,
"isActive": true,
"deletedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
]
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 137,
"totalPages": 7
}
}{
"statusCode": 400,
"code": "VALIDATION_FAILED",
"message": "name should not be empty, price must be a positive number",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes"
}{
"statusCode": 401,
"code": "UNAUTHORIZED",
"message": "Invalid or expired credential",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes"
}{
"statusCode": 403,
"code": "INSUFFICIENT_SCOPE",
"message": "API key does not have the required scope: products:write",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes"
}{
"statusCode": 429,
"code": "RATE_LIMITED",
"message": "Too many requests",
"details": {
"retryAfterSeconds": 12
},
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/store"
}Create a new attribute
Supports Idempotency-Key header for safe retries.
Admin API key (server-to-server). Issue via the dashboard at Settings → API keys. Plain-text key is shown once — store in a secret manager. Format: Authorization: Bearer brainerce_xxxxxxxxx.
In: header
Header Parameters
Client-supplied key (a UUID v4 is the recommended form, max 255 characters) that makes this mutation safe to retry.
- Replay window: 24 hours. The first response for a key is cached; a retry inside the window with the same request body returns the original status and body without re-running the handler.
- Reusing a key with a different body returns
409 Conflictwithcode: "IDEMPOTENCY_KEY_REUSED". The request fingerprint (method + path + body hash) is compared against the stored one; a mismatch is refused rather than served the old response. - Keys are scoped to the calling credential and store — two API keys may safely use the same key value.
- Error responses are cached too, so a retry of a request that failed validation returns the same 400 immediately.
- Sending this header on a
GETreturns400withcode: "IDEMPOTENCY_KEY_NOT_SUPPORTED"— GETs are already idempotent. - Support is per-route and this parameter is the authoritative signal: a key sent to a route that does not declare it is accepted and silently ignored.
length <= 255Attribute name, for example Color or Size. Must be unique per store, source and platform.
How the storefront renders the options. DEFAULT is a plain text or dropdown list, COLOR_SWATCH fills a round button with swatchColor, IMAGE_SWATCH shows swatchImageUrl, MIXED_SWATCH picks image or color per option. Defaults to DEFAULT.
"DEFAULT""DEFAULT" | "COLOR_SWATCH" | "IMAGE_SWATCH" | "MIXED_SWATCH"GLOBAL for an attribute that belongs to the store (omit platform), PLATFORM for one imported from a platform (then platform is required).
"GLOBAL" | "PLATFORM"Platform code the attribute was imported from. Required when source is PLATFORM, rejected when source is GLOBAL.
Deprecated and ignored. The attribute always belongs to the store of the API key. Accepted only so clients that still send it are not rejected.
ID of the attribute on the source platform. Only meaningful for PLATFORM attributes.
Platform-specific data kept with the attribute as is. Free-form JSON object defined by the caller.
Whether the attribute is active. Defaults to true.
trueOptions to create together with the attribute.
curl -X POST "https://api.brainerce.com/api/v1/attributes" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "name": "Color", "source": "GLOBAL" }'{
"id": "clx1a2b3c4d5e6f7g8h9",
"accountId": "clx1a2b3c4d5e6f7g8h9",
"storeId": "clx1a2b3c4d5e6f7g8h9",
"name": "Color",
"displayType": "COLOR_SWATCH",
"source": "GLOBAL",
"platform": "SHOPIFY",
"externalId": "clx1a2b3c4d5e6f7g8h9",
"platformMetadata": {
"slug": "string",
"type": "string",
"orderBy": "string",
"hasArchives": true
},
"translations": {},
"isActive": true,
"deletedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"productCount": 15,
"options": [
{
"id": "clx1a2b3c4d5e6f7g8h9",
"attributeId": "clx1a2b3c4d5e6f7g8h9",
"name": "Black",
"value": "black",
"swatchColor": "#000000",
"swatchColor2": "#FFFFFF",
"swatchImageUrl": "https://cdn.example.com/swatches/black.png",
"source": "GLOBAL",
"platform": "SHOPIFY",
"externalId": "clx1a2b3c4d5e6f7g8h9",
"platformMetadata": {
"slug": "string",
"description": "string",
"productCount": 0
},
"translations": {},
"position": 0,
"isActive": true,
"deletedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
]
}{
"statusCode": 400,
"code": "VALIDATION_FAILED",
"message": "name should not be empty, price must be a positive number",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes"
}{
"statusCode": 401,
"code": "UNAUTHORIZED",
"message": "Invalid or expired credential",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes"
}{
"statusCode": 403,
"code": "INSUFFICIENT_SCOPE",
"message": "API key does not have the required scope: products:write",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes"
}{
"statusCode": 429,
"code": "RATE_LIMITED",
"message": "Too many requests",
"details": {
"retryAfterSeconds": 12
},
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/store"
}Get a single attribute by ID
Returns one attribute of this store.
Admin API key (server-to-server). Issue via the dashboard at Settings → API keys. Plain-text key is shown once — store in a secret manager. Format: Authorization: Bearer brainerce_xxxxxxxxx.
In: header
Path Parameters
Attribute ID
curl -X GET "https://api.brainerce.com/api/v1/attributes/string"{
"id": "clx1a2b3c4d5e6f7g8h9",
"accountId": "clx1a2b3c4d5e6f7g8h9",
"storeId": "clx1a2b3c4d5e6f7g8h9",
"name": "Color",
"displayType": "COLOR_SWATCH",
"source": "GLOBAL",
"platform": "SHOPIFY",
"externalId": "clx1a2b3c4d5e6f7g8h9",
"platformMetadata": {
"slug": "string",
"type": "string",
"orderBy": "string",
"hasArchives": true
},
"translations": {},
"isActive": true,
"deletedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"productCount": 15,
"options": [
{
"id": "clx1a2b3c4d5e6f7g8h9",
"attributeId": "clx1a2b3c4d5e6f7g8h9",
"name": "Black",
"value": "black",
"swatchColor": "#000000",
"swatchColor2": "#FFFFFF",
"swatchImageUrl": "https://cdn.example.com/swatches/black.png",
"source": "GLOBAL",
"platform": "SHOPIFY",
"externalId": "clx1a2b3c4d5e6f7g8h9",
"platformMetadata": {
"slug": "string",
"description": "string",
"productCount": 0
},
"translations": {},
"position": 0,
"isActive": true,
"deletedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
]
}{
"statusCode": 401,
"code": "UNAUTHORIZED",
"message": "Invalid or expired credential",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}"
}{
"statusCode": 403,
"code": "INSUFFICIENT_SCOPE",
"message": "API key does not have the required scope: products:write",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}"
}{
"statusCode": 404,
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}"
}{
"statusCode": 429,
"code": "RATE_LIMITED",
"message": "Too many requests",
"details": {
"retryAfterSeconds": 12
},
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/store"
}Update an attribute
Supports Idempotency-Key header for safe retries.
Admin API key (server-to-server). Issue via the dashboard at Settings → API keys. Plain-text key is shown once — store in a secret manager. Format: Authorization: Bearer brainerce_xxxxxxxxx.
In: header
Path Parameters
Attribute ID
Header Parameters
Client-supplied key (a UUID v4 is the recommended form, max 255 characters) that makes this mutation safe to retry.
- Replay window: 24 hours. The first response for a key is cached; a retry inside the window with the same request body returns the original status and body without re-running the handler.
- Reusing a key with a different body returns
409 Conflictwithcode: "IDEMPOTENCY_KEY_REUSED". The request fingerprint (method + path + body hash) is compared against the stored one; a mismatch is refused rather than served the old response. - Keys are scoped to the calling credential and store — two API keys may safely use the same key value.
- Error responses are cached too, so a retry of a request that failed validation returns the same 400 immediately.
- Sending this header on a
GETreturns400withcode: "IDEMPOTENCY_KEY_NOT_SUPPORTED"— GETs are already idempotent. - Support is per-route and this parameter is the authoritative signal: a key sent to a route that does not declare it is accepted and silently ignored.
length <= 255New attribute name. A rename is also applied to the attribute name stored on existing product variants.
How the storefront renders the options. DEFAULT is a plain text or dropdown list, COLOR_SWATCH fills a round button with swatchColor, IMAGE_SWATCH shows swatchImageUrl, MIXED_SWATCH picks image or color per option. Omit to leave unchanged.
"DEFAULT" | "COLOR_SWATCH" | "IMAGE_SWATCH" | "MIXED_SWATCH"Platform-specific data kept with the attribute as is. Free-form JSON object defined by the caller.
Whether the attribute is active.
Translated attribute name keyed by ISO locale code. Replaces the stored translations of the attribute.
curl -X PATCH "https://api.brainerce.com/api/v1/attributes/string" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "clx1a2b3c4d5e6f7g8h9",
"accountId": "clx1a2b3c4d5e6f7g8h9",
"storeId": "clx1a2b3c4d5e6f7g8h9",
"name": "Color",
"displayType": "COLOR_SWATCH",
"source": "GLOBAL",
"platform": "SHOPIFY",
"externalId": "clx1a2b3c4d5e6f7g8h9",
"platformMetadata": {
"slug": "string",
"type": "string",
"orderBy": "string",
"hasArchives": true
},
"translations": {},
"isActive": true,
"deletedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"productCount": 15,
"options": [
{
"id": "clx1a2b3c4d5e6f7g8h9",
"attributeId": "clx1a2b3c4d5e6f7g8h9",
"name": "Black",
"value": "black",
"swatchColor": "#000000",
"swatchColor2": "#FFFFFF",
"swatchImageUrl": "https://cdn.example.com/swatches/black.png",
"source": "GLOBAL",
"platform": "SHOPIFY",
"externalId": "clx1a2b3c4d5e6f7g8h9",
"platformMetadata": {
"slug": "string",
"description": "string",
"productCount": 0
},
"translations": {},
"position": 0,
"isActive": true,
"deletedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
]
}{
"statusCode": 400,
"code": "VALIDATION_FAILED",
"message": "name should not be empty, price must be a positive number",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}"
}{
"statusCode": 401,
"code": "UNAUTHORIZED",
"message": "Invalid or expired credential",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}"
}{
"statusCode": 403,
"code": "INSUFFICIENT_SCOPE",
"message": "API key does not have the required scope: products:write",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}"
}{
"statusCode": 404,
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}"
}{
"statusCode": 429,
"code": "RATE_LIMITED",
"message": "Too many requests",
"details": {
"retryAfterSeconds": 12
},
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/store"
}Delete an attribute
Supports Idempotency-Key header for safe retries.
Admin API key (server-to-server). Issue via the dashboard at Settings → API keys. Plain-text key is shown once — store in a secret manager. Format: Authorization: Bearer brainerce_xxxxxxxxx.
In: header
Path Parameters
Attribute ID
Header Parameters
Client-supplied key (a UUID v4 is the recommended form, max 255 characters) that makes this mutation safe to retry.
- Replay window: 24 hours. The first response for a key is cached; a retry inside the window with the same request body returns the original status and body without re-running the handler.
- Reusing a key with a different body returns
409 Conflictwithcode: "IDEMPOTENCY_KEY_REUSED". The request fingerprint (method + path + body hash) is compared against the stored one; a mismatch is refused rather than served the old response. - Keys are scoped to the calling credential and store — two API keys may safely use the same key value.
- Error responses are cached too, so a retry of a request that failed validation returns the same 400 immediately.
- Sending this header on a
GETreturns400withcode: "IDEMPOTENCY_KEY_NOT_SUPPORTED"— GETs are already idempotent. - Support is per-route and this parameter is the authoritative signal: a key sent to a route that does not declare it is accepted and silently ignored.
length <= 255curl -X DELETE "https://api.brainerce.com/api/v1/attributes/string" \ -H "Idempotency-Key: string"{
"statusCode": 401,
"code": "UNAUTHORIZED",
"message": "Invalid or expired credential",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}"
}{
"statusCode": 403,
"code": "INSUFFICIENT_SCOPE",
"message": "API key does not have the required scope: products:write",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}"
}{
"statusCode": 404,
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}"
}{
"statusCode": 429,
"code": "RATE_LIMITED",
"message": "Too many requests",
"details": {
"retryAfterSeconds": 12
},
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/store"
}Get attribute options
Returns the options of an attribute, ordered by position.
Admin API key (server-to-server). Issue via the dashboard at Settings → API keys. Plain-text key is shown once — store in a secret manager. Format: Authorization: Bearer brainerce_xxxxxxxxx.
In: header
Path Parameters
Attribute ID
Query Parameters
Only options imported from this platform code.
curl -X GET "https://api.brainerce.com/api/v1/attributes/string/options?platform=string"[
{
"id": "clx1a2b3c4d5e6f7g8h9",
"attributeId": "clx1a2b3c4d5e6f7g8h9",
"name": "Black",
"value": "black",
"swatchColor": "#000000",
"swatchColor2": "#FFFFFF",
"swatchImageUrl": "https://cdn.example.com/swatches/black.png",
"source": "GLOBAL",
"platform": "SHOPIFY",
"externalId": "clx1a2b3c4d5e6f7g8h9",
"platformMetadata": {
"slug": "string",
"description": "string",
"productCount": 0
},
"translations": {},
"position": 0,
"isActive": true,
"deletedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
]{
"statusCode": 401,
"code": "UNAUTHORIZED",
"message": "Invalid or expired credential",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}/options"
}{
"statusCode": 403,
"code": "INSUFFICIENT_SCOPE",
"message": "API key does not have the required scope: products:write",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}/options"
}{
"statusCode": 404,
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}/options"
}{
"statusCode": 429,
"code": "RATE_LIMITED",
"message": "Too many requests",
"details": {
"retryAfterSeconds": 12
},
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/store"
}Create an attribute option
Supports Idempotency-Key header for safe retries.
Admin API key (server-to-server). Issue via the dashboard at Settings → API keys. Plain-text key is shown once — store in a secret manager. Format: Authorization: Bearer brainerce_xxxxxxxxx.
In: header
Path Parameters
Attribute ID
Header Parameters
Client-supplied key (a UUID v4 is the recommended form, max 255 characters) that makes this mutation safe to retry.
- Replay window: 24 hours. The first response for a key is cached; a retry inside the window with the same request body returns the original status and body without re-running the handler.
- Reusing a key with a different body returns
409 Conflictwithcode: "IDEMPOTENCY_KEY_REUSED". The request fingerprint (method + path + body hash) is compared against the stored one; a mismatch is refused rather than served the old response. - Keys are scoped to the calling credential and store — two API keys may safely use the same key value.
- Error responses are cached too, so a retry of a request that failed validation returns the same 400 immediately.
- Sending this header on a
GETreturns400withcode: "IDEMPOTENCY_KEY_NOT_SUPPORTED"— GETs are already idempotent. - Support is per-route and this parameter is the authoritative signal: a key sent to a route that does not declare it is accepted and silently ignored.
length <= 255Option label, for example Red or XL. Unique per attribute, source, platform and externalId.
Optional value stored with the option, separate from the display name. Translatable per locale.
Swatch color as a CSS color string such as a hex code. Shown when the attribute displayType is COLOR_SWATCH or MIXED_SWATCH.
Second swatch color. When set, the swatch is drawn as a 50/50 split of swatchColor and swatchColor2 (for example black and white).
Swatch image URL. Shown when the attribute displayType is IMAGE_SWATCH, or MIXED_SWATCH for options that have an image. Upload via /v1/media first.
GLOBAL for an option that belongs to the store (omit platform), PLATFORM for one imported from a platform (then platform is required).
"GLOBAL" | "PLATFORM"Platform code the option was imported from. Required when source is PLATFORM, rejected when source is GLOBAL.
ID of the option on the source platform. Only meaningful for PLATFORM options.
Platform-specific data kept with the option as is. Free-form JSON object defined by the caller.
Sort position among the attribute options. Lower values come first.
00 <= valueWhether the option is active. Defaults to true.
truecurl -X POST "https://api.brainerce.com/api/v1/attributes/string/options" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "name": "Red", "source": "GLOBAL" }'{
"id": "clx1a2b3c4d5e6f7g8h9",
"attributeId": "clx1a2b3c4d5e6f7g8h9",
"name": "Black",
"value": "black",
"swatchColor": "#000000",
"swatchColor2": "#FFFFFF",
"swatchImageUrl": "https://cdn.example.com/swatches/black.png",
"source": "GLOBAL",
"platform": "SHOPIFY",
"externalId": "clx1a2b3c4d5e6f7g8h9",
"platformMetadata": {
"slug": "string",
"description": "string",
"productCount": 0
},
"translations": {},
"position": 0,
"isActive": true,
"deletedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"statusCode": 400,
"code": "VALIDATION_FAILED",
"message": "name should not be empty, price must be a positive number",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}/options"
}{
"statusCode": 401,
"code": "UNAUTHORIZED",
"message": "Invalid or expired credential",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}/options"
}{
"statusCode": 403,
"code": "INSUFFICIENT_SCOPE",
"message": "API key does not have the required scope: products:write",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}/options"
}{
"statusCode": 404,
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/attributes/{id}/options"
}{
"statusCode": 429,
"code": "RATE_LIMITED",
"message": "Too many requests",
"details": {
"retryAfterSeconds": 12
},
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/v1/store"
}