Skip to content

Voucher-V2

Overview

A Huggg Voucher (the final-state of a redeemed huggg). Shown here are examples of the vouchers produced after they have been claimed. This is the endpoint used for our new, more complex, huggg types. Any brand (or product within a brand) that has an integration_id === 7 will produce Voucher Entities of this type.

Example URL Voucher

This is an example of a Gift Card Voucher which would be returned from the /api/v2/hugggs/{hugggId}/voucher/claimed endpoint. This also includes an example of a Voucher that returns a unique URL. This is currently used in our Supermarket Voucher Products. Upcoming uses are: Takeaway vouchers

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
{
    "voucherType": "giftcard-provider",
    "segment": {
        "id": "b15b2302-abc7-11ea-bb37-0242ac130002",
        "name": "Sainsbury's",
        "voucherType": "giftcard-provider"
    },
    "expiresAt": "2022-05-30T21:34:30+0000",
    "data": [{
        "type": "url",
        "label": "Click for your voucher",
        "value": "https://unique.link.to.your.giftcard/giftcard"
    }],
    "dateCreated": "2020-05-30T21:34:41.027Z",
    "dateModified": "2020-05-30T21:34:41.027Z",
    "hugggId": "a94b9f16-abc7-11ea-bb37-0242ac130002"
}

Example Code Voucher

This is an example of a Voucher with a Code and a URL which would be returned from the /api/v2/hugggs/{hugggId}/voucher/claimed endpoint. This returns a unique code and also a URL where you can go to claim the product with this code. This is currently used for grĂ¼um, MoveGB, RakutenTV, TrueStart Coffee Online and upcoming: Candy Kittens.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
{
    "voucherType": "stored",
    "segment": {
        "id": "c3d99ea6-abcb-11ea-bb37-0242ac130002",
        "name": "30 Days Free",
        "voucherType": "stored"
    },
    "expiresAt": "2030-04-18T11:43:51.645Z",
    "data": [{
        "type": "alpha/url",
        "value": "unique-voucher-code"
    }, {
        "type": "url",
        "label": "click to claim",
        "value": "https://affiliate.url/claim"
    }],
    "dateCreated": "2020-06-09T15:47:26.122Z",
    "dateModified": "2020-06-09T15:47:26.122Z",
    "hugggId": "1a62cbb2-abcc-11ea-bb37-0242ac130002"
}

Example Form Redemption Voucher

This is an example of a Voucher produced from a form-redemption Voucher V2. This Voucher returns the submitted form-data which would be returned from the /api/v2/hugggs/{hugggId}/voucher/claimed. This is currently used for: Barefoot Bakery Online

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
    "voucherType": "form-redemption",
    "segment": {
        "id": "91c80f1e-abcc-11ea-bb37-0242ac130002",
        "name": "Brownie Box",
        "voucherType": "form-redemption"
    },
    "expiresAt": "2022-06-02T11:03:56.627Z",
    "data": [{
        "type": "alpha/text",
        "value": "Your Barefoot huggg will be delivered to the following address:"
    }, {
        "type": "alpha/text",
        "label": "Dietary Choice",
        "value": "Regular Brownies"
    }, {
        "type": "alpha/text",
        "label": "Full Name",
        "value": "William Evans"
    }, {
        "type": "alpha/text",
        "label": "Street Address",
        "value": "Runway East, 1 Victoria St"
    }, {
        "type": "alpha/text",
        "label": "City",
        "value": "Bristol"
    }, {
        "type": "alpha/text",
        "label": "Post Code",
        "value": "BS1 6AA"
    }, {
        "type": "alpha/text",
        "label": "Email Address",
        "value": "william@huggg.me"
    }],
    "dateCreated": "2020-06-02T11:03:59.011Z",
    "dateModified": "2020-06-02T11:03:59.011Z",
    "hugggId": "9bd751d6-abcc-11ea-bb37-0242ac130002"
}