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

List Redemption Code Groups

Returns a paginated list of redemption code groups

List redemption code groups, paginated. Results are 50 per page.

GEThttps://example.thoughtindustries.com/incoming/v2/redemptionCodes

Example request

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

Parameters

NameTypeRequiredLocationDescription
cursorstringNoqueryPagination cursor (opaque token returned in pageInfo.cursor).
querystringNoqueryFree-text search.
sortstringNoquerySort order (e.g. label:asc).

Example response

{
  "redemptionCodeGroups": [
    {
      "id": "rc100000-1111-2222-3333-444455556666",
      "label": "Spring Promo",
      "redeemedCodesCount": 18,
      "totalCodesCount": 100,
      "expirationDate": "2025-06-30T23:59:59.000Z",
      "accessDays": 90,
      "accessExpirationDate": null,
      "uploaded": false,
      "gift": false,
      "client": null,
      "courses": [
        {
          "id": "8f2a1c34-5b6d-4e7f-9a01-2b3c4d5e6f70",
          "title": "Onboarding Essentials"
        }
      ],
      "learningPaths": [],
      "bundles": [],
      "licenses": []
    },
    {
      "id": "rc100001-7777-8888-9999-aaaabbbbcccc",
      "label": "Partner Gift Codes",
      "redeemedCodesCount": 250,
      "totalCodesCount": 250,
      "expirationDate": null,
      "accessDays": null,
      "accessExpirationDate": "2026-01-01T00:00:00.000Z",
      "uploaded": true,
      "gift": true,
      "client": {
        "id": "c1ie7700-1111-2222-3333-444455556666",
        "name": "Acme Corp"
      },
      "courses": [],
      "learningPaths": [
        {
          "id": "1d9e8f70-4a3b-4c2d-8e1f-0a9b8c7d6e5f",
          "name": "Manager Fundamentals"
        }
      ],
      "bundles": [],
      "licenses": []
    }
  ],
  "pageInfo": {
    "total": 2,
    "hasMore": true,
    "cursor": "eyJwYWdlIjoyfQ=="
  }
}

Example queries

Free-text search by label:

curl "https://example.thoughtindustries.com/incoming/v2/redemptionCodes?query=spring" \
  -H 'Authorization: Bearer YOUR_API_KEY'

Sort results:

curl "https://example.thoughtindustries.com/incoming/v2/redemptionCodes?sort=label:asc" \
  -H 'Authorization: Bearer YOUR_API_KEY'

Paginate using cursor from previous response:

curl "https://example.thoughtindustries.com/incoming/v2/redemptionCodes?cursor=eyJwYWdlIjoyfQ==" \
  -H 'Authorization: Bearer YOUR_API_KEY'

Response fields

FieldTypeDescription
redemptionCodeGroups[].iduuidGroup ID.
redemptionCodeGroups[].labelstringGroup label.
redemptionCodeGroups[].redeemedCodesCountintegerNumber of codes redeemed.
redemptionCodeGroups[].totalCodesCountintegerTotal codes in group.
redemptionCodeGroups[].expirationDateISO 8601 dateWhen codes expire.
redemptionCodeGroups[].accessDaysintegerDays of access after redemption.
redemptionCodeGroups[].accessExpirationDateISO 8601 dateAbsolute access expiry.
redemptionCodeGroups[].uploadedbooleanTrue if codes were imported (vs generated).
redemptionCodeGroups[].giftbooleanWhether group is gift-type.
redemptionCodeGroups[].clientobject{ id, name } or null.
redemptionCodeGroups[].coursesobject[]Array of { id, title }.
redemptionCodeGroups[].learningPathsobject[]Array of { id, name }.
redemptionCodeGroups[].bundlesobject[]Array of { id, name }.
redemptionCodeGroups[].licensesobject[]Array of { id, name }.
pageInfo.totalintegerTotal number of groups.
pageInfo.hasMorebooleanWhether more pages exist.
pageInfo.cursorstringCursor for next page (only present when hasMore is true).