Product Layers
Create or replace product layers
Create product layers to customize and override base product data for specific contexts, locales, or business requirements.
Product layers enable you to:
- Override product attributes for specific markets or channels
- Provide locale-specific content while maintaining a global base product
- Create seasonal or promotional variations without duplicating entire product records
- Implement A/B testing scenarios with different product presentations
For details on how to use layers with Adobe Commerce Optimizer, see Catalog Layers in the Adobe Commerce Optimizer documentation.
Layer behavior and requirements
Required fields:
- sku: Must match an existing base product SKU
- source.layer: Identifies the layer name for organization and retrieval
Optional Fields:
- source.locale: When specified, layer applies only to that locale. When omitted, layer applies globally across all locales
- All product fields (name, description, images, and so on): Override corresponding base product values
Merging logic
Product layers use intelligent merging:
- Simple fields (name, description, and so on): Complete replacement of base values
- Array fields (attributes, images, etc.): First-level arrays are merged with base arrays
- Nested arrays (attribute.values, etc.): Complete replacement of nested arrays
Example: Adding a color variant while preserving existing attributes:
{
"sku": "red-pants",
"source": {
"locale": "en-US",
"layer": "seasonal-colors"
},
"attributes": [
{
"code": "color",
"values": ["Crimson Red", "Deep Red"],
"variantReferenceId": "pants-color-crimson"
}
]
}
post/v1/catalog/products/layers
Headers
Authorizationstring required
Authorization Bearer token
Content-Type'application/json' required
Content-Encoding'gzip'
Use this header if the payload is compressed with gzip.
Request body
Example request
[
{
"sku": "red-pants",
"source": {
"locale": "en-US",
"layer": "seasonal-winter-2024"
},
"name": "Premium Red Winter Pants - Limited Edition",
"description": "Stay warm and stylish with our premium red winter pants. Features thermal lining and water-resistant fabric perfect for cold weather adventures.",
"shortDescription": "Premium thermal-lined winter pants in classic red"
}
]Response
All items accepted and will be processed asynchronously