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

Filter Purchasable Targets

Return the subset of candidate TI item UUIDs that are active and priced.

Given candidate TI item UUIDs, returns the subset a learner could actually purchase — the same rule the learner-facing read uses to suppress a CTA. Use this from an admin content picker so a manager can only attach a target that is active, of an allowed kind, and priced.

Allowed kinds: course, learningPath, subscription (any purchasable, priced bundle), collection (a purchasable, priced discount group). Order and de-duplication follow the request; a non-UUID element is rejected (see Errors).

POSThttps://example.thoughtindustries.com/v3/admin/content/alternate-purchase-paths/purchasable-targets

This endpoint is served by the v3 API. Its full path is https://{instance}.thoughtindustries.com/v3/admin/content/alternate-purchase-paths/purchasable-targets, not the /incoming/v2 base URL used by the rest of this reference. Use the full URL shown in the examples below.

Example request

curl -X POST "https://{instance}.thoughtindustries.com/v3/admin/content/alternate-purchase-paths/purchasable-targets" \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "targetIds": [
    "7a6b5c4d-3e2f-1a0b-9c8d-7e6f5a4b3c2d",
    "9c8d7e6f-5a4b-3c2d-1e0f-9a8b7c6d5e4f"
  ]
}'

Parameters

Requires the settings.alternatePurchasePaths permission. A company API key satisfies this.

NameTypeRequiredLocationDescription
targetIdsuuid[]YesbodyCandidate target UUIDs. Maximum 200.

Example response (201)

This is a POST, so the status is 201 even though nothing is created. Note the data wrapper — v3 endpoints nest their payload under data.

{
  "data": {
    "purchasableIds": [
      "7a6b5c4d-3e2f-1a0b-9c8d-7e6f5a4b3c2d"
    ]
  }
}

An empty or all-unpurchasable input returns "purchasableIds": [].

Errors

More than 200 IDs, or a non-UUID element, is rejected by the global ValidationPipe as 400 with code: "BAD_REQUEST" and category: "CLIENT_ERROR". The failed constraints are surfaced in message (joined with ; ) and in metadata.errors — e.g. "each value in targetIds must be a UUID" or "targetIds must contain no more than 200 elements".

A missing or invalid API key returns 401. A manager session without settings.alternatePurchasePaths returns 403.

Rate limit

120 requests per 60 seconds, counted per instance. This limit is specific to this endpoint and is independent of the per-family rate limits that apply to /incoming/v2 endpoints.