Get huggg voucher options

Overivew

GET /api/v2/hugggs/{hugggId}/voucher/options

This endpoint will return the available segments that can be used when generating a voucher.

Request

URL Parameters

Key Value Description
hugggId string The ID or shortcode of the huggg that you want a voucher for

Examples

Get huggg voucher options

GET /api/v2/hugggs/{hugggId}/voucher/options

Response

The successful response returns a list of available segments

HTTP/1.1 200 OK

{
    "segments": [
        {
            "id": "a_segment_id",
            "name": "This is a segment",
            "expiry": 1000
        },
        {
            ...
        }
    ],
    "dateCreated": "2019-05-21T15:11:24.951Z",
    "dateModified": "2019-05-21T15:11:24.951Z",
    "productId": "a_product_id"
}