> For the complete documentation index, see [llms.txt](https://docs.spurtcommerce.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spurtcommerce.com/api-reference/store/product-discovery/attributes-and-variants.md).

# Attributes And Variants

Retrieve product attributes and variant options.

## Get Store specification definitions and attributes.

> Get Store specification definitions and attributes.\
> \
> \*\*Authentication:\*\* Public storefront request; tenant validation applies.\
> \
> \*\*Feature area:\*\* Product discovery\
> \
> \*\*Implementation source:\*\* \`src/api/store/controllers/ProductAttributeController.ts\`\
> \
> \*\*Request example provenance:\*\* Response wrapper and top-level fields from source @api comment; details abbreviated.\
> \
> \*\*Response example provenance:\*\* Response wrapper and top-level fields from source @api comment; details abbreviated.\
> \
> \> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.

```json
{"openapi":"3.0.3","info":{"title":"SpurtCommerce Store API","version":"6.0.0"},"tags":[{"name":"Attributes and variants","description":"Retrieve product attributes and variant options."}],"servers":[{"url":"https://api.example.com","description":"Replace with your SpurtCommerce API host. Paths include the /api prefix."}],"paths":{"/api/store-product-attributes":{"get":{"operationId":"getApiStoreProductAttributes","summary":"Get Store specification definitions and attributes.","description":"Get Store specification definitions and attributes.\n\n**Authentication:** Public storefront request; tenant validation applies.\n\n**Feature area:** Product discovery\n\n**Implementation source:** `src/api/store/controllers/ProductAttributeController.ts`\n\n**Request example provenance:** Response wrapper and top-level fields from source @api comment; details abbreviated.\n\n**Response example provenance:** Response wrapper and top-level fields from source @api comment; details abbreviated.\n\n> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.","tags":["Attributes and variants"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"Query parameter limit."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer"},"description":"Query parameter offset."},{"name":"count","in":"query","required":false,"schema":{"type":"boolean"},"description":"Query parameter count."},{"name":"keyword","in":"query","required":false,"schema":{"type":"string"},"description":"Query parameter keyword."}],"responses":{"200":{"description":"Successful response. Response wrapper and top-level fields from source @api comment; details abbreviated.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"data":{"type":"object","properties":{"specificationId":{"type":"integer"},"specificationName":{"type":"string"},"attributeGroups":{"type":"array","items":{}}},"additionalProperties":true}},"additionalProperties":true}}}}}}}}}
```

## Get configured specification/attribute values for a product.

> Get configured specification/attribute values for a product.\
> \
> \*\*Authentication:\*\* Public storefront request; tenant and translation middleware apply.\
> \
> \*\*Feature area:\*\* Product discovery\
> \
> \*\*Implementation source:\*\* \`src/api/store/controllers/ProductAttributeController.ts\`\
> \
> \*\*Request example provenance:\*\* Shape abbreviated from source @api success example.\
> \
> \*\*Response example provenance:\*\* Shape abbreviated from source @api success example.\
> \
> \> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.

```json
{"openapi":"3.0.3","info":{"title":"SpurtCommerce Store API","version":"6.0.0"},"tags":[{"name":"Attributes and variants","description":"Retrieve product attributes and variant options."}],"servers":[{"url":"https://api.example.com","description":"Replace with your SpurtCommerce API host. Paths include the /api prefix."}],"paths":{"/api/store-product-attributes/product/{productSlug}":{"get":{"operationId":"getApiStoreProductAttributesProductProductslug","summary":"Get configured specification/attribute values for a product.","description":"Get configured specification/attribute values for a product.\n\n**Authentication:** Public storefront request; tenant and translation middleware apply.\n\n**Feature area:** Product discovery\n\n**Implementation source:** `src/api/store/controllers/ProductAttributeController.ts`\n\n**Request example provenance:** Shape abbreviated from source @api success example.\n\n**Response example provenance:** Shape abbreviated from source @api success example.\n\n> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.","tags":["Attributes and variants"],"parameters":[{"name":"productSlug","in":"path","required":true,"schema":{"type":"string"},"description":"Value for productSlug."}],"responses":{"200":{"description":"Successful response. Shape abbreviated from source @api success example.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"specificationId":{"type":"integer"},"specificationName":{"type":"string"},"attributeGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"attributes":{"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"integer"},"attributeName":{"type":"string"},"attributeValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"object","additionalProperties":true},"attributeId":{"type":"object","additionalProperties":true},"value":{"type":"object","additionalProperties":true},"isActive":{"type":"object","additionalProperties":true}},"additionalProperties":true}}},"additionalProperties":true}}},"additionalProperties":true}}},"additionalProperties":true}}},"additionalProperties":true}}}}}}}}}
```

## Get variant and SKU information for a product.

> Get variant and SKU information for a product.\
> \
> \*\*Authentication:\*\* Public storefront request; tenant, addon and translation middleware apply.\
> \
> \*\*Feature area:\*\* Product discovery\
> \
> \*\*Implementation source:\*\* \`src/api/store/controllers/ProductVariantsController.ts\`\
> \
> \*\*Request example provenance:\*\* Response shape abbreviated from source @api success example.\
> \
> \*\*Response example provenance:\*\* Response shape abbreviated from source @api success example.\
> \
> \> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.

```json
{"openapi":"3.0.3","info":{"title":"SpurtCommerce Store API","version":"6.0.0"},"tags":[{"name":"Attributes and variants","description":"Retrieve product attributes and variant options."}],"servers":[{"url":"https://api.example.com","description":"Replace with your SpurtCommerce API host. Paths include the /api prefix."}],"paths":{"/api/store-product-variant/product/{productSlug}":{"get":{"operationId":"getApiStoreProductVariantProductProductslug","summary":"Get variant and SKU information for a product.","description":"Get variant and SKU information for a product.\n\n**Authentication:** Public storefront request; tenant, addon and translation middleware apply.\n\n**Feature area:** Product discovery\n\n**Implementation source:** `src/api/store/controllers/ProductVariantsController.ts`\n\n**Request example provenance:** Response shape abbreviated from source @api success example.\n\n**Response example provenance:** Response shape abbreviated from source @api success example.\n\n> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.","tags":["Attributes and variants"],"parameters":[{"name":"productSlug","in":"path","required":true,"schema":{"type":"string"},"description":"Value for productSlug."}],"responses":{"200":{"description":"Successful response. Response shape abbreviated from source @api success example.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"data":{"type":"object","properties":{"productId":{"type":"integer"},"productSlug":{"type":"string"},"productImage":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"integer"},"image":{"type":"string"},"containerName":{"type":"string"},"defaultImage":{"type":"integer"}},"additionalProperties":true}},"selectedVariant":{"type":"object","properties":{"1":{"type":"string"},"2":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}},"additionalProperties":true}}}}}}}}}
```
