Tag Groups
Tag Group Index Endpoint
Structure
See View Tag Group Endpoint for the structure of the tag group payload inside the data array.
Example Request
GET /api/tag-groups?per_page=2
Example Response
{
"current_page": 1,
"data": [
//...
],
"first_page_url": "http://aero.test/api/tag-groups?page=1",
"from": 1,
"last_page": 3,
"last_page_url": "http://aero.test/api/tag-groups?page=3",
"next_page_url": "http://aero.test/api/tag-groups?page=2",
"path": "http://aero.test/api/tag-groups",
"per_page": 2,
"prev_page_url": null,
"to": 2,
"total": 5
}
See View Tag Group Endpoint for the structure of the tag group payload inside the data array.
View Tag Group Endpoint
Structure
Tag Group
Name
|
Type
|
Description
|
name |
string |
The name of the tag group (e.g., Size or Colour) |
reference |
string |
The reference of the tag group |
show_in_filters |
boolean |
Whether the tag group shows in filters on listings page |
tags |
array |
An array of Tag objects |
Tag
Name
|
Type
|
Description
|
name |
string |
The name of the tag (e.g., Small or Red) |
slug |
string |
The slug of the tag, if not present it is auto-generated from name |
reference |
string |
The reference of the tag |
image |
object |
The image of the tag, see Image |
has_slug |
boolean |
Whether the tag has a slug or not |
Image
Name
|
Type
|
Description
|
url |
string |
The url of the image |
Example Request
GET /api/tag-groups/{id|name}
Example Response
{
"id": 1,
"name": "Size",
"reference": null,
"show_in_filters": true,
"tags": [
{
"id": 1,
"name": "Small",
"reference": null,
"slug": "small",
"image": {
"url": null
},
"has_slug": true
}
]
}
Create Tag Group Endpoint
Structure
Tag Group
Name
|
Type
|
Description
|
Required
|
id |
int |
The id for the tag group |
No |
name |
string |
The name of the tag group (e.g., Size or Colour) |
Yes |
reference |
string |
The reference of the tag group |
No |
show_in_filters |
boolean |
Whether the tag group shows in filters on listings page (defaults to true) |
No |
tags |
array |
An array of Tag objects |
No |
Tag
Name
|
Type
|
Description
|
Required
|
id |
int |
The id for the tag |
No |
name |
string |
The name of the tag (e.g., Small or Red) |
Yes |
slug |
string |
The slug of the tag, if not present it is auto-generated from name (unless has_slug is false) |
Conditional |
reference |
string |
The reference of the tag |
No |
image |
object |
The Image of the tag |
No |
has_slug |
boolean |
Whether the tag has a slug or not (defaults to false, unless slug is provided) |
No |
Image
Name
|
Type
|
Description
|
Required
|
src |
string |
The source url of the image |
Yes |
Example Request
POST /api/tag-groups/
{
"name": "Colour",
"show_in_filters": false,
"tags": [
{
"name": "Blue",
"slug": "blueeee",
"reference": "blue"
},
{
"name": "red",
"has_slug": false
}
]
}
Example Response
{
"tagGroup": {
"id": 1
}
}
Update Tag Group Endpoint
Structure
Name
|
Type
|
Description
|
Required
|
name |
string |
The name of the tag group (e.g., Size or Colour) |
No |
reference |
string |
The reference of the tag group |
No |
show_in_filters |
boolean |
Whether the tag group shows in filters on listings page |
No |
Example Request
PUT /api/tag-groups/{id|name}
{
"name": "Updated Size",
"show_in_filters": false
}
Example Response
{
"tagGroup": {
"id": 1
}
}
Delete Tag Group Endpoint
Example Request
DELETE /api/tag-groups/{id|name}
Example Response
204 No Content