Vouchers
Retrieve a paginated list of all Vouchers for an Account, with the option to filter by Promotion, Contact, Voucher status, and more.
List Vouchers
Retrieve a paginated list of all Vouchers for an Account, with the option to filter by Promotion, Contact, Voucher status, and more.
GET
https://api.piggy.eu/api//vouchersHeaders
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json
Params
promotion_uuid string
OPTIONAL
UUID of the Promotion for which the Vouchers are to be retrieved.
contact_uuid string
OPTIONAL
UUID of the Contact for which the Vouchers are to be retrieved.
status string
OPTIONAL
Status of the Vouchers, options: ACTIVE, REDEEMED, EXPIRED, DEACTIVATED, INACTIVE and LOCKED.
limit number
OPTIONAL
Number of Vouchers to retrieve (min: 0, max: 500, default: 30).
page number
OPTIONAL
Page within list to retrieve.
Response Example
{
"data": [
{
"uuid": "57d93a44-1c9d-4548-8c0e-e6cd71d6170a",
"code": "1",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Krabby Patty of your choice",
"expiration_date": null,
"activation_date": "2023-03-02T14:45:52+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
},
"contact": null,
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Krabby Patty of your choice",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
}
},
{
"uuid": "96ab0da0-f502-4e6d-9b7d-c5b0f5c18795",
"code": "2",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-02T14:45:52+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "eac16058-d08e-44f3-8bb3-d42afef192cfs",
"email": "bubble1@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "1390b1e6-ac11-413e-8d20-143640fab2f4",
"code": "3",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-02T14:45:52+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "c4fa414b-b67c-415c-a772-b4a53608754d",
"code": "4",
"status": "DEACTIVATED",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-02T14:45:52+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "1d4ad8a5-1b71-4ccd-8834-7891a32dbbf4",
"email": "bubble2@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "fcf42c74-00c5-4822-a646-0408ae7cc3a1",
"code": "5",
"status": "REDEEMED",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-02T14:45:52+00:00",
"redeemed_at": "2023-04-04T08:33:49+00:00",
"is_redeemed": true,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "6d6b545d-eaf3-430b-b3a0-86c86ba90532",
"email": ""
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "0d7d667a-9a8b-4954-a357-82384a5b7268",
"code": "6",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-02T14:45:52+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "f0da8c2b-cead-42be-b0ae-dc5b08e93824",
"code": "7",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-02T14:45:52+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "e07200c1-4f1a-4093-a727-293df2446c52",
"code": "8",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-02T14:45:52+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "b4c8f3a3-5fce-4b7d-9757-8c41f79b615f",
"code": "9",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-02T14:45:52+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "29a6673e-21d6-4302-b1ae-1d138cec5f03",
"code": "10",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-02T14:45:52+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "f2545dca-7e24-4f3d-9069-5b6bf3e45781",
"code": "11",
"status": "EXPIRED",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": "2023-03-08T11:18:12+00:00",
"activation_date": "2023-03-08T09:52:11+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": null,
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "64a72382-cecd-460f-91ab-dadb07a9eae7",
"code": "12",
"status": "EXPIRED",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": "2023-03-08T11:18:17+00:00",
"activation_date": "2023-03-08T09:52:11+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": null,
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "4f49eae2-ec29-40d0-9002-d1074fa3cfa4",
"code": "13",
"status": "REDEEMED",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-08T09:52:11+00:00",
"redeemed_at": "2023-03-08T11:09:39+00:00",
"is_redeemed": true,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": null,
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "ea4dee1b-2025-45d2-a7fc-3a7265bfdcf5",
"code": "14",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-08T09:52:11+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "96ab0da0-f502-4e6d-9b7d-c5b0f5c18794",
"code": "15",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-08T09:52:11+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "efac7044-9ce9-4c7c-b0a7-52625e23bba3",
"code": "16",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:05:30+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "946c45e2-e00c-428c-8590-2e800e1c3c36",
"code": "17",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:05:33+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "b5d3179b-1eef-4253-b70a-718fa9b26021",
"code": "18",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:05:35+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "0f340d6c-8200-4ddd-b6e1-f4363e9ac197",
"code": "19",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:05:37+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "da1b4070-377d-4815-9ea3-dc358a48b069",
"code": "20",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:05:38+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "e2d04525-02ea-4d8a-b913-b25d5485e844",
"code": "21",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:06:49+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "e57ed94e-317c-41f4-adb4-aa863f5805e9",
"code": "22",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:06:51+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "1e567029-3a4d-4b76-b375-400e7d32fd83",
"code": "23",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:06:52+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "6bf6c3ae-351b-410a-b2a5-4cb1254eea44",
"code": "24",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:06:53+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "389c78b1-4c96-4acc-a45e-0b8bf173d034",
"code": "25",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:06:53+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "399ebf3b-d1b5-4c22-b190-e0ccc034a640",
"code": "26",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:10:44+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "ad98547d-c537-4346-8f30-296041ad9a8f",
"code": "27",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:10:45+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "9cb37162-647f-410b-ac4d-a645781bbf34",
"code": "28",
"status": "REDEEMED",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:10:51+00:00",
"redeemed_at": "2023-04-03T15:45:56+00:00",
"is_redeemed": true,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "2f3d0236-c466-4ab2-97c7-176dafa36edc",
"code": "29",
"status": "REDEEMED",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:10:52+00:00",
"redeemed_at": "2023-04-03T15:47:04+00:00",
"is_redeemed": true,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
},
{
"uuid": "86dc3c01-c6ab-47d3-a765-a8569cf02bda",
"code": "30",
"status": "REDEEMED",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": null,
"activation_date": "2023-03-16T16:11:05+00:00",
"redeemed_at": "2023-04-03T15:43:42+00:00",
"is_redeemed": true,
"attributes": {
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null,
"rens_123": null,
"somename": null
},
"contact": {
"uuid": "9504d4b2-03c5-41d8-8423-4b1821b6aa00",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"shipping": null,
"shipping_region": null,
"some_random_attribute_3": null
}
}
],
"links": {
"first": "http://127.0.0.1:8001/api/v3/oauth/clients/vouchers?page=1",
"last": "http://127.0.0.1:8001/api/v3/oauth/clients/vouchers?page=9",
"prev": null,
"next": "http://127.0.0.1:8001/api/v3/oauth/clients/vouchers?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 9,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "http://127.0.0.1:8001/api/v3/oauth/clients/vouchers?page=1",
"label": "1",
"active": true
},
{
"url": "http://127.0.0.1:8001/api/v3/oauth/clients/vouchers?page=2",
"label": "2",
"active": false
},
{
"url": "http://127.0.0.1:8001/api/v3/oauth/clients/vouchers?page=3",
"label": "3",
"active": false
},
{
"url": "http://127.0.0.1:8001/api/v3/oauth/clients/vouchers?page=4",
"label": "4",
"active": false
},
{
"url": "http://127.0.0.1:8001/api/v3/oauth/clients/vouchers?page=5",
"label": "5",
"active": false
},
{
"url": "http://127.0.0.1:8001/api/v3/oauth/clients/vouchers?page=6",
"label": "6",
"active": false
},
{
"url": "http://127.0.0.1:8001/api/v3/oauth/clients/vouchers?page=7",
"label": "7",
"active": false
},
{
"url": "http://127.0.0.1:8001/api/v3/oauth/clients/vouchers?page=8",
"label": "8",
"active": false
},
{
"url": "http://127.0.0.1:8001/api/v3/oauth/clients/vouchers?page=9",
"label": "9",
"active": false
},
{
"url": "http://127.0.0.1:8001/api/v3/oauth/clients/vouchers?page=2",
"label": "pagination.next",
"active": false
}
],
"path": "http://127.0.0.1:8001/api/v3/oauth/clients/vouchers",
"per_page": "30",
"to": 30,
"total": 241
}
}Code
Message
1003
Invalid input.
80002
Promotion not found.
55031
Contact not found.
Create Voucher
Creates a new Voucher for a Promotion. Only the promotion_uuid is required. A specific code can be given to be used, or else a code will be generated by the system. Similarly, if no activation_date and/or expiration_date is given, the system will calculate those dates by the validity rules set up for the promotion. It is recommended to send in the expiration and activation date only if business logic demands its, and the validity logic in the Piggy system is unable to handle that logic. Note: If you do send in activation- or expiration dates, keep in mind they need to be in ISO 8601 format and will be stored in UTC time. If the date-time you're sending in is not already in UTC time, please either parse it to UTC beforehand, or pass along the timezone.
POST
https://api.piggy.eu/api//vouchersHeaders
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json
Body
promotion_uuid string
REQUIRED
UUID of the Promotion for which the Voucher is to be created.
code string
OPTIONAL
The unique code of the Voucher which will serve as its identifier. If not given, a random code will be automatically generated.
contact_uuid string
OPTIONAL
The Contact's UUID to be linked to this Voucher. If not given, the recipient will need to identify themselves to use the Voucher.
expiration_date string
OPTIONAL
The Vouchers expiration date in ISO 8601 format. Dates are stored in UTC time. If not given, Promotion validity rules apply.
activation_date string
OPTIONAL
The Vouchers activation date in ISO 8601 format. Dates are stored in UTC time. If not given, Promotion validity rules apply.
total_redemptions_allowed integer
OPTIONAL
Number of times this specific Voucher can be redeemed. If not given, Promotion type and redemptions per voucher will apply.
custom_attributes array
OPTIONAL
Additional Custom Attributes for the created Voucher.
Response Example
{
"data": {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"code": "EXAMPLE-CODE-03785",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"expiration_date": "2023-12-12T10:00:00+00:00",
"activation_date": "2023-12-10T10:00:00+00:00",
"redeemed_at": null,
"is_redeemed": false,
"attributes": {
"joker": null,
"joker2": null,
"jokertje1233": null,
"someName2": "meer"
},
"contact": {
"uuid": "123",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Free Krabby Patty",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"joker": null,
"joker2": null,
"jokertje1233": null,
"someName2": "meer"
}
},
"meta": []
}Code
Message
1003
Invalid input.
80002
Promotion not found.
80003
Voucher already exists.
80008
Voucher limit reached.
55031
Contact not found.
Create Batch of Vouchers
Create multiple Vouchers at once for a specific Promotion. Specify the quantity and, optionally, a Contact UUID, activation_date and/or expiration_date. The system will generate a batch of Vouchers according to the Promotion's rules.
POST
https://api.piggy.eu/api//vouchers/batchHeaders
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json
Body
promotion_uuid string
REQUIRED
UUID of the Promotion for which the Vouchers are to be created.
quantity integer
REQUIRED
The number of Vouchers you want to generate (min: 1, max: 500)."
contact_uuid string
OPTIONAL
The Contact's UUID to be linked to the batch of Vouchers.
expiration_date string
OPTIONAL
The expiration date for the batch of Vouchers in ISO 8601 format. Dates are stored in UTC time. If not given, promotion validity rules apply.
activation_date string
OPTIONAL
The activation date for the batch of Vouchers in ISO 8601 format. Dates are stored in UTC time. If not given, promotion validity rules apply.
custom_attributes array
OPTIONAL
Additional Custom Attributes for the Vouchers.
Response Example
{
"data": {
"uuid": "bfada889-6a69-4fcf-aed6-42933ae9084d",
"type": "vouchers",
"quantity": 30,
"status": "PENDING",
"created_at": "2023-11-27, 17:59"
},
"meta": []
}Code
Message
1003
Invalid input.
80002
Promotion not found.
80008
Voucher limit reached.
55031
Contact not found.
Find Voucher
Finds a Voucher by its unique code. This call will help you with identifying individual Vouchers and viewing their specifications like whether the Voucher is redeemed or not or when it expires.
GET
https://api.piggy.eu/api//vouchers/findHeaders
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json
Body
code string
REQUIRED
The unique code of the Voucher, which serves as its identifier.
Response Example
{
"data": {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"code": "EXAMPLE-CODE-03785",
"status": "REDEEMED",
"name": "Free Krabby Patty",
"description": "Krabby Patty of your choice",
"expiration_date": "2023-12-12T10:00:00+00:00",
"activation_date": "2023-12-10T10:00:00+00:00",
"redeemed_at": "2023-11-13T08:51:00+00:00",
"is_redeemed": true,
"redemptions_remaining": 0,
"times_redeemed": 1,
"total_redemptions_allowed": 1,
"attributes": {
"plu": "ABC123",
},
"contact": {
"uuid": "123",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Krabby Patty of your choice",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"plu": "ABC123",
}
},
"meta": []
}Code
Message
1003
Invalid input.
80004
Voucher not found.
Update Voucher
Update the status of a Voucher. This endpoint allows you to activate or deactivate a Voucher, changing its usability status as needed.
PUT
https://api.piggy.eu/api//vouchers/{{voucher_uuid}}Headers
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json
Params
voucher_uuid string
REQUIRED
The UUID of the Voucher that you want to update.
Body
status string
REQUIRED
Can be either ACTIVE or DEACTIVATED.
custom_attributes array
OPTIONAL
Additional Custom Attributes as a key-value array.
expiration_date string
OPTIONAL
New expiration date for the Voucher. Note: this can only be done for inactive and active Vouchers.
Response Example
{
"data": {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"code": "EXAMPLE-CODE-03785",
"status": "ACTIVE",
"name": "Free Krabby Patty",
"description": "Krabby Patty of your choice",
"expiration_date": "2023-12-12T10:00:00+00:00",
"activation_date": "2023-12-10T10:00:00+00:00",
"redeemed_at": null,
"is_redeemed": false,
"redemptions_remaining": 5,
"times_redeemed": 0,
"total_redemptions_allowed": 5,
"attributes": {
"plu": "ABC123",
},
"contact": null,
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Krabby Patty of your choice",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"plu": "ABC123",
}
},
"meta": []
}Code
Message
1003
Invalid input.
80004
Voucher not found.
Check Voucher Validity
Validates if the Voucher can be redeemed at this point by the Contact.
POST
https://api.piggy.eu/api/v3/oauth/clients/vouchers/{{voucher_uuid}}/validateHeaders
Authorization
Accept
Bearer {{ personal_access_token }}
application/json
Input parameters
voucher_uuid string
required
The UUID of the Voucher to check
contact_uuid string
required if no Contact linked
The UUID of the Contact who would redeem the Voucher
shop_uuid string
required
The UUID of the Shop where the Voucher would be redeemed
Redeem Voucher
Redeems a Voucher for a Contact. If the Voucher is already linked to a Contact – because it was sent in an automated email for instance – the call only requires the Voucher's code for redeeming it.
If the Voucher isn't yet linked to a Contact – because a series of Vouchers were printed as flyers to be given away for instance – then the contact_uuidis required as well as the Voucher code.
Please note that when using locked Vouchers, you should send in your release_keyhere as well.
POST
https://api.piggy.eu/api//vouchers/redeemHeaders
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json
Body
code string
REQUIRED
The unique code of the Voucher which will serve as its identifier
shop_uuid string
REQUIRED
UUID of the Shop through which the voucher is redeemed.
contact_uuid string
REQUIRED_IF
Not required if Contact is already assigned to Voucher, but could serve as identity check if given nevertheless. In case no Contact is assigned to the Voucher, the contact_uuid must be supplied.
release_key string
OPTIONAL
The release key that was returned when locking the voucher (Only applicable if locking is used).
Response Example
{
"data": {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"code": "EXAMPLE-CODE-03785",
"status": "REDEEMED",
"name": "Free Krabby Patty",
"description": "Krabby Patty of your choice",
"expiration_date": "2023-12-12T10:00:00+00:00",
"activation_date": "2023-12-10T10:00:00+00:00",
"redeemed_at": "2023-11-13T08:51:00+00:00",
"is_redeemed": true,
"redemptions_remaining": 0,
"times_redeemed": 1,
"total_redemptions_allowed": 1,
"attributes": {
"plu": "ABC12"
},
"contact": {
"uuid": "123",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Choice of Original or Double Deluxe",
"voucher_limit": 25012,
"limit_per_contact": null,
"expiration_duration": null,
"plu": "ABC12"
},
"voucher_redemption": {
"uuid": "8fsl298-oaisdf98-asdf923-afsdoij",
"created_at": "2023-11-13T08:51:00+00:00"
}
},
"meta": []
}Code
Message
1003
Invalid input.
80004
Voucher not found.
80006
Voucher has expired.
80005
Voucher code as already been redeemed.
80012
Voucher is deactivated.
80014
Voucher is inactive.
Lock Voucher (Optional)
Using the lock functionality, you can make sure that a Voucher cannot be used by another process at the same time as well as return the Voucher to its ACTIVE state when a failure occurs on your side (using the Release call). Using the locking method, you can make sure the Voucher only reaches a REDEEMED state when everything completed successful on your side.
When locking a Voucher, a release key is returned which should then be used to either redeem the Voucher later on, or to restore the Voucher to its ACTIVE state using the release call.
If the lock is not released within an hour, the lock will be released by the system automatically and the Voucher will be restored to its ACTIVE state.
POST
https://api.piggy.eu/api//vouchers/{{voucher_uuid}}/lockHeaders
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json
Params
voucher_uuid string
REQUIRED
The UUID of the Voucher that you want to lock.
Response Example
{
"data": {
"voucher": {
"uuid": "11fe9574-800a-4832-ae64-e90d0192ca9a",
"status": "LOCKED"
},
"lock": {
"release_key": "5cc7e94a-7aa2-4f4a-8a8c-c20ab3a086ce",
"locked_at": "2023-11-13T09:01:46+00:00",
"unlocked_at": null,
"system_release_at": "2023-11-13T10:01:46+00:00"
}
},
"meta": []
}Code
Message
1003
Invalid input.
80004
Voucher not found.
80006
Voucher has expired.
80005
Voucher code as already been redeemed.
80012
Voucher is deactivated.
80017
Voucher is already locked.
Release Voucher (Optional)
When using Voucher locking, there is also the process of releasing the Voucher. Using the call you can release the Voucher from its lock using the release key that was retrieved during the initial lock.
Extra information:
When redeeming a Voucher that was previously locked, the system will release the lock automatically (you need to provide the release key as well). However, if your system wants to release the Voucher manually you can do so using this call. If the release is not done within the hour, the system will release it automatically.
POST
https://api.piggy.eu/api//vouchers/{{voucher_uuid}}/releaseHeaders
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json
Params
voucher_uuid string
REQUIRED
The UUID of the Voucher that you want to release.
Body
release_key string
REQUIRED
The release key of the Voucher that was given upon locking it.
Response Example
{
"data": {
"voucher": {
"uuid": "11fe9574-800a-4832-ae64-e90d0192ca9a",
"status": "ACTIVE"
},
"lock": {
"release_key": "5cc7e94a-7aa2-4f4a-8a8c-c20ab3a086ce",
"locked_at": "2023-11-13T09:01:46+00:00",
"unlocked_at": "2023-11-13T09:03:32+00:00",
"system_release_at": null
}
},
"meta": []
}Code
Message
1003
Invalid input.
80004
Voucher not found.
80006
Voucher has expired.
80005
Voucher code as already been redeemed.
Reverse Voucher Redemption
Reverses a Voucher Redemption.
POST
https://api.piggy.eu/api//vouchers/{{uuid}}/reverseHeaders
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json
Params
uuid string
REQUIRED
The UUID of the Voucher Redemption
Code
Message
1003
Invalid input.
80004
Voucher not found.
Multi Redeem Voucher
Redeems a Voucher multiple times at once for a Contact.
If the Voucher isn't yet linked to a Contact – because a series of Vouchers were printed as flyers to be given away for instance – then the contact_uuidis required as well as the Voucher code.
Please note that when using locked Vouchers, you should send in your release_keyhere as well.
POST
https://api.piggy.eu/api//vouchers/multi-redeemHeaders
Authorization
Bearer {{ access_token | api_key }}
Accept
application/json
Body
code string
REQUIRED
The unique code of the Voucher which will serve as its identifier
number_of_times integer
REQUIRED
Number of times the Voucher is to be redeemed (min: 1, max: 50). Note: Only multi-use Vouchers can be used here.
contact_uuid string
REQUIRED_IF
Not required if Contact is already assigned to Voucher, but could serve as identity check if given nevertheless. In case no Contact is assigned to the Voucher, the contact_uuid must be supplied.
shop_uuid string
REQUIRED
The Shop or Business Profile where the Voucher is redeemed
release_key string
OPTIONAL
The release key that was returned when locking the voucher (Only applicable if locking is used).
Response Example
{
"data": {
"voucher: {
"uuid": "62f6dc8c-4ff1-4c42-99ba-713c68ed10a0",
"code": "EXAMPLE-CODE-03785",
"status": "REDEEMED",
"name": "Free Krabby Patty",
"description": "Choice of Original or Double Deluxe",
"expiration_date": "2023-12-12T10:00:00+00:00",
"activation_date": "2023-12-10T10:00:00+00:00",
"redeemed_at": "2023-11-13T08:51:00+00:00",
"is_redeemed": true,
"attributes": {
"plu": "ABC12"
},
"contact": {
"uuid": "123",
"email": "spongebob@bikinibottom.sea"
},
"promotion": {
"uuid": "123",
"name": "Free Krabby Patty",
"description": "Choice of Original or Double Deluxe",
"voucher_limit": 1000,
"limit_per_contact": null,
"expiration_duration": null,
"plu": "ABC12"
}
},
"voucher_redemptions": [
{
"uuid": "abc123-890asd-d8a6s7e",
"created_at": "2023-11-13T08:51:00+00:00"
},
{
"uuid": "789bacs-asd1234-d8a6s7e",
"created_at": "2023-11-13T08:51:00+00:00"
},
{
"uuid": "fsa12aa-g332as-xv234a",
"created_at": "2023-11-13T08:51:00+00:00"
}
]
},
"meta": []
}Code
Message
1003
Invalid input.
80004
Voucher not found.
80006
Voucher has expired.
80005
Voucher code as already been redeemed.
80012
Voucher is deactivated.
80014
Voucher is inactive.
80019
Voucher doesn't have enough redemptions left.
80020
Promotion is inactive.
Promotions
Retrieves a list of all Promotions linked to an Account, providing detailed insights into each promotion's attributes such as name, description, voucher limits,
Giftcards
Our Giftcards system has two types of Giftcards: physical and digital Giftcards. Each Giftcard is uniquely identified by a hash or QR-code, along with an ID. A