Course Coupons
Returns a paginated list of course coupons, optionally filtered by course, coupon code, or active status
Returns a paginated list of course coupons, optionally filtered by course, coupon code, or active status.
GET
https://example.thoughtindustries.com/incoming/v2/course-couponsExample request
curl "https://example.thoughtindustries.com/incoming/v2/course-coupons" \
-H 'Authorization: Bearer YOUR_API_KEY'Parameters
| Name | Type | Required | Location | Description |
|---|---|---|---|---|
courseIds | uuid[] | Yes | query | One or more course UUIDs whose coupons to retrieve. |
page | integer | No | query | Page number to retrieve for paginated results. |
code | string | No | query | Filters results to the coupon matching this code. |
active | boolean | No | query | When true, returns only active coupons; when false, returns only inactive coupons. |
Example response
{
"pageInfo": {
"currentPage": 0,
"total": 0,
"hasMore": true
},
"courseCoupons": [
{
"id": "00000000-0000-0000-0000-000000000000",
"courseId": "00000000-0000-0000-0000-000000000000",
"code": "string",
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"maxRedemptions": 0,
"percentOff": 0,
"amountOffInCents": 0,
"timesRedeemed": 0,
"redeemBy": "2024-01-01T00:00:00.000Z",
"appliesToUser": true,
"active": true,
"generated": true,
"accessDays": 0
}
]
}Response fields
| Field | Type | Description |
|---|---|---|
pageInfo | object | Page-based pagination metadata for the result set. |
pageInfo.currentPage | integer | The current page number. |
pageInfo.total | integer | Total number of records matching the query. |
pageInfo.hasMore | boolean | Whether additional pages of results are available. |
courseCoupons | object[] | Array of course coupon objects for the current page. |
courseCoupons.id | uuid | Identifier of the course coupon. |
courseCoupons.courseId | uuid | Identifier of the course the coupon applies to. |
courseCoupons.code | string | Redemption code for the coupon. |
courseCoupons.createdAt | ISO 8601 timestamp | Timestamp when the coupon was created. |
courseCoupons.updatedAt | ISO 8601 timestamp | Timestamp when the coupon was last updated. |
courseCoupons.maxRedemptions | integer | Maximum number of redemptions allowed. |
courseCoupons.percentOff | number | Percentage discount applied. |
courseCoupons.amountOffInCents | integer | Flat discount amount in cents. |
courseCoupons.timesRedeemed | integer | Number of times the coupon has been redeemed. |
courseCoupons.redeemBy | ISO 8601 timestamp | Date by which the coupon must be redeemed. |
courseCoupons.appliesToUser | boolean | Whether the coupon applies to the current user. |
courseCoupons.active | boolean | Whether the coupon is currently active. |
courseCoupons.generated | boolean | Whether the coupon was auto-generated. |
courseCoupons.accessDays | integer | Access days granted when the coupon is redeemed. |