Students, teachers and partners
Check a discount code
check_discount_code
- Read-only
Checks whether a discount code is usable by this account right now and what it is worth — a fixed amount or a percentage, and the exam categories it applies to. It reserves nothing, uses nothing up and changes nothing; the code is still applied on the panel’s payment screen. A code that is unknown, expired, used up or not for this account comes back as valid:false rather than an error, so ask once and report the answer.
- For
- Students, teachers and partners
- Needs
- Read access (
mcp:read) - What it changes
- Read-only. It only reads. Nothing changes.
Inputs
brandstringWhich olympiad this is about. Required unless the connection covers exactly one, in which case that one is used.
one of
codinggmathhilinguaneostemcodestringrequiredThe code exactly as the person has it.
min length
1max length64categoriesarray of stringOptional: the exam category ids being bought, from find_exams_for_me or list_study_materials. Narrows the check to those categories.
max items
20
The server refuses a call that carries any field not listed here, and says which one.
Answers instead of a result
What the tool says when it cannot do what was asked, and what to do about it.
not_connectedinsufficient_scoperate_limitedwrites_disabledtemporarily_unavailableupstream_errorbrand_not_allowedrole_requiredtenant_account_missing