Vouchers describe the discounts to apply to quotes and subscriptions.
Type of object is always voucher.
voucher Unique identifier for the voucher.
"vou_0SNlurA049MEWV0h2jfjkdiOdplN"Time when the voucher was created.
"2021-02-14T19:38:34Z"The voucher's name.
"Black Friday"The percentage amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
30.12>= 1<= 100Whether and how the voucher discount recurs.
"once"once repeating forever For how many months is the discount applied via the voucher. Only applicable when 'recurrence.type' is 'repeating'.
>= 1Number of times the voucher has been redeemed.
2Label indicating the reason why the voucher is retired.
manualAction expired maxRedemptionsReached unknown available retired {
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"createdAt": "2021-02-14T19:38:34.0Z",
"name": "Black Friday",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": 30.12,
"recurrence": {
"type": "once",
"durationInMonths": 1
},
"redemptions": 2,
"retiredReason": null,
"status": "available"
}
Returns a list of vouchers. The vouchers returned are sorted by creation date, with the most recently created vouchers appearing first.
The status to filter the vouchers by.
availableThe voucher code to filter the vouchers by.
"SummerCode"A cursor for use in pagination. The after parameter takes an object ID that defines the position in the list, only items immediately following the item with that ID will be returned.
A cursor for use in pagination. The before parameter takes an object ID that defines the position in the list, only items immediately preceding the item with that ID will be returned.
The limit of items to be returned in the list, between 0 and 200.
2010>= 0<= 200Returns a dictionary with an items property that contains an array of vouchers.
Type of object is always list.
list voucher.A unique identifier to be used as after pagination parameter if more items are available sorted after the current batch of items.
A unique identifier to be used as before pagination parameter if more items are available sorted before the current batch of items.
curl https://api.gigs.com/projects/${GIGS_PROJECT}/vouchers \
-X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json"
{
"object": "list",
"items": [
{
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"createdAt": "2021-02-14T19:38:34Z",
"name": "Black Friday",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": 30.12,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"retiredReason": null,
"status": "available"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
Creates a new voucher in the specified project.
The voucher's name.
"Monthly Basic 15%"The percentage amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
30.12>= 1<= 100Whether and how the voucher discount recurs.
"once"once repeating forever For how many months is the discount applied via the voucher. Only applicable when 'recurrence.type' is 'repeating'.
>= 1Returns the newly created voucher.
Type of object is always voucher.
voucher Unique identifier for the voucher.
"vou_0SNlurA049MEWV0h2jfjkdiOdplN"Time when the voucher was created.
"2021-02-14T19:38:34Z"The voucher's name.
"Black Friday"The percentage amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
30.12>= 1<= 100Whether and how the voucher discount recurs.
"once"once repeating forever For how many months is the discount applied via the voucher. Only applicable when 'recurrence.type' is 'repeating'.
>= 1Number of times the voucher has been redeemed.
2Label indicating the reason why the voucher is retired.
manualAction expired maxRedemptionsReached unknown available retired curl https://api.gigs.com/projects/${GIGS_PROJECT}/vouchers \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json" \
-d '{
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": null,
"recurrence": {
"type": "once",
"durationInMonths": null
}
}'
{
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"createdAt": "2021-02-14T19:38:34Z",
"name": "Black Friday",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": null,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"retiredReason": null,
"status": "available"
}
Retrieves the details of an existing voucher. You need only supply the unique voucher identifier that was returned upon voucher creation.
Returns the voucher object.
Type of object is always voucher.
voucher Unique identifier for the voucher.
"vou_0SNlurA049MEWV0h2jfjkdiOdplN"Time when the voucher was created.
"2021-02-14T19:38:34Z"The voucher's name.
"Black Friday"The percentage amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
30.12>= 1<= 100Whether and how the voucher discount recurs.
"once"once repeating forever For how many months is the discount applied via the voucher. Only applicable when 'recurrence.type' is 'repeating'.
>= 1Number of times the voucher has been redeemed.
2Label indicating the reason why the voucher is retired.
manualAction expired maxRedemptionsReached unknown available retired curl https://api.gigs.com/projects/${GIGS_PROJECT}/vouchers/{voucher} \
-X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json"
{
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"createdAt": "2021-02-14T19:38:34Z",
"name": "Black Friday",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": 30.12,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"retiredReason": null,
"status": "available"
}
Retires the voucher. This marks the voucher as no longer redeemable for new subscriptions, but does not affect any active discounts.
Returns the voucher.
Type of object is always voucher.
voucher Unique identifier for the voucher.
"vou_0SNlurA049MEWV0h2jfjkdiOdplN"Time when the voucher was created.
"2021-02-14T19:38:34Z"The voucher's name.
"Black Friday"The percentage amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
30.12>= 1<= 100Whether and how the voucher discount recurs.
"once"once repeating forever For how many months is the discount applied via the voucher. Only applicable when 'recurrence.type' is 'repeating'.
>= 1Number of times the voucher has been redeemed.
2Label indicating the reason why the voucher is retired.
manualAction expired maxRedemptionsReached unknown available retired curl https://api.gigs.com/projects/${GIGS_PROJECT}/vouchers/{voucher}/retire \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${GIGS_TOKEN}" \
-H "Accept: application/json"
{
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"createdAt": "2021-02-14T19:38:34Z",
"name": "Black Friday",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": 30.12,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"retiredReason": null,
"status": "available"
}