Read your wallet: credits granted, spent and remaining
- Bearer token
- Permission
wallet/read - Core record
The wallet is not self-service: Main Team opens it only after an agreement and on your request (ask your Main Team contact or info@main-team.org), and Main Team then tells you how many credits you have for each olympiad. Without one this answers 403 wallet_not_enabled; bank transfer stays the default way to pay.
Your wallet holds the credits Main Team gave you, counted separately for each olympiad. A credit is a convenience: the application is marked paid at once, and the amount is still due to Main Team and settled afterwards by bank transfer. One credit pays one priced application (createApplication with walletPay, payApplicationFromWallet, payApplicationsFromWallet); a free exam never uses one.
The answer lists every olympiad, zeros included, with granted, spent, remaining and what the spent credits paid for in cents of that organization’s currency (USD for neo, EUR otherwise), plus credit totals. Money is never summed across currencies.
A wallet that is closed still answers, with enabled: false, so its history stays readable. An account that never had one answers 403 wallet_not_enabled.
Responses
200 OK
Success: message is "Wallet fetched successfully.".
Body
successbooleanrequiredAlways
trueon a success.one of
truemessagestringrequiredexample
Wallet fetched successfully.dataobject · WalletResponserequiredYour wallet: the credits Main Team gave you, how many you spent and how many remain, for each olympiad.
4 fields of data
enabledbooleanrequiredfalsewhile the wallet is closed. A closed wallet can still be read, but pays nothing.example
trueenabledAtstringnullableWhen it was switched on.
format
date-timeexample2026-09-01T09:30:00.000Zorganizationsarray of WalletOrganizationResponserequiredOne entry per organization, zeros included.
7 fields of each item
organizationstringrequiredThe organization’s slug.
example
stemorganizationIdstringrequiredThe organization’s
_id, as:organizationIdtakes it.example
64b7f0c2a1d3e4f5a6b7c8d9currencystringrequiredThe currency this organization charges in, and so what
spentAmountis counted in:USDfor neo,EURfor the others.one of
EURUSDexample
EURgrantednumberrequiredCredits granted to your account for this organization, in total.
example
50spentnumberrequiredCredits spent so far: one per paid application.
example
9remainingnumberrequiredgrantedminusspent: what you can still spend.example
41spentAmountnumberrequiredWhat the spent credits paid for, in cents of
currency(a coding application at the bundle price counts what it was settled at).example
45000
totalsobject · WalletTotalsResponserequiredThe credit totals across the organizations.
3 fields of totals
grantednumberrequiredCredits granted, all organizations.
example
120spentnumberrequiredCredits spent, all organizations.
example
19remainingnumberrequiredCredits left, all organizations.
example
101
Headers
X-RateLimit-LimitintegerRequests your account may make to this operation per window (100).
X-RateLimit-RemainingintegerRequests left in the current window.
X-RateLimit-ResetintegerSeconds until the current window ends.
Example
{
"success": true,
"message": "Wallet fetched successfully.",
"data": {
"enabled": true,
"enabledAt": "2026-09-01T09:30:00.000Z",
"organizations": [
{
"organization": "stem",
"organizationId": "64b7f0c2a1d3e4f5a6b7c8d9",
"currency": "EUR",
"granted": 50,
"spent": 9,
"remaining": 41,
"spentAmount": 45000
}
],
"totals": {
"granted": 120,
"spent": 19,
"remaining": 101
}
}
}401 Unauthorized
unauthorized: The token is missing or malformed, is not signed with your account’s apiSecret, breaks the iat and exp rules, has expired or been revoked, or its account is not active. All of these answer the same.
When
unauthorizedThe token is missing or malformed, is not signed with your account’s
apiSecret, breaks theiatandexprules, has expired or been revoked, or its account is not active. All of these answer the same.
Example
{
"error": {
"code": "unauthorized",
"documentation_url": "https://hub.main-team.org/api/errors#unauthorized",
"message": "Authentication is required or the provided credentials are invalid.",
"request_id": "0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e"
}
}Fields of the error body
errorobject · ErrorDetailrequiredWhat went wrong.
5 fields of error
codestringrequiredA stable machine code: branch on this. Each one is explained at
documentation_url.one of
invalid_emailbad_requestsubdivision_requiredunauthorizedforbiddennot_foundconflictpayload_too_largeunsupported_media_typeunprocessable_entitytoo_many_requestsinternal_errorservice_unavailableexample
not_foundmessagestringrequiredWritten for a person, and may change: never branch on it.
example
Not found!documentation_urlstringrequiredWhere this code is explained.
format
uriexamplehttps://hub.main-team.org/api/errors#not_foundrequest_idstringrequiredThis request’s id, also sent as the
X-Request-Idresponse header: the one you sent, when it was acceptable, or else one the API made. Quote it when you report a problem.example
0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8edetailsobjectPresent only where an operation says so, and then with the shape that operation documents — the rows it could not accept, say. Treat it as absent everywhere else, and ignore a
detailsyou do not recognise.
403 Forbidden
forbidden: The token is valid, but no role on your account allowswallet/readonmto(the target of operations without:organizationIdin their path), or a role denies it.forbidden: Your account has no wallet, or it is closed. A wallet is not self-service: Main Team opens it only after an agreement and on your request (ask your Main Team contact or info@main-team.org).error.details.reasoniswallet_not_enabled.
When
forbiddenThe token is valid, but no role on your account allows
wallet/readonmto(the target of operations without:organizationIdin their path), or a role denies it.forbiddenYour account has no wallet, or it is closed. A wallet is not self-service: Main Team opens it only after an agreement and on your request (ask your Main Team contact or info@main-team.org).
error.details.reasoniswallet_not_enabled.
Example
{
"error": {
"code": "forbidden",
"documentation_url": "https://hub.main-team.org/api/errors#forbidden",
"message": "Insufficient role permissions",
"request_id": "0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e"
}
}Fields of the error body
errorobject · ErrorDetailrequiredWhat went wrong.
5 fields of error
codestringrequiredA stable machine code: branch on this. Each one is explained at
documentation_url.one of
invalid_emailbad_requestsubdivision_requiredunauthorizedforbiddennot_foundconflictpayload_too_largeunsupported_media_typeunprocessable_entitytoo_many_requestsinternal_errorservice_unavailableexample
not_foundmessagestringrequiredWritten for a person, and may change: never branch on it.
example
Not found!documentation_urlstringrequiredWhere this code is explained.
format
uriexamplehttps://hub.main-team.org/api/errors#not_foundrequest_idstringrequiredThis request’s id, also sent as the
X-Request-Idresponse header: the one you sent, when it was acceptable, or else one the API made. Quote it when you report a problem.example
0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8edetailsobjectPresent only where an operation says so, and then with the shape that operation documents — the rows it could not accept, say. Treat it as absent everywhere else, and ignore a
detailsyou do not recognise.
429 Too many requests
too_many_requests: Your account has made more than 100 requests to this operation in the current 60-second window. Wait the seconds in Retry-After before sending again.
When
too_many_requestsYour account has made more than 100 requests to this operation in the current 60-second window. Wait the seconds in
Retry-Afterbefore sending again.
Headers
Retry-AfterintegerSeconds to wait before sending again; a request sent sooner is refused too.
Example
{
"error": {
"code": "too_many_requests",
"documentation_url": "https://hub.main-team.org/api/errors#too_many_requests",
"message": "Too many requests to this operation. Wait the number of seconds in Retry-After, then try again.",
"request_id": "0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e"
}
}Fields of the error body
errorobject · ErrorDetailrequiredWhat went wrong.
5 fields of error
codestringrequiredA stable machine code: branch on this. Each one is explained at
documentation_url.one of
invalid_emailbad_requestsubdivision_requiredunauthorizedforbiddennot_foundconflictpayload_too_largeunsupported_media_typeunprocessable_entitytoo_many_requestsinternal_errorservice_unavailableexample
not_foundmessagestringrequiredWritten for a person, and may change: never branch on it.
example
Not found!documentation_urlstringrequiredWhere this code is explained.
format
uriexamplehttps://hub.main-team.org/api/errors#not_foundrequest_idstringrequiredThis request’s id, also sent as the
X-Request-Idresponse header: the one you sent, when it was acceptable, or else one the API made. Quote it when you report a problem.example
0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8edetailsobjectPresent only where an operation says so, and then with the shape that operation documents — the rows it could not accept, say. Treat it as absent everywhere else, and ignore a
detailsyou do not recognise.
500 Internal error
internal_error: Something failed on our side. Retry later, and quote request_id if it goes on.
When
internal_errorSomething failed on our side. Retry later, and quote
request_idif it goes on.
Example
{
"error": {
"code": "internal_error",
"documentation_url": "https://hub.main-team.org/api/errors#internal_error",
"message": "An unexpected error occurred.",
"request_id": "0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e"
}
}Fields of the error body
errorobject · ErrorDetailrequiredWhat went wrong.
5 fields of error
codestringrequiredA stable machine code: branch on this. Each one is explained at
documentation_url.one of
invalid_emailbad_requestsubdivision_requiredunauthorizedforbiddennot_foundconflictpayload_too_largeunsupported_media_typeunprocessable_entitytoo_many_requestsinternal_errorservice_unavailableexample
not_foundmessagestringrequiredWritten for a person, and may change: never branch on it.
example
Not found!documentation_urlstringrequiredWhere this code is explained.
format
uriexamplehttps://hub.main-team.org/api/errors#not_foundrequest_idstringrequiredThis request’s id, also sent as the
X-Request-Idresponse header: the one you sent, when it was acceptable, or else one the API made. Quote it when you report a problem.example
0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8edetailsobjectPresent only where an operation says so, and then with the shape that operation documents — the rows it could not accept, say. Treat it as absent everywhere else, and ignore a
detailsyou do not recognise.