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
{
"data": {
"APICourseCoupons": {
"pageInfo": {
"perPage": 0,
"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": "existing",
"active": true,
"generated": true,
"accessDays": 0
}
]
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
pageInfo | PageInfo | Pagination metadata for the result set. |
pageInfo.perPage | integer | Number of coupons returned per page. |
pageInfo.currentPage | integer | The current page number. |
pageInfo.total | integer | Total number of coupons matching the query. |
pageInfo.hasMore | boolean | Indicates whether additional pages of results exist. |
courseCoupons | CourseCoupon[] | Array of course coupon objects matching the query. |
courseCoupons.id | uuid | Unique identifier for the coupon. |
courseCoupons.courseId | uuid | Unique identifier of the course this coupon applies to. |
courseCoupons.code | string | The coupon code string a learner enters at checkout. |
courseCoupons.createdAt | ISO 8601 timestamp | Date and time the coupon was created, in ISO 8601 format. |
courseCoupons.updatedAt | ISO 8601 timestamp | Date and time the coupon was last modified, in ISO 8601 format. |
courseCoupons.maxRedemptions | integer | Maximum number of times this coupon can be redeemed; 0 indicates no limit. |
courseCoupons.percentOff | integer | Percentage discount applied to the course price when this coupon is redeemed. |
courseCoupons.amountOffInCents | integer | Fixed discount amount in cents applied to the course price when this coupon is redeemed. |
courseCoupons.timesRedeemed | integer | Number of times this coupon has been redeemed so far. |
courseCoupons.redeemBy | ISO 8601 timestamp | Expiration date and time after which the coupon can no longer be redeemed, in ISO 8601 format. |
courseCoupons.appliesToUser | AppliesToUser | Restricts coupon eligibility by user type; for example, "existing" limits redemption to existing users. |
courseCoupons.active | boolean | Indicates whether the coupon is currently active and available for redemption. |
courseCoupons.generated | boolean | Indicates whether the coupon code was system-generated rather than manually created. |
courseCoupons.accessDays | integer | Number of days of course access granted when this coupon is redeemed. |