Attribute Group API
Overview
The Attribute Group API allows you to manage product attribute groups in your EverShop store. Attribute groups help organize product attributes into logical categories, making product management more efficient and structured.
Endpoints
Create an Attribute Group
Creates a new attribute group in the system. Attribute groups are used to categorize product attributes for better organization.
Field Name | Field Type | Required |
---|---|---|
group_name | string | Yes |
- cURL
- JavaScript
curl
-H "Accept: application/json"
-H "Cookie: asid=<your admin cookie>"
https://<your domain>/api/attributeGroups
fetch('https://<your domain>/api/attributeGroups', {
headers: {
'Accept': 'application/json',
'Cookie': 'asid=<your admin cookie>'
}
})
.then(response => response.json())
.then(data => {
if(data.error) {
// Handle the error
} else {
// Handle the data
}
})
.catch(error => {
// Handle the error
});
{
"data": {
"attribute_group_id": 49,
"uuid": "363ba97f-8be7-4be9-be3f-a9f341f2b89f",
"group_name": "Attribute Group Name",
"created_at": "2023-02-06 09:13:35",
"updated_at": "2023-02-06 09:13:35"
}
}
Update an Attribute Group
Updates an existing attribute group's information. Use this endpoint to modify the name of an attribute group.
Field Name | Field Type | Required |
---|---|---|
group_name | string | Yes |
- cURL
- JavaScript
curl
-H "Accept: application/json"
-H "Cookie: asid=<your admin cookie>"
https://<your domain>/api/attributeGroups/363ba97f-8be7-4be9-be3f-a9f341f2b89f
fetch('https://<your domain>/api/attributeGroups/363ba97f-8be7-4be9-be3f-a9f341f2b89f', {
headers: {
'Accept': 'application/json',
'Cookie': 'asid=<your admin cookie>'
}
})
.then(response => response.json())
.then(data => {
if(data.error) {
// Handle the error
} else {
// Handle the data
}
})
.catch(error => {
// Handle the error
});
{
"data": {
"attribute_group_id": 50,
"uuid": "363ba97f-8be7-4be9-be3f-a9f341f2b89f",
"group_name": "Attribute Group Name",
"created_at": "2023-02-06 09:13:35",
"updated_at": "2023-02-06 09:13:35"
}
}
Delete an Attribute Group
Permanently removes an attribute group from the system. Note that this operation cannot be undone, and any attributes associated with this group may need to be reassigned.
- cURL
- JavaScript
curl
-H "Accept: application/json"
-H "Cookie: asid=<your admin cookie>"
https://<your domain>/api/attributeGroups/363ba97f-8be7-4be9-be3f-a9f341f2b89f
fetch('https://<your domain>/api/attributeGroups/363ba97f-8be7-4be9-be3f-a9f341f2b89f', {
headers: {
'Accept': 'application/json',
'Cookie': 'asid=<your admin cookie>'
}
})
.then(response => response.json())
.then(data => {
if(data.error) {
// Handle the error
} else {
// Handle the data
}
})
.catch(error => {
// Handle the error
});
{
"data": {
"attribute_group_id": 50,
"uuid": "363ba97f-8be7-4be9-be3f-a9f341f2b89f",
"group_name": "Attribute Group Name",
"created_at": "2023-02-06 09:13:35",
"updated_at": "2023-02-06 09:13:35"
}
}
Get an Attribute Group
Retrieves detailed information about a specific attribute group.
- cURL
- JavaScript
curl
-H "Accept: application/json"
-H "Cookie: asid=<your admin cookie>"
https://<your domain>/api/attributeGroups/363ba97f-8be7-4be9-be3f-a9f341f2b89f
fetch('https://<your domain>/api/attributeGroups/363ba97f-8be7-4be9-be3f-a9f341f2b89f', {
headers: {
'Accept': 'application/json',
'Cookie': 'asid=<your admin cookie>'
}
})
.then(response => response.json())
.then(data => {
if(data.error) {
// Handle the error
} else {
// Handle the data
}
})
.catch(error => {
// Handle the error
});
{
"data": {
"attribute_group_id": 50,
"uuid": "363ba97f-8be7-4be9-be3f-a9f341f2b89f",
"group_name": "Attribute Group Name",
"created_at": "2023-02-06 09:13:35",
"updated_at": "2023-02-06 09:13:35"
}
}
List All Attribute Groups
Retrieves a paginated list of all attribute groups in the system.
- cURL
- JavaScript
curl
-H "Accept: application/json"
-H "Cookie: asid=<your admin cookie>"
https://<your domain>/api/attributeGroups
fetch('https://<your domain>/api/attributeGroups', {
headers: {
'Accept': 'application/json',
'Cookie': 'asid=<your admin cookie>'
}
})
.then(response => response.json())
.then(data => {
if(data.error) {
// Handle the error
} else {
// Handle the data
}
})
.catch(error => {
// Handle the error
});
{
"data": [
{
"attribute_group_id": 49,
"uuid": "363ba97f-8be7-4be9-be3f-a9f341f2b89f",
"group_name": "General Information",
"created_at": "2023-02-06 09:13:35",
"updated_at": "2023-02-06 09:13:35"
},
{
"attribute_group_id": 50,
"uuid": "363ba97f-8be7-4be9-be3f-a9f341f2b89w",
"group_name": "Technical Specifications",
"created_at": "2023-02-06 09:15:22",
"updated_at": "2023-02-06 09:15:22"
}
],
"links": {
"first": "/api/attributeGroups?page=1",
"last": "/api/attributeGroups?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "/api/attributeGroups",
"per_page": 20,
"to": 2,
"total": 2
}
}
Error Handling
All endpoints may return the following error responses:
Status Code | Description |
---|---|
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Authentication required |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Attribute group doesn't exist |
500 | Server Error - Something went wrong |
Error responses follow this format:
{
"error": {
"status": 404,
"message": "Attribute group not found"
}
}
Best Practices
- Organization: Create logical attribute groups based on product categories or features
- Naming: Use clear, descriptive names for attribute groups
- Maintenance: Regularly review and update attribute groups as product catalogs evolve
- Integration: Use these APIs to integrate EverShop with PIM (Product Information Management) systems