Skip to content

Redemptions

This entity is provisional

Overview

A redemption is associated with a huggg and shows whether a huggg has been redeemed. A huggg may have more than one redemption, but only the most recent redemption can have the status of redeemed set to true.

For a new redemption to be created against a huggg, all existing redemptions must have been marked as unredeemed. This is done by updating the redeemed status to false with a call to unredeem huggg.

Redeemed example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
    "data" : {
        "id" : "b1b04370-610c-4261-b547-75952566d77c",
        "huggg_id" : "c86f2c57-f232-11e8-8aba-0aac06f9ab10",
        "redeemed" : true,
        "creation_at" : "2018-11-20T17:34:08Z",
        "updated_at" : "2018-11-20T17:34:08Z",
        "location_id" : "bristol17"
    }
}

Unredeemed example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
    "data" : {
        "id" : "b1b04370-610c-4261-b547-75952566d77c",
        "huggg_id" : "c86f2c57-f232-11e8-8aba-0aac06f9ab10",
        "redeemed" : false,
        "created_at" : "2018-11-20T17:34:08Z",
        "updated_at" : "2018-11-20T17:35:10Z",
        "location_id" : "bristol17"
    }
}