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

{
  "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

FieldTypeDescription
pageInfoPageInfoPagination metadata for the result set.
pageInfo.perPageintegerNumber of coupons returned per page.
pageInfo.currentPageintegerThe current page number.
pageInfo.totalintegerTotal number of coupons matching the query.
pageInfo.hasMorebooleanIndicates whether additional pages of results exist.
courseCouponsCourseCoupon[]Array of course coupon objects matching the query.
courseCoupons.iduuidUnique identifier for the coupon.
courseCoupons.courseIduuidUnique identifier of the course this coupon applies to.
courseCoupons.codestringThe coupon code string a learner enters at checkout.
courseCoupons.createdAtISO 8601 timestampDate and time the coupon was created, in ISO 8601 format.
courseCoupons.updatedAtISO 8601 timestampDate and time the coupon was last modified, in ISO 8601 format.
courseCoupons.maxRedemptionsintegerMaximum number of times this coupon can be redeemed; 0 indicates no limit.
courseCoupons.percentOffintegerPercentage discount applied to the course price when this coupon is redeemed.
courseCoupons.amountOffInCentsintegerFixed discount amount in cents applied to the course price when this coupon is redeemed.
courseCoupons.timesRedeemedintegerNumber of times this coupon has been redeemed so far.
courseCoupons.redeemByISO 8601 timestampExpiration date and time after which the coupon can no longer be redeemed, in ISO 8601 format.
courseCoupons.appliesToUserAppliesToUserRestricts coupon eligibility by user type; for example, "existing" limits redemption to existing users.
courseCoupons.activebooleanIndicates whether the coupon is currently active and available for redemption.
courseCoupons.generatedbooleanIndicates whether the coupon code was system-generated rather than manually created.
courseCoupons.accessDaysintegerNumber of days of course access granted when this coupon is redeemed.