Properties
- Name
object
- Type
- string
- Description
Type of object is always
voucher
.
- Name
id
- Type
- string
- Description
Unique identifier for the voucher.
Example:vou_0SNlurA049MEWV0h2jfjkdiOdplN
- Name
name
- Type
- string
- Description
The voucher's name.
Example:Monthly Basic 15%
- Name
priceDiscount
- Type
- nullable object
- Description
- The price amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
- Name
priceDiscountPercentage
- Type
- nullable number
- Description
The percentage amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
Example:30.12
>= 1
<= 100
- Name
recurrence
- Type
- object
- Description
- Details on whether and for how long the discounts applied via the voucher recur.
- Name
redemptions
- Type
- integer
- Description
Number of times the voucher has been redeemed.
Example:2
- Name
restrictions
- Type
- object
- Description
- Conditions under which the voucher can be used.
- Name
retiredReason
- Type
- nullable string
- Description
Label indicating the reason why the voucher is retired.
Allowed values:, manualAction, expired, maxRedemptionsReached, unknown
- Name
status
- Type
- string
- Description
- Allowed values:
available, retired
- Name
createdAt
- Type
- string
- Description
Time when the voucher was created.
Example:2021-02-14T19:38:34Z
Response
{
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": 30.12,
"recurrence": {
"type": "once"
},
"redemptions": 2,
"restrictions": {
"expiresAt": "2021-04-14T19:38:34Z"
},
"retiredReason": null,
"status": "available",
"createdAt": "2021-02-14T19:38:34Z"
}
Retrieve a voucher code
Retrieves the details of an existing code for a given voucher.
Preview
This endpoint is currently in preview and might change in the future.
We’re excited to hear your feedback and ideas. Please send an email to support@gigs.com to share your thoughts.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
voucher
- Type
- string
- Description
The unique identifier for the voucher.
Example:vou_0SNlurA049MEWV0h2jfjkdiOdplN
required- Name
code
- Type
- string
- Description
The unique identifier for the code.
Example:voc_0SNlurA049MEWV0Q5vaTJnKoXc1v
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
voucherCode
.
required- Name
id
- Type
- string
- Description
Unique identifier for the voucher code.
Example:voc_0SNlurA049MEWV0Q5vaTJnKoXc1v
required- Name
code
- Type
- string
- Description
The associated code.
Example:BlackFriday22
required- Name
redemptions
- Type
- integer
- Description
Number of times the voucher code has been redeemed.
Example:2
required- Name
restrictions
- Type
- object
- Description
- Conditions under which the voucher code can be redeemed.
required- Name
retiredReason
- Type
- nullable string
- Description
Label indicating the reason why the voucher code is retired.
Allowed values:, expired, voucherExpired, maxRedemptionsReached, voucherMaxRedemptionsReached, voucherManuallyRetired
required- Name
status
- Type
- string
- Description
- Allowed values:
active, inactive, retired
required- Name
voucher
- Type
- string
- Description
Unique identifier of the voucher associated to the voucher code.
Example:vou_0SNlurA049MEWV0h2jfjkdiOdplN
required- Name
createdAt
- Type
- string
- Description
Time when the voucher code was created.
Example:2021-02-14T19:38:34Z
required
Request
curl https://api.gigs.com/projects/{project}/vouchers/{voucher}/codes/{code} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "voucherCode",
"id": "voc_0SNlurA049MEWV0Q5vaTJnKoXc1v",
"code": "BlackFriday22",
"redemptions": 2,
"restrictions": {
"firstTimeTransaction": true,
"maximumRedemptions": null,
"minimumPrice": {
"amount": 999,
"currency": "USD"
},
"expiresAt": "2021-04-14T19:38:34Z"
},
"retiredReason": null,
"status": "active",
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"createdAt": "2021-02-14T19:38:34Z"
}
List all voucher codes
Returns a list of voucher codes. The voucher codes returned are sorted by creation date, with the most recently created voucher codes appearing first.
Preview
This endpoint is currently in preview and might change in the future.
We’re excited to hear your feedback and ideas. Please send an email to support@gigs.com to share your thoughts.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
voucher
- Type
- string
- Description
The unique identifier for the voucher.
Example:vou_0SNlurA049MEWV0h2jfjkdiOdplN
required
Query Parameters
- Name
status
- Type
- array
- Description
The status to filter the voucher codes by.
Default:active
- Name
after
- Type
- string
- Description
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.
- Name
before
- Type
- string
- Description
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.
- Name
limit
- Type
- integer
- Description
The limit of items to be returned in the list, between 0 and 200.
Default:10
>= 0
<= 200
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
list
.
required- Name
items
- Type
- array
- Description
- List of objects of type `voucherCode`.
required- Name
moreItemsAfter
- Type
- nullable string
- Description
A unique identifier to be used as
after
pagination parameter if more items are available sorted after the current batch of items.
required- Name
moreItemsBefore
- Type
- nullable string
- Description
A unique identifier to be used as
before
pagination parameter if more items are available sorted before the current batch of items.
required
Request
curl https://api.gigs.com/projects/{project}/vouchers/{voucher}/codes \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "list",
"items": [
{
"object": "voucherCode",
"id": "voc_0SNlurA049MEWV0Q5vaTJnKoXc1v",
"code": "BlackFriday22",
"redemptions": 2,
"restrictions": {
"firstTimeTransaction": true,
"maximumRedemptions": null,
"minimumPrice": {
"amount": 999,
"currency": "USD"
},
"expiresAt": "2021-04-14T19:38:34Z"
},
"retiredReason": null,
"status": "active",
"voucher": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"createdAt": "2021-02-14T19:38:34Z"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
Retrieve a voucher
Retrieves the details of an existing voucher. You need only supply the unique voucher identifier that was returned upon voucher creation.
Preview
This endpoint is currently in preview and might change in the future.
We’re excited to hear your feedback and ideas. Please send an email to support@gigs.com to share your thoughts.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required- Name
voucher
- Type
- string
- Description
The unique identifier for the voucher.
Example:vou_0SNlurA049MEWV0h2jfjkdiOdplN
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
voucher
.
required- Name
id
- Type
- string
- Description
Unique identifier for the voucher.
Example:vou_0SNlurA049MEWV0h2jfjkdiOdplN
required- Name
name
- Type
- string
- Description
The voucher's name.
Example:Monthly Basic 15%
required- Name
priceDiscount
- Type
- nullable object
- Description
- The price amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
required- Name
priceDiscountPercentage
- Type
- nullable number
- Description
The percentage amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
Example:30.12
>= 1
<= 100
required- Name
recurrence
- Type
- object
- Description
- Details on whether and for how long the discounts applied via the voucher recur.
required- Name
redemptions
- Type
- integer
- Description
Number of times the voucher has been redeemed.
Example:2
required- Name
restrictions
- Type
- object
- Description
- Conditions under which the voucher can be used.
required- Name
retiredReason
- Type
- nullable string
- Description
Label indicating the reason why the voucher is retired.
Allowed values:, manualAction, expired, maxRedemptionsReached, unknown
required- Name
status
- Type
- string
- Description
- Allowed values:
available, retired
required- Name
createdAt
- Type
- string
- Description
Time when the voucher was created.
Example:2021-02-14T19:38:34Z
required
Request
curl https://api.gigs.com/projects/{project}/vouchers/{voucher} \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": 30.12,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"restrictions": {
"expiresAt": "2021-04-14T19:38:34Z",
"maximumRedemptions": null
},
"retiredReason": null,
"status": "available",
"createdAt": "2021-02-14T19:38:34Z"
}
List all vouchers
Returns a list of vouchers. The vouchers returned are sorted by creation date, with the most recently created vouchers appearing first.
Preview
This endpoint is currently in preview and might change in the future.
We’re excited to hear your feedback and ideas. Please send an email to support@gigs.com to share your thoughts.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required
Query Parameters
- Name
status
- Type
- array
- Description
The status to filter the vouchers by.
Default:available
- Name
code
- Type
- string
- Description
The voucher code to filter the vouchers by.
Example:SummerCode
- Name
after
- Type
- string
- Description
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.
- Name
before
- Type
- string
- Description
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.
- Name
limit
- Type
- integer
- Description
The limit of items to be returned in the list, between 0 and 200.
Default:10
>= 0
<= 200
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
list
.
required- Name
items
- Type
- array
- Description
- List of objects of type `voucher`.
required- Name
moreItemsAfter
- Type
- nullable string
- Description
A unique identifier to be used as
after
pagination parameter if more items are available sorted after the current batch of items.
required- Name
moreItemsBefore
- Type
- nullable string
- Description
A unique identifier to be used as
before
pagination parameter if more items are available sorted before the current batch of items.
required
Request
curl https://api.gigs.com/projects/{project}/vouchers \
-X GET \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Response
{
"object": "list",
"items": [
{
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": 30.12,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"restrictions": {
"expiresAt": "2021-04-14T19:38:34Z",
"maximumRedemptions": null
},
"retiredReason": null,
"status": "available",
"createdAt": "2021-02-14T19:38:34Z"
}
],
"moreItemsAfter": null,
"moreItemsBefore": null
}
Create a voucher
Creates a new voucher in the specified project.
Preview
This endpoint is currently in preview and might change in the future.
We’re excited to hear your feedback and ideas. Please send an email to support@gigs.com to share your thoughts.
Body
- Name
name
- Type
- string
- Description
The voucher's name.
Example:Monthly Basic 15%
required- Name
priceDiscount
- Type
- nullable object
- Description
- The price amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
- Name
priceDiscountPercentage
- Type
- nullable number
- Description
The percentage amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
Example:30.12
>= 1
<= 100
- Name
recurrence
- Type
- object
- Description
- Details on whether and for how long the discounts applied via the voucher recur.
required- Name
restrictions
- Type
- nullable object
- Description
- Conditions under which the voucher can be used.
Path Parameters
- Name
project
- Type
- string
- Description
The unique identifier for the project.
Example:gigs
required
Response Schemas
- Name
object
- Type
- string
- Description
Type of object is always
voucher
.
required- Name
id
- Type
- string
- Description
Unique identifier for the voucher.
Example:vou_0SNlurA049MEWV0h2jfjkdiOdplN
required- Name
name
- Type
- string
- Description
The voucher's name.
Example:Monthly Basic 15%
required- Name
priceDiscount
- Type
- nullable object
- Description
- The price amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
required- Name
priceDiscountPercentage
- Type
- nullable number
- Description
The percentage amount of the discount applied via the voucher. A voucher object has always either a priceDiscount or a priceDiscountPercentage.
Example:30.12
>= 1
<= 100
required- Name
recurrence
- Type
- object
- Description
- Details on whether and for how long the discounts applied via the voucher recur.
required- Name
redemptions
- Type
- integer
- Description
Number of times the voucher has been redeemed.
Example:2
required- Name
restrictions
- Type
- object
- Description
- Conditions under which the voucher can be used.
required- Name
retiredReason
- Type
- nullable string
- Description
Label indicating the reason why the voucher is retired.
Allowed values:, manualAction, expired, maxRedemptionsReached, unknown
required- Name
status
- Type
- string
- Description
- Allowed values:
available, retired
required- Name
createdAt
- Type
- string
- Description
Time when the voucher was created.
Example:2021-02-14T19:38:34Z
required
Request
curl https://api.gigs.com/projects/{project}/vouchers \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d "{\"name\":\"Monthly Basic 15%\",\"priceDiscount\":{\"amount\":999,\"currency\":\"USD\"},\"priceDiscountPercentage\":null,\"recurrence\":{\"type\":\"once\",\"durationInMonths\":null},\"restrictions\":{\"expiresAt\":\"2021-04-14T19:38:34Z\"}}"
Responses
{
"object": "voucher",
"id": "vou_0SNlurA049MEWV0h2jfjkdiOdplN",
"name": "Monthly Basic 15%",
"priceDiscount": {
"amount": 999,
"currency": "USD"
},
"priceDiscountPercentage": null,
"recurrence": {
"type": "once",
"durationInMonths": null
},
"redemptions": 2,
"restrictions": {
"expiresAt": "2021-04-14T19:38:34Z",
"maximumRedemptions": null
},
"retiredReason": null,
"status": "available",
"createdAt": "2021-02-14T19:38:34Z"
}