Skip to main content
https://.thoughtindustries.com

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.

GEThttps://example.thoughtindustries.com/incoming/v2/course-coupons

Example request

curl "https://example.thoughtindustries.com/incoming/v2/course-coupons" \
  -H 'Authorization: Bearer YOUR_API_KEY'

Parameters

NameTypeRequiredLocationDescription
courseIdsuuid[]YesqueryOne or more course UUIDs whose coupons to retrieve.
pageintegerNoqueryPage number to retrieve for paginated results.
codestringNoqueryFilters results to the coupon matching this code.
activebooleanNoqueryWhen 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

FieldTypeDescription
pageInfoobjectPage-based pagination metadata for the result set.
pageInfo.currentPageintegerThe current page number.
pageInfo.totalintegerTotal number of records matching the query.
pageInfo.hasMorebooleanWhether additional pages of results are available.
courseCouponsobject[]Array of course coupon objects for the current page.
courseCoupons.iduuidIdentifier of the course coupon.
courseCoupons.courseIduuidIdentifier of the course the coupon applies to.
courseCoupons.codestringRedemption code for the coupon.
courseCoupons.createdAtISO 8601 timestampTimestamp when the coupon was created.
courseCoupons.updatedAtISO 8601 timestampTimestamp when the coupon was last updated.
courseCoupons.maxRedemptionsintegerMaximum number of redemptions allowed.
courseCoupons.percentOffnumberPercentage discount applied.
courseCoupons.amountOffInCentsintegerFlat discount amount in cents.
courseCoupons.timesRedeemedintegerNumber of times the coupon has been redeemed.
courseCoupons.redeemByISO 8601 timestampDate by which the coupon must be redeemed.
courseCoupons.appliesToUserbooleanWhether the coupon applies to the current user.
courseCoupons.activebooleanWhether the coupon is currently active.
courseCoupons.generatedbooleanWhether the coupon was auto-generated.
courseCoupons.accessDaysintegerAccess days granted when the coupon is redeemed.