Attribute Group API
Use the REST API to interact with EverShop product attribute group.
Create an attribute group
Use this endpoint to create an attribute group.
Request Schema (application/json)
Field Name | Field Type | Required |
---|---|---|
group_name | string | Yes |
POST/api/attribute-groups
- cURL
- JavaScript
curl -H "Accept: application/json" -H "Cookie: admin_token=<your jwt token id>" https://<your domain>/api/attribute-groups
fetch('https://<your domain>/api/attribute-groups', { headers: { 'Accept': 'application/json', 'Cookie': 'admin_token=<your jwt token id>' }}) .then(response => response.json()) .then(data => { if(data.error) { // Handle the error } else { // Handle the data } }) .catch(error => { // Handle the error });
Sample Of Response
{ "data": { "attribute_group_id": 49, "uuid": "dcc16767a5c311edb46b60d819134f39", "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
Use this endpoint to update an attribute group.
Request Schema (application/json)
Field Name | Field Type | Required |
---|---|---|
group_name | string | Yes |
PATCH/api/attribute-groups/{id}
- cURL
- JavaScript
curl -H "Accept: application/json" -H "Cookie: admin_token=<your jwt token id>" https://<your domain>/api/attribute-groups/{id}
fetch('https://<your domain>/api/attribute-groups/{id}', { headers: { 'Accept': 'application/json', 'Cookie': 'admin_token=<your jwt token id>' }}) .then(response => response.json()) .then(data => { if(data.error) { // Handle the error } else { // Handle the data } }) .catch(error => { // Handle the error });
Sample Of Response
{ "data": { "attribute_group_id": 50, "uuid": "dcc16767a5c311edb46b60d819134f39", "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
Use this endpoint to delete an attribute group.
Request Schema (application/json)
No request body requiredDELETE/api/attribute-groups/{id}
- cURL
- JavaScript
curl -H "Accept: application/json" -H "Cookie: admin_token=<your jwt token id>" https://<your domain>/api/attribute-groups/{id}
fetch('https://<your domain>/api/attribute-groups/{id}', { headers: { 'Accept': 'application/json', 'Cookie': 'admin_token=<your jwt token id>' }}) .then(response => response.json()) .then(data => { if(data.error) { // Handle the error } else { // Handle the data } }) .catch(error => { // Handle the error });
Sample Of Response
{ "data": { "attribute_group_id": 50, "uuid": "dcc16767a5c311edb46b60d819134f39", "group_name": "Attribute Group Name", "created_at": "2023-02-06 09:13:35", "updated_at": "2023-02-06 09:13:35" }}