get_discounts
Get discount code analytics. Reports: summary (usage rate, AOV impact), top_codes (best performing codes by revenue/usage), code_details (specific code performance — requires 'code' param), by_product (which discount codes were applied to which products — optionally filter by 'code').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | For code_details: required. For by_product: optional filter by specific discount code. | |
| limit | No | For top_codes/by_product: number of results (default: 10/20) | |
| report | Yes | Report type | |
| sortBy | No | For top_codes: sort field | |
| _offset | No | Pagination offset. If a response includes _pagination.hasMore=true, use _offset to fetch the next page. | |
| endDate | No | End date (YYYY-MM-DD) | |
| startDate | No | Start date (YYYY-MM-DD) |