Size Guides
Size Guide Index Endpoint
This endpoint is only available if aerocargo/size-guides is installed.
Structure
See View Size Guide Endpoint for the structure of the size guide payload inside the data array.
Example Request
GET /api/size-guides?per_page=2
Example Response
{
"current_page": 1,
"data": [
//...
],
"first_page_url": "http://aero.test/api/size-guides?page=1",
"from": 1,
"last_page": 3,
"last_page_url": "http://aero.test/api/size-guides?page=3",
"next_page_url": "http://aero.test/api/size-guides?page=2",
"path": "http://aero.test/api/size-guides",
"per_page": 2,
"prev_page_url": null,
"to": 2,
"total": 5
}
View Size Guide Endpoint
This endpoint is only available if aerocargo/size-guides is installed.
Structure
Size Guide
Name
|
Type
|
Description
|
id |
int |
The id of the size guide |
name |
string |
The name for the size guide |
heading
|
string |
The heading of the size guide |
view
|
string |
The view of the size guide |
small_image |
object |
The Small Image |
medium_image |
object |
The Medium Image |
large_image |
object |
The Large Image |
products
|
array |
An array of Product objects |
manufacturers
|
array |
An array of Manufacturer objects |
categories
|
array |
An array of Category objects |
tags
|
array |
An array of Tag objects |
groups
|
array |
An array of Group objects |
Group
Name
|
Type
|
Description
|
id |
int |
The id of the size guide group |
heading
|
string |
The heading of the size guide |
sections
|
array |
An array of Section objects |
Section
Name
|
Type
|
Description
|
id |
int |
The id of the size guide section |
heading
|
string |
The heading of the size guide section |
content
|
string |
The content of the size guide section |
Product
Name
|
Type
|
Description
|
id |
int |
The id of the product |
model
|
string |
The model of the product |
name |
string |
The name of the product |
Manufacturer
Name
|
Type
|
Description
|
id |
int |
The id of the manufacturer |
name |
string |
The name of the manufacturer |
Category
Name
|
Type
|
Description
|
id |
int |
The id of the category |
name |
string |
The name of the category |
breadcrumb
|
string |
The breadcrumb for the category |
Tag
Name
|
Type
|
Description
|
id |
int |
The id of the tag |
name |
string |
The name of the tag (e.g., Small or Red) |
group |
object |
The tag group, see Tag Group |
Tag Group
Name
|
Type
|
Description
|
id |
int |
The id of the tag group |
name |
string |
The name of the tag group (e.g., Size or Colour) |
Image
Name
|
Type
|
Description
|
url |
string |
The url of the image |
Example Request
GET /api/size-guides/{id}
Example Response
{
"id": 1,
"name": "API Test",
"heading": "Test",
"view": "test",
"small_image": {
"url": null
},
"medium_image": {
"url": null
},
"large_image": {
"url": null
},
"products": [],
"manufacturers": [
{
"id": 1,
"name": "Burberry"
}
],
"categories": [
{
"id": 1,
"name": "Coats",
"breadcrumb": "Mens » Coats"
}
],
"tags": [
{
"id": 1,
"name": "Blue",
"group": {
"id": 1,
"name": "Colour"
}
}
],
"groups": [
{
"id": 1,
"heading": "Group Heading",
"sections": [
{
"id": 1,
"heading": "Section Heading",
"content": "Section Content"
}
]
}
]
}
Create Size Guide Endpoint
This endpoint is only available if aerocargo/size-guides is installed.
Structure
Size Guide
Name
|
Type
|
Description
|
Required
|
id |
int |
The id of the size guide |
No |
name |
string |
The name for the size guide |
Yes |
heading
|
string |
The heading of the size guide |
Yes |
view
|
string |
The view of the size guide |
No |
small_image |
object |
The Small Image |
No |
medium_image |
object |
The Medium Image |
No |
large_image |
object |
The Large Image |
No |
products
|
array |
An array of product ids or models |
Conditional * |
manufacturers
|
array |
An array of manufacturer ids or names |
Conditional * |
categories
|
array |
An array of category ids or breadcrumbs |
Conditional * |
tags
|
array |
An array of tag ids or names |
Conditional * |
groups
|
array |
An array of Group objects |
No |
* Either products is required or manufacturers and/or categories and/or tags are.
Group
Name
|
Type
|
Description
|
Required
|
id |
int |
The id of the size guide group |
No |
heading
|
string |
The heading of the size guide |
Yes |
sections
|
array |
An array of Section objects |
No |
Section
Name
|
Type
|
Description
|
Required
|
id |
int |
The id of the size guide section |
No |
heading
|
string |
The heading of the size guide section |
Yes |
content
|
string |
The content of the size guide section |
Yes |
Image
Name
|
Type
|
Description
|
Required
|
src |
string |
The source url of the image |
Yes |
Example Request
POST /api/size-guides/
Example Response
{
"name": "API Test",
"heading": "Test",
"view": "test",
"products": [],
"manufacturers": [
"Burberry",
],
"categories": [
"Mens > Coats",
],
"tags": [
"Blue",
],
"groups": [
{
"heading": "Group Heading",
"sections": [
{
"heading": "Section Heading",
"content": "Section Content"
}
]
}
]
}
Update Size Guide Endpoint
This endpoint is only available if aerocargo/size-guides is installed.
Structure
Size Guide
Name
|
Type
|
Description
|
Required
|
name |
string |
The name for the size guide |
No |
heading
|
string |
The heading of the size guide |
No |
view
|
string |
The view of the size guide |
No |
small_image |
object |
The Small Image |
No |
medium_image |
object |
The Medium Image |
No |
large_image |
object |
The Large Image |
No |
products
|
array |
An array of product ids or models |
No |
manufacturers
|
array |
An array of manufacturer ids or names |
No |
categories
|
array |
An array of category ids or breadcrumbs |
No |
tags
|
array |
An array of tag ids or names |
No |
groups
|
array |
An array of Group objects |
No |
Group
Name
|
Type
|
Description
|
Required
|
id |
int |
The id of the size guide group |
No |
heading
|
string |
The heading of the size guide |
No |
sections
|
array |
An array of Section objects |
No |
Section
Name
|
Type
|
Description
|
Required
|
id |
int |
The id of the size guide section |
No |
heading
|
string |
The heading of the size guide section |
No |
content
|
string |
The content of the size guide section |
No |
Image
Name
|
Type
|
Description
|
Required
|
src |
string |
The source url of the image |
Yes |
Example Request
PUT /api/size-guides/{id}
Example Response
{
"name": "API Test",
"heading": "Test",
"view": "test",
"products": [],
"manufacturers": [
"Burberry",
],
"categories": [
"Mens > Coats",
],
"tags": [
"Blue",
],
"groups": [
{
"heading": "Group Heading",
"sections": [
{
"heading": "Section Heading",
"content": "Section Content"
}
]
}
]
}