get_coupon_usage
Retrieve coupon usage details and associated payments for a given promotion and coupon code. Returns paginated payment records, newest first, for reporting and verification.
Instructions
๐ข READ-ONLY ยท GET /v2/promotions/{pid}/coupons/{cid}/usage
Get coupon usage. Returns information about the coupon specified by the provided promotion id and coupon code. More specifically, the coupon usage details are listed along with the asocciated payments.The payments are in sorted order, with the most recently created payment appearing first, and the list is paginated, with a limit of 50 payments per page.
Behavior: read-only lookup against the live school; creates, changes and deletes nothing. Auth (admin API token + Lw-Client id) is injected server-side, never by the model; calls are throttled to stay under LearnWorlds' 30-per-10s cap and retried on 429/5xx.
Parameters: results are paged โ walk them with page.
Returns: HTTP <status> followed by the LearnWorlds JSON response body. A non-2xx reply surfaces as a tool error with that status and the API error payload โ 401 bad/expired token, 403 not permitted, 404 no such record, 422 rejected input.
Use when: safe to call speculatively for lookups and reporting. Not for changing anything โ use the matching ๐ก write tool. Related Promotions tools: create_coupon_promotion, get_promotions_coupons, create_coupons_promotion_bulk, create_promotion, get_promotion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cid | Yes | Coupon code | |
| pid | Yes | Promotion Id | |
| page | No | Filter by the page number. In case page number is higher than the maximum one, the results of last page will be returned |