# Fetch Attributes by Product Product attributes define the specific characteristics and properties of products in your catalog, such as size, color, material, weight, dimensions, and category-specific details. They play a crucial role in maintaining accurate product information, improving categorization, enhancing searchability, and enabling customers to filter and compare products effectively. Each product category (L3) has a unique set of attributes, some of which are mandatory and others optional. The Fetch Attributes by Product endpoint retrieves all attributes associated with a specific L3 category, including their data types, validation rules, and whether they are required or optional. This information is critical when creating or updating products, as mandatory attributes must be provided with correct values to pass validation. Important: Mandatory Attributes If mandatory attributes are missing or contain invalid values during product creation, the API request will fail with a validation error. Always fetch and validate attributes before submitting product data > **Request Type:** `GET` **Scheme:** `HTTPS` **Endpoint:** `https://{{host}}/v3/catalog/product-attributes` Try out Fynd Konnect's Fetch Attributes by Product Endpoint br **Common Request Headers** | Header | Mandatory | Description | | --- | --- | --- | | `x-access-token` | Yes | Access token used for authenticating API requests to Fynd Konnect | | `Content-Type` | Yes | `application/json` | Use Cases * Retrieve category-specific attributes before creating products to ensure compliance * Identify mandatory vs. optional attributes for product validation * Understand attribute data types and validation rules (e.g., allowed values, ranges) * Build dynamic product creation forms with category-specific attribute fields * Validate product data against attribute requirements before API submission ### Query Parameters Query Tips * The `category` parameter is mandatory and must be an exact L3 category name * Category names are case-sensitive; use the exact name returned by Fetch Categories * Each L3 category has its own unique set of attributes * Attributes may vary across different sales channels for the same L3 category ### Success Response ### API Call Example ### Example Response ```json { "items": [ { "id": "attr_12345", "name": "Weight", "slug": "weight", "description": "Product weight in grams", "schema": { "type": "number", "mandatory": true, "multi": false, "allowed_values": [], "range": { "min": 0, "max": 10000 }, "format": "" }, "details": { "display_type": "text" }, "variant": false, "enabled_for_end_consumer": true, "created_on": "2024-03-05T14:40:49.535000Z", "modified_on": "2024-03-18T12:37:55.254000Z" }, { "id": "attr_67890", "name": "Primary Color", "slug": "primary-color", "description": "Main color of the product", "schema": { "type": "str", "mandatory": true, "multi": false, "allowed_values": [ "Red", "Blue", "Green", "Black", "White" ], "range": {}, "format": "" }, "details": { "display_type": "dropdown" }, "variant": true, "enabled_for_end_consumer": true, "created_on": "2024-03-05T14:40:49.535000Z", "modified_on": "2024-03-18T12:37:55.254000Z" } ] } ``` ## Best Practices 1. **Always fetch attributes first**: Retrieve category-specific attributes before creating products to avoid validation errors 2. **Validate mandatory attributes**: Ensure all attributes with `mandatory: true` are provided with valid values 3. **Respect data types**: Match the attribute value type with the specified `schema.type` 4. **Check allowed values**: For attributes with non-empty `allowed_values` arrays, only use values from that list 5. **Validate numeric ranges**: Ensure numeric attributes fall within the specified `min` and `max` range 6. **Use attribute slugs**: Always use the `slug` field as the key when passing attributes in the Create Product API 7. **Cache attribute data**: Attributes for a category rarely change; implement caching to reduce API calls 8. **Handle variant attributes**: Attributes with `variant: true` can be used to create product size/color variants Next Steps * To retrieve categories for attribute lookup, see [Fetch Categories](/konnect/channels/erp-wms/api-documentation/catalog/get-categories) * To fetch templates that define attribute requirements, see [Fetch Templates](/konnect/channels/erp-wms/api-documentation/catalog/get-templates) * To create products with validated attributes, see [Create Product](/konnect/channels/erp-wms/api-documentation/catalog/post-create-product) * For complete catalog setup workflow, see [Catalog Management Guide](/konnect/channels/erp-wms/whats-new/catalog-management)