Upsell Groups

Upsell Group Index Endpoint
This endpoint is only available if 
aerocargo/upsells is installed.
Structure
See View Upsell Group Endpoint for the structure of the upsell group payload inside the 
data array.
Example Request
GET /api/upsell-groups?per_page=2
Example Response
{
    "current_page": 1,
    "data": [
        //...
    ],
    "first_page_url": "http://aero.test/api/upsell-groups?page=1",
    "from": 1,
    "last_page": 3,
    "last_page_url": "http://aero.test/api/upsell-groups?page=3",
    "next_page_url": "http://aero.test/api/upsell-groups?page=2",
    "path": "http://aero.test/api/upsell-groups",
    "per_page": 2,
    "prev_page_url": null,
    "to": 2,
    "total": 5
}
See View Upsell Group Endpoint for the structure of the upsell group payload inside the 
data array.

View Upsell Group Endpoint
This endpoint is only available if 
aerocargo/upsells is installed.
Structure
Name
Type
Description
key
string
The key of the upsell group
name
string
The name for the upsell group
Example Request
GET /api/upsell-groups/{key}
Example Response
{
    "key": "api-test",
    "name": "API Test"
}

Create Upsell Group Endpoint
This endpoint is only available if 
aerocargo/upsells is installed.
Structure
Name
Type
Description
Required
key
int
The key of the upsell group
Yes
name
string
The name for the upsell group
Yes
Example Request
POST /api/upsell-groups/
{
    "key": "api-test",
    "name": "API Test",
}
Example Response
{
    "upsellGroup": {
        "key": "api-test"
    }
}

Update Upsell Group Endpoint
This endpoint is only available if 
aerocargo/upsells is installed.
Structure
Name
Type
Description
Required
key
int
The key of the upsell group
No
name
string
The name for the upsell group
No
Example Request
PUT /api/upsell-groups/{key}
{
    "name": "API Test Updated",
}
Example Response
{
    "upsellGroup": {
        "key": "api-test"
    }
}