Giftcards

The Piggy Giftcards system has two types of giftcards: physical and digital giftcards. Each giftcards is represented by a hash - or QR-code - and an ID. For a more detailed description of what comprises a giftcard, please checkout Entities.


Find Giftcard by Hash

Returns all relevant information for a giftcard. Required for a Create Giftcard Transaction call.

GETFind Giftcard by Hash

https://api.piggy.nl/api//giftcards/find-one-by?hash={{hash}}

HEADERS

AuthorizationBearer {{ access_token }}

PARAMETERS

hashstring
REQUIREDThe giftcard's unique hash or QR-code.
shop_idnumber
REQUIREDShop ID.

Code

Message

7002
Account inactive.
5001
Giftcard not found.
7010
That giftcard is not valid.
5007
Deze giftcard is niet gekoppeld aan een programma. | Giftcard not linked to Giftcard Program.
7015
Shop does not have access to Giftcard Program.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "data": { "id": 9, "type": "DIGITAL", "hash": "PIGGY123", "expiration_date": null, "active": true, "upgradeable": true, "amount_in_cents": 2500, "giftcard_program": { "id": 698, "name": "Test" } }, }


Create Giftcard

Creates a Digital Giftcard. Creation of Physical Giftcards is at this time not supported. Use type: 1 for the creation of Digital Giftcards.

POSTCreate Giftcard

https://api.piggy.nl/api//giftcards

HEADERS

AuthorizationBearer {{ access_token }}

Code

Message

7002
Account inactive.
5001
Giftcard not found.
7010
That giftcard is not valid.
5007
Deze giftcard is niet gekoppeld aan een programma. | Giftcard not linked to Giftcard Program.
7015
Shop does not have access to Giftcard Program.
55021
Only Digital giftcards can by created using the public API.
1 2 3 4 5 6 7 8 9 10 11 12 13 { "data": { "id": 9, "type": "DIGITAL", "hash": "PIGGY123", "expiration_date": null, "active": true, "giftcard_program": { "id": 698, "name": "Test" } }, }

Related