[{"data":1,"prerenderedAt":1673},["ShallowReactive",2],{"api-nav":3,"api-spec:index":362,"api-spec:op:pay-application-from-wallet":677,"api-permissions-guide":1103,"api-reference-doc:pay-application-from-wallet":1104},[4,28,57,104,124,328,342],{"id":5,"title":6,"links":7,"groups":27},"start","Start here",[8,11,15,18,21,24],{"title":9,"to":10},"Overview","\u002Fapi",{"title":12,"to":13,"status":14},"Quickstart","\u002Fapi\u002Fquickstart","available",{"title":16,"to":17,"status":14},"Environments","\u002Fapi\u002Fenvironments",{"title":19,"to":20,"status":14},"Authentication","\u002Fapi\u002Fauthentication",{"title":22,"to":23,"status":14},"Organizations","\u002Fapi\u002Forganizations",{"title":25,"to":26,"status":14},"Permissions","\u002Fapi\u002Fpermissions",[],{"id":29,"title":30,"links":31,"groups":56},"concepts","Concepts",[32,35,38,41,44,47,50,53],{"title":33,"to":34,"status":14},"Requests and responses","\u002Fapi\u002Frequests-and-responses",{"title":36,"to":37,"status":14},"Identifiers","\u002Fapi\u002Fidentifiers",{"title":39,"to":40,"status":14},"Pagination","\u002Fapi\u002Fpagination",{"title":42,"to":43},"Errors","\u002Fapi\u002Ferrors",{"title":45,"to":46,"status":14},"Rate limits","\u002Fapi\u002Frate-limits",{"title":48,"to":49,"status":14},"Retries","\u002Fapi\u002Fretries-and-idempotency",{"title":51,"to":52,"status":14},"Security","\u002Fapi\u002Fsecurity",{"title":54,"to":55,"status":14},"Versioning","\u002Fapi\u002Fversioning",[],{"id":58,"title":59,"links":60,"groups":103},"resources","Guides",[61,64,67,70,73,76,79,82,85,88,91,94,97,100],{"title":62,"to":63,"status":14},"Students","\u002Fapi\u002Fguides\u002Fstudents",{"title":65,"to":66,"status":14},"Bulk registration","\u002Fapi\u002Fguides\u002Fbulk-registration",{"title":68,"to":69,"status":14},"Passwords","\u002Fapi\u002Fguides\u002Fpasswords",{"title":71,"to":72,"status":14},"Supervisors","\u002Fapi\u002Fguides\u002Fsupervisors",{"title":74,"to":75,"status":14},"Reference data","\u002Fapi\u002Fguides\u002Freference-data",{"title":77,"to":78,"status":14},"API account","\u002Fapi\u002Fguides\u002Fapi-account",{"title":80,"to":81,"status":14},"Sign-in links","\u002Fapi\u002Fguides\u002Fsign-in-links",{"title":83,"to":84,"status":14},"Exams","\u002Fapi\u002Fguides\u002Fexams",{"title":86,"to":87,"status":14},"Applications","\u002Fapi\u002Fguides\u002Fapplications",{"title":89,"to":90,"status":14},"Settling payments","\u002Fapi\u002Fguides\u002Fsettling-payments",{"title":92,"to":93,"status":14},"Wallet","\u002Fapi\u002Fguides\u002Fwallet",{"title":95,"to":96,"status":14},"Group challenges","\u002Fapi\u002Fguides\u002Fgroup-challenges",{"title":98,"to":99,"status":14},"Certificates and reports","\u002Fapi\u002Fguides\u002Fcertificates-and-reports",{"title":101,"to":102,"status":14},"Build your own client","\u002Fapi\u002Fclients\u002Fbuild-your-own",[],{"id":105,"title":106,"links":107,"groups":123},"tutorials","Tutorials",[108,111,114,117,120],{"title":109,"to":110,"status":14},"Register and apply","\u002Fapi\u002Ftutorials\u002Fregister-and-apply",{"title":112,"to":113,"status":14},"Send a student to the olympiad's site","\u002Fapi\u002Ftutorials\u002Fsend-student-to-panel",{"title":115,"to":116,"status":14},"Change an application","\u002Fapi\u002Ftutorials\u002Fchange-an-application",{"title":118,"to":119,"status":14},"Collect results","\u002Fapi\u002Ftutorials\u002Fcollect-results",{"title":121,"to":122,"status":14},"Token handling","\u002Fapi\u002Ftutorials\u002Ftoken-handling",[],{"id":125,"title":126,"links":127,"groups":134},"reference","Reference",[128,131],{"title":129,"to":130},"All endpoints","\u002Fapi\u002Freference",{"title":132,"to":133},"Sandbox console","\u002Fapi\u002Fconsole",[135,144,154,163,187,227,233,251,282,298],{"tag":136,"slug":137,"links":138},"Health","health",[139],{"title":140,"to":141,"method":142,"deprecated":143},"Check that the API is up","\u002Fapi\u002Freference\u002Fget-health","GET",false,{"tag":77,"slug":145,"links":146},"api-account",[147,151],{"title":148,"to":149,"method":150,"deprecated":143},"Revoke the token you send, before it expires","\u002Fapi\u002Freference\u002Frevoke-token","POST",{"title":152,"to":153,"method":142,"deprecated":143},"Fetch the API account your token belongs to","\u002Fapi\u002Freference\u002Fget-current-api-account",{"tag":92,"slug":155,"links":156},"wallet",[157,160],{"title":158,"to":159,"method":142,"deprecated":143},"Read your wallet: credits granted, spent and remaining","\u002Fapi\u002Freference\u002Fget-wallet",{"title":161,"to":162,"method":142,"deprecated":143},"List your wallet history","\u002Fapi\u002Freference\u002Flist-wallet-entries",{"tag":74,"slug":164,"links":165},"reference-data",[166,169,172,175,178,181,184],{"title":167,"to":168,"method":142,"deprecated":143},"List the countries a student can be registered in","\u002Fapi\u002Freference\u002Flist-countries",{"title":170,"to":171,"method":142,"deprecated":143},"Fetch one country by its id","\u002Fapi\u002Freference\u002Fget-country",{"title":173,"to":174,"method":142,"deprecated":143},"List the subdivisions (states) of a country","\u002Fapi\u002Freference\u002Flist-country-subdivisions",{"title":176,"to":177,"method":142,"deprecated":143},"List the grades a student can be registered with","\u002Fapi\u002Freference\u002Flist-grades",{"title":179,"to":180,"method":142,"deprecated":143},"Fetch one grade by its id","\u002Fapi\u002Freference\u002Fget-grade",{"title":182,"to":183,"method":142,"deprecated":143},"List the organizations and their ids","\u002Fapi\u002Freference\u002Flist-organizations",{"title":185,"to":186,"method":142,"deprecated":143},"Fetch one organization by its id","\u002Fapi\u002Freference\u002Fget-organization",{"tag":62,"slug":188,"links":189},"students",[190,193,196,199,202,205,208,212,215,218,221,224],{"title":191,"to":192,"method":142,"deprecated":143},"List your students","\u002Fapi\u002Freference\u002Flist-students",{"title":194,"to":195,"method":150,"deprecated":143},"Register a student","\u002Fapi\u002Freference\u002Fregister-student",{"title":197,"to":198,"method":150,"deprecated":143},"Check a registration without registering the student","\u002Fapi\u002Freference\u002Fcheck-student-registration",{"title":200,"to":201,"method":150,"deprecated":143},"Register many students at once","\u002Fapi\u002Freference\u002Fcreate-student-import",{"title":203,"to":204,"method":142,"deprecated":143},"Follow a batch of students you sent","\u002Fapi\u002Freference\u002Fget-student-import",{"title":206,"to":207,"method":142,"deprecated":143},"Fetch one of your students","\u002Fapi\u002Freference\u002Fget-student",{"title":209,"to":210,"method":211,"deprecated":143},"Update one of your students","\u002Fapi\u002Freference\u002Fupdate-student","PUT",{"title":213,"to":214,"method":211,"deprecated":143},"Set the sign-in password of one of your students","\u002Fapi\u002Freference\u002Fset-student-password",{"title":216,"to":217,"method":142,"deprecated":143},"List your students who can use this organization","\u002Fapi\u002Freference\u002Flist-org-students",{"title":219,"to":220,"method":142,"deprecated":143},"Fetch one of your students, if they can use this organization","\u002Fapi\u002Freference\u002Fget-org-student",{"title":222,"to":223,"method":211,"deprecated":143},"Update one of your students and give them access to this organization","\u002Fapi\u002Freference\u002Fupdate-org-student",{"title":225,"to":226,"method":211,"deprecated":143},"Link one of your students to a supervisor on this organization","\u002Fapi\u002Freference\u002Flink-student-supervisor",{"tag":80,"slug":228,"links":229},"sign-in-links",[230],{"title":231,"to":232,"method":150,"deprecated":143},"Create a single-use sign-in link for one of your students","\u002Fapi\u002Freference\u002Fcreate-signin-link",{"tag":83,"slug":234,"links":235},"exams",[236,239,242,245,248],{"title":237,"to":238,"method":142,"deprecated":143},"List the exams open for applications","\u002Fapi\u002Freference\u002Flist-exams",{"title":240,"to":241,"method":142,"deprecated":143},"List an organization’s exam categories","\u002Fapi\u002Freference\u002Flist-exam-categories",{"title":243,"to":244,"method":142,"deprecated":143},"Fetch one exam category","\u002Fapi\u002Freference\u002Fget-exam-category",{"title":246,"to":247,"method":142,"deprecated":143},"List the exams one of your students can apply to","\u002Fapi\u002Freference\u002Flist-available-exams",{"title":249,"to":250,"method":142,"deprecated":143},"Fetch one exam that is open for applications","\u002Fapi\u002Freference\u002Fget-exam",{"tag":86,"slug":252,"links":253},"applications",[254,257,260,263,266,269,272,275,279],{"title":255,"to":256,"method":142,"deprecated":143},"List your students’ applications in this organization","\u002Fapi\u002Freference\u002Flist-applications",{"title":258,"to":259,"method":150,"deprecated":143},"Enter one of your students for an exam","\u002Fapi\u002Freference\u002Fcreate-application",{"title":261,"to":262,"method":142,"deprecated":143},"List your students’ applications for one exam","\u002Fapi\u002Freference\u002Flist-exam-applications",{"title":264,"to":265,"method":142,"deprecated":143},"List one of your students’ applications in this organization","\u002Fapi\u002Freference\u002Flist-student-applications",{"title":267,"to":268,"method":150,"deprecated":143},"Pay several applications from your wallet","\u002Fapi\u002Freference\u002Fpay-applications-from-wallet",{"title":270,"to":271,"method":142,"deprecated":143},"Fetch one of your students’ applications","\u002Fapi\u002Freference\u002Fget-application",{"title":273,"to":274,"method":211,"deprecated":143},"Move one of your students’ applications to another exam","\u002Fapi\u002Freference\u002Fmove-application",{"title":276,"to":277,"method":278,"deprecated":143},"Withdraw one of your students from an exam","\u002Fapi\u002Freference\u002Fdelete-application","DELETE",{"title":280,"to":281,"method":150,"deprecated":143},"Pay one application from your wallet","\u002Fapi\u002Freference\u002Fpay-application-from-wallet",{"tag":283,"slug":284,"links":285},"Documents","documents",[286,289,292,295],{"title":287,"to":288,"method":142,"deprecated":143},"Download a certificate file","\u002Fapi\u002Freference\u002Fdownload-certificate",{"title":290,"to":291,"method":142,"deprecated":143},"List one of your students’ released certificates","\u002Fapi\u002Freference\u002Flist-student-certificates",{"title":293,"to":294,"method":142,"deprecated":143},"Download a result report file","\u002Fapi\u002Freference\u002Fdownload-report",{"title":296,"to":297,"method":142,"deprecated":143},"List one of your students’ released result reports","\u002Fapi\u002Freference\u002Flist-student-reports",{"tag":95,"slug":299,"links":300},"group-challenges",[301,304,307,310,313,316,319,322,325],{"title":302,"to":303,"method":142,"deprecated":143},"List the group challenges an organization runs","\u002Fapi\u002Freference\u002Flist-group-challenges",{"title":305,"to":306,"method":142,"deprecated":143},"Fetch one group challenge","\u002Fapi\u002Freference\u002Fget-group-challenge",{"title":308,"to":309,"method":142,"deprecated":143},"List the groups your students are in for a group challenge","\u002Fapi\u002Freference\u002Flist-group-challenge-groups",{"title":311,"to":312,"method":142,"deprecated":143},"Fetch one group, with its steps and files","\u002Fapi\u002Freference\u002Fget-group-challenge-group",{"title":314,"to":315,"method":142,"deprecated":143},"List what has happened in one group","\u002Fapi\u002Freference\u002Flist-group-challenge-activity",{"title":317,"to":318,"method":150,"deprecated":143},"Send a group’s finished work for one of your students","\u002Fapi\u002Freference\u002Fsubmit-group-challenge-work",{"title":320,"to":321,"method":150,"deprecated":143},"Submit one step of a group for one of your students","\u002Fapi\u002Freference\u002Fsubmit-group-challenge-step",{"title":323,"to":324,"method":142,"deprecated":143},"List your students’ eligibility and groups for a group challenge","\u002Fapi\u002Freference\u002Flist-group-challenge-students",{"title":326,"to":327,"method":142,"deprecated":143},"Fetch one of your students’ eligibility and group for a group challenge","\u002Fapi\u002Freference\u002Fget-group-challenge-student",{"id":329,"title":330,"links":331,"groups":341},"agents","AI agents",[332,335,338],{"title":333,"to":334},"AI connections","\u002Fapi\u002Fmcp",{"title":336,"to":337},"What it can do","\u002Fapi\u002Fmcp\u002Ftools",{"title":339,"to":340},"Agent skills","\u002Fapi\u002Fskills",[],{"id":343,"title":344,"links":345,"groups":361},"help","Help",[346,349,352,355,358],{"title":347,"to":348,"status":14},"Glossary","\u002Fapi\u002Fglossary",{"title":350,"to":351,"status":14},"FAQ","\u002Fapi\u002Ffaq",{"title":353,"to":354,"status":14},"Troubleshooting","\u002Fapi\u002Ftroubleshooting",{"title":356,"to":357,"status":14},"Support","\u002Fapi\u002Fsupport",{"title":359,"to":360},"Changelog","\u002Fapi\u002Fchangelog",[],{"title":363,"version":364,"description":365,"baseUrl":366,"groups":367},"Main Team API","1.7.1","Register your students, enter them for exams, follow their applications, download their certificates and reports, and sign them in to an olympiad’s site.\n\nEvery operation except the health check needs a bearer token: a JWT you sign yourself with HS256 and your account’s `apiSecret`. Put your `apiKey` in both the `kid` header and the `sub` claim, and set `iat` and `exp` at most 3600 seconds apart. Every authentication failure answers the same `401 unauthorized`.","https:\u002F\u002Fapi.main-team.org",[368,379,394,408,449,514,522,552,602,627],{"tag":136,"slug":137,"description":369,"guide":17,"operations":370},"Whether the API is up. No token needed, so it is the first call to make against an environment.",[371],{"operationId":372,"slug":373,"method":142,"path":374,"tag":136,"summary":140,"deprecated":143,"public":375,"permission":376,"scope":377,"order":378},"getHealth","get-health","\u002Fv1\u002Fhealth",true,null,"public",1,{"tag":77,"slug":145,"description":380,"guide":78,"operations":381},"The account your token belongs to, and revoking a token before it expires.",[382,389],{"operationId":383,"slug":384,"method":150,"path":385,"tag":77,"summary":148,"deprecated":143,"public":143,"permission":386,"scope":387,"order":388},"revokeToken","revoke-token","\u002Fv1\u002Fapi-account\u002Frevoke-token","api\u002F*:$org:$ID","flat",2,{"operationId":390,"slug":391,"method":142,"path":392,"tag":77,"summary":152,"deprecated":143,"public":143,"permission":386,"scope":387,"order":393},"getCurrentApiAccount","get-current-api-account","\u002Fv1\u002Fapi-account\u002Fvalidate-me",3,{"tag":92,"slug":155,"description":395,"guide":93,"operations":396},"The credits Main Team gave you, for each olympiad, and the history of every credit added and spent. One credit pays one priced application; the payment operations are under Applications.",[397,403],{"operationId":398,"slug":399,"method":142,"path":400,"tag":92,"summary":158,"deprecated":143,"public":143,"permission":401,"scope":387,"order":402},"getWallet","get-wallet","\u002Fv1\u002Fwallet","wallet\u002Fread:$org:$ID",4,{"operationId":404,"slug":405,"method":142,"path":406,"tag":92,"summary":161,"deprecated":143,"public":143,"permission":401,"scope":387,"order":407},"listWalletEntries","list-wallet-entries","\u002Fv1\u002Fwallet\u002Fentries",5,{"tag":74,"slug":164,"description":409,"guide":75,"operations":410},"Countries, grades and organizations. A student’s `country` and `grade` take these `_id`s, and so does every `:organizationId` in a path.",[411,417,422,427,433,438,444],{"operationId":412,"slug":413,"method":142,"path":414,"tag":74,"summary":167,"deprecated":143,"public":143,"permission":415,"scope":387,"order":416},"listCountries","list-countries","\u002Fv1\u002Fcountry","country\u002Fread:$org:$ID",6,{"operationId":418,"slug":419,"method":142,"path":420,"tag":74,"summary":170,"deprecated":143,"public":143,"permission":415,"scope":387,"order":421},"getCountry","get-country","\u002Fv1\u002Fcountry\u002F{id}",7,{"operationId":423,"slug":424,"method":142,"path":425,"tag":74,"summary":173,"deprecated":143,"public":143,"permission":415,"scope":387,"order":426},"listCountrySubdivisions","list-country-subdivisions","\u002Fv1\u002Fcountry\u002F{id}\u002Fsubdivision",8,{"operationId":428,"slug":429,"method":142,"path":430,"tag":74,"summary":176,"deprecated":143,"public":143,"permission":431,"scope":387,"order":432},"listGrades","list-grades","\u002Fv1\u002Fgrade","grade\u002Fread:$org:$ID",9,{"operationId":434,"slug":435,"method":142,"path":436,"tag":74,"summary":179,"deprecated":143,"public":143,"permission":431,"scope":387,"order":437},"getGrade","get-grade","\u002Fv1\u002Fgrade\u002F{id}",10,{"operationId":439,"slug":440,"method":142,"path":441,"tag":74,"summary":182,"deprecated":143,"public":143,"permission":442,"scope":387,"order":443},"listOrganizations","list-organizations","\u002Fv1\u002Forganization","organization\u002Fread:$org:$ID",11,{"operationId":445,"slug":446,"method":142,"path":447,"tag":74,"summary":185,"deprecated":143,"public":143,"permission":442,"scope":387,"order":448},"getOrganization","get-organization","\u002Fv1\u002Forganization\u002F{id}",12,{"tag":62,"slug":188,"description":450,"guide":63,"operations":451},"Registering your students, reading and updating them, setting a password, and what each organization holds for them. You only ever see the students your account registered.",[452,458,463,468,473,478,483,488,494,500,505,509],{"operationId":453,"slug":454,"method":142,"path":455,"tag":62,"summary":191,"deprecated":143,"public":143,"permission":456,"scope":387,"order":457},"listStudents","list-students","\u002Fv1\u002Fstudent","student\u002Fread:$org:$ID",13,{"operationId":459,"slug":460,"method":150,"path":455,"tag":62,"summary":194,"deprecated":143,"public":143,"permission":461,"scope":387,"order":462},"registerStudent","register-student","student\u002Fcreate:$org:$ID",14,{"operationId":464,"slug":465,"method":150,"path":466,"tag":62,"summary":197,"deprecated":143,"public":143,"permission":461,"scope":387,"order":467},"checkStudentRegistration","check-student-registration","\u002Fv1\u002Fstudent\u002Fcheck",15,{"operationId":469,"slug":470,"method":150,"path":471,"tag":62,"summary":200,"deprecated":143,"public":143,"permission":461,"scope":387,"order":472},"createStudentImport","create-student-import","\u002Fv1\u002Fstudent\u002Fimport",16,{"operationId":474,"slug":475,"method":142,"path":476,"tag":62,"summary":203,"deprecated":143,"public":143,"permission":461,"scope":387,"order":477},"getStudentImport","get-student-import","\u002Fv1\u002Fstudent\u002Fimport\u002F{importId}",17,{"operationId":479,"slug":480,"method":142,"path":481,"tag":62,"summary":206,"deprecated":143,"public":143,"permission":456,"scope":387,"order":482},"getStudent","get-student","\u002Fv1\u002Fstudent\u002F{studentId}",18,{"operationId":484,"slug":485,"method":211,"path":481,"tag":62,"summary":209,"deprecated":143,"public":143,"permission":486,"scope":387,"order":487},"updateStudent","update-student","student\u002Fupdate:$org:$ID",19,{"operationId":489,"slug":490,"method":211,"path":491,"tag":62,"summary":213,"deprecated":143,"public":143,"permission":492,"scope":387,"order":493},"setStudentPassword","set-student-password","\u002Fv1\u002Fstudent\u002F{studentId}\u002Fpassword","auth\u002Fsignin:$org:$ID",20,{"operationId":495,"slug":496,"method":142,"path":497,"tag":62,"summary":216,"deprecated":143,"public":143,"permission":456,"scope":498,"order":499},"listOrgStudents","list-org-students","\u002Fv1\u002F{organizationId}\u002Fstudent","organization",21,{"operationId":501,"slug":502,"method":142,"path":503,"tag":62,"summary":219,"deprecated":143,"public":143,"permission":456,"scope":498,"order":504},"getOrgStudent","get-org-student","\u002Fv1\u002F{organizationId}\u002Fstudent\u002F{studentId}",22,{"operationId":506,"slug":507,"method":211,"path":503,"tag":62,"summary":222,"deprecated":143,"public":143,"permission":486,"scope":498,"order":508},"updateOrgStudent","update-org-student",23,{"operationId":510,"slug":511,"method":211,"path":512,"tag":62,"summary":225,"deprecated":143,"public":143,"permission":486,"scope":498,"order":513},"linkStudentSupervisor","link-student-supervisor","\u002Fv1\u002F{organizationId}\u002Fstudent\u002F{studentId}\u002Fsupervisor",24,{"tag":80,"slug":228,"description":515,"guide":81,"operations":516},"Links that sign one of your students into an olympiad’s site. Each works once and expires two minutes after it is issued.",[517],{"operationId":518,"slug":519,"method":150,"path":520,"tag":80,"summary":231,"deprecated":143,"public":143,"permission":492,"scope":498,"order":521},"createSigninLink","create-signin-link","\u002Fv1\u002F{organizationId}\u002Fauth\u002Fsignin",25,{"tag":83,"slug":234,"description":523,"guide":84,"operations":524},"The exam categories and exams an organization runs, and the ones one of your students can apply to.",[525,531,537,542,547],{"operationId":526,"slug":527,"method":142,"path":528,"tag":83,"summary":237,"deprecated":143,"public":143,"permission":529,"scope":498,"order":530},"listExams","list-exams","\u002Fv1\u002F{organizationId}\u002Fexam","exam\u002Fread:$org:$ID",26,{"operationId":532,"slug":533,"method":142,"path":534,"tag":83,"summary":240,"deprecated":143,"public":143,"permission":535,"scope":498,"order":536},"listExamCategories","list-exam-categories","\u002Fv1\u002F{organizationId}\u002Fexam-category","exam-category\u002Fread:$org:$ID",27,{"operationId":538,"slug":539,"method":142,"path":540,"tag":83,"summary":243,"deprecated":143,"public":143,"permission":535,"scope":498,"order":541},"getExamCategory","get-exam-category","\u002Fv1\u002F{organizationId}\u002Fexam-category\u002F{categoryId}",28,{"operationId":543,"slug":544,"method":142,"path":545,"tag":83,"summary":246,"deprecated":143,"public":143,"permission":529,"scope":498,"order":546},"listAvailableExams","list-available-exams","\u002Fv1\u002F{organizationId}\u002Fexam\u002Favailable\u002F{studentId}",29,{"operationId":548,"slug":549,"method":142,"path":550,"tag":83,"summary":249,"deprecated":143,"public":143,"permission":529,"scope":498,"order":551},"getExam","get-exam","\u002Fv1\u002F{organizationId}\u002Fexam\u002F{examId}",30,{"tag":86,"slug":252,"description":553,"guide":87,"operations":554},"Entering your students for exams: creating, reading, moving and deleting their applications, and paying them from your wallet.",[555,561,566,571,576,582,587,592,597],{"operationId":556,"slug":557,"method":142,"path":558,"tag":86,"summary":255,"deprecated":143,"public":143,"permission":559,"scope":498,"order":560},"listApplications","list-applications","\u002Fv1\u002F{organizationId}\u002Fapplication","application\u002Fread:$org:$ID",31,{"operationId":562,"slug":563,"method":150,"path":558,"tag":86,"summary":258,"deprecated":143,"public":143,"permission":564,"scope":498,"order":565},"createApplication","create-application","application\u002Fcreate:$org:$ID",32,{"operationId":567,"slug":568,"method":142,"path":569,"tag":86,"summary":261,"deprecated":143,"public":143,"permission":559,"scope":498,"order":570},"listExamApplications","list-exam-applications","\u002Fv1\u002F{organizationId}\u002Fapplication\u002Fexam-applications\u002F{examId}",33,{"operationId":572,"slug":573,"method":142,"path":574,"tag":86,"summary":264,"deprecated":143,"public":143,"permission":559,"scope":498,"order":575},"listStudentApplications","list-student-applications","\u002Fv1\u002F{organizationId}\u002Fapplication\u002Fstudent-applications\u002F{studentId}",34,{"operationId":577,"slug":578,"method":150,"path":579,"tag":86,"summary":267,"deprecated":143,"public":143,"permission":580,"scope":498,"order":581},"payApplicationsFromWallet","pay-applications-from-wallet","\u002Fv1\u002F{organizationId}\u002Fapplication\u002Fwallet-pay","application\u002Fpay:$org:$ID",35,{"operationId":583,"slug":584,"method":142,"path":585,"tag":86,"summary":270,"deprecated":143,"public":143,"permission":559,"scope":498,"order":586},"getApplication","get-application","\u002Fv1\u002F{organizationId}\u002Fapplication\u002F{applicationId}",36,{"operationId":588,"slug":589,"method":211,"path":585,"tag":86,"summary":273,"deprecated":143,"public":143,"permission":590,"scope":498,"order":591},"moveApplication","move-application","application\u002Fupdate:$org:$ID",37,{"operationId":593,"slug":594,"method":278,"path":585,"tag":86,"summary":276,"deprecated":143,"public":143,"permission":595,"scope":498,"order":596},"deleteApplication","delete-application","application\u002Fdelete:$org:$ID",38,{"operationId":598,"slug":599,"method":150,"path":600,"tag":86,"summary":280,"deprecated":143,"public":143,"permission":580,"scope":498,"order":601},"payApplicationFromWallet","pay-application-from-wallet","\u002Fv1\u002F{organizationId}\u002Fapplication\u002F{applicationId}\u002Fwallet-pay",39,{"tag":283,"slug":284,"description":603,"guide":99,"operations":604},"Your students’ certificates and reports: listing them and downloading the files.",[605,611,616,622],{"operationId":606,"slug":607,"method":142,"path":608,"tag":283,"summary":287,"deprecated":143,"public":143,"permission":609,"scope":498,"order":610},"downloadCertificate","download-certificate","\u002Fv1\u002F{organizationId}\u002Fcertificate\u002Fdownload\u002F{certificateId}","certificate\u002Fread:$org:$ID",40,{"operationId":612,"slug":613,"method":142,"path":614,"tag":283,"summary":290,"deprecated":143,"public":143,"permission":609,"scope":498,"order":615},"listStudentCertificates","list-student-certificates","\u002Fv1\u002F{organizationId}\u002Fcertificate\u002F{userId}",41,{"operationId":617,"slug":618,"method":142,"path":619,"tag":283,"summary":293,"deprecated":143,"public":143,"permission":620,"scope":498,"order":621},"downloadReport","download-report","\u002Fv1\u002F{organizationId}\u002Freport\u002Fdownload\u002F{reportId}","report\u002Fread:$org:$ID",42,{"operationId":623,"slug":624,"method":142,"path":625,"tag":283,"summary":296,"deprecated":143,"public":143,"permission":620,"scope":498,"order":626},"listStudentReports","list-student-reports","\u002Fv1\u002F{organizationId}\u002Freport\u002F{userId}",43,{"tag":95,"slug":299,"description":628,"guide":96,"operations":629},"Online group challenges your students take part in: the challenges, which of your students can join, the groups they are in, each step and its files, what happened in a group, and submitting on your student’s behalf.",[630,636,641,646,651,656,662,667,672],{"operationId":631,"slug":632,"method":142,"path":633,"tag":95,"summary":302,"deprecated":143,"public":143,"permission":634,"scope":498,"order":635},"listGroupChallenges","list-group-challenges","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge","group-challenge\u002Fread:$org:$ID",44,{"operationId":637,"slug":638,"method":142,"path":639,"tag":95,"summary":305,"deprecated":143,"public":143,"permission":634,"scope":498,"order":640},"getGroupChallenge","get-group-challenge","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}",45,{"operationId":642,"slug":643,"method":142,"path":644,"tag":95,"summary":308,"deprecated":143,"public":143,"permission":634,"scope":498,"order":645},"listGroupChallengeGroups","list-group-challenge-groups","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}\u002Fgroup",46,{"operationId":647,"slug":648,"method":142,"path":649,"tag":95,"summary":311,"deprecated":143,"public":143,"permission":634,"scope":498,"order":650},"getGroupChallengeGroup","get-group-challenge-group","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}\u002Fgroup\u002F{groupId}",47,{"operationId":652,"slug":653,"method":142,"path":654,"tag":95,"summary":314,"deprecated":143,"public":143,"permission":634,"scope":498,"order":655},"listGroupChallengeActivity","list-group-challenge-activity","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}\u002Fgroup\u002F{groupId}\u002Factivity",48,{"operationId":657,"slug":658,"method":150,"path":659,"tag":95,"summary":317,"deprecated":143,"public":143,"permission":660,"scope":498,"order":661},"submitGroupChallengeWork","submit-group-challenge-work","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}\u002Fgroup\u002F{groupId}\u002Ffinal-submit","group-challenge\u002Fsubmit:$org:$ID",49,{"operationId":663,"slug":664,"method":150,"path":665,"tag":95,"summary":320,"deprecated":143,"public":143,"permission":660,"scope":498,"order":666},"submitGroupChallengeStep","submit-group-challenge-step","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}\u002Fgroup\u002F{groupId}\u002Fstep\u002F{stepId}\u002Fsubmit",50,{"operationId":668,"slug":669,"method":142,"path":670,"tag":95,"summary":323,"deprecated":143,"public":143,"permission":634,"scope":498,"order":671},"listGroupChallengeStudents","list-group-challenge-students","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}\u002Fstudent",51,{"operationId":673,"slug":674,"method":142,"path":675,"tag":95,"summary":326,"deprecated":143,"public":143,"permission":634,"scope":498,"order":676},"getGroupChallengeStudent","get-group-challenge-student","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}\u002Fstudent\u002F{studentId}",52,{"operationId":598,"slug":599,"method":150,"path":600,"tag":86,"summary":280,"deprecated":143,"public":143,"permission":580,"scope":498,"order":601,"description":678,"permissions":679,"errors":680,"guide":376,"parameters":748,"requestBody":376,"responses":760,"successStatus":1101,"kind":1102,"paginated":143,"baseUrl":366,"tagDescription":553,"sandbox":375},"Pays the pending payment of one application of one of your students from your wallet: one credit of this organization, the payment marked `paid`, and an entry in your wallet history (`listWalletEntries`). No body.\n\nA free exam takes no credit, and an application this wallet already paid answers `200` with `charged: false`, so a retry is safe. A payment settled another way is `409` `already_paid`; a canceled one `409` `payment_canceled`; a card payment the student still has open `409` `payment_in_progress`. On `coding` the price is the bundle price when the student has already paid a bundle exam.\n\nNeeds an enabled wallet, which Main Team opens only after an agreement and on your request (otherwise `403` `wallet_not_enabled`), and the `application\u002Fpay` permission on this organization. To pay several at once use `payApplicationsFromWallet`.",[580],[681,686,690,695,700,705,708,718,722,726,730,734,738,742],{"code":682,"message":683,"status":684,"when":685},"bad_request","Invalid value for '_id': expected ObjectId.",400,"`applicationId` is not 24 hexadecimal digits.",{"code":687,"status":688,"when":689},"unauthorized",401,"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.",{"code":691,"message":692,"status":693,"when":694},"forbidden","Insufficient role permissions",403,"The token is valid, but no role on your account allows `application\u002Fpay` on the organization in the path, or a role denies it.",{"code":691,"details":696,"message":698,"status":693,"when":699},{"reason":697},"wallet_not_enabled","No wallet is enabled for your account. Ask your Main Team contact to open one.","Your account has no wallet, or it is closed (a wallet is opened only by Main Team, after an agreement and on your request: ask your Main Team contact or info@main-team.org). Asked for by `walletPay: true` even when no credit would be taken. `error.details.reason` is `wallet_not_enabled`.",{"code":701,"message":702,"status":703,"when":704},"not_found","Organization not found!",404,"`organizationId` is not the `_id` of an organization.",{"code":701,"message":706,"status":703,"when":707},"Application not found!","No application of your students has this id: it matches nothing, or the application belongs to another account’s student. Both get the same answer.",{"code":709,"details":710,"status":716,"when":717},"conflict",{"organizations":711,"reason":715},[712],{"available":378,"needed":393,"organization":713,"organizationId":714,"short":388},"stem","64b7f0c2a1d3e4f5a6b7c8d9","insufficient_credits",409,"The wallet holds fewer credits than the call needs. Nothing was paid or written. `error.details.reason` is `insufficient_credits`, and `error.details.organizations` lists `organizationId`, `organization`, `needed`, `available` and `short`.",{"code":709,"details":719,"status":716,"when":721},{"reason":720},"already_paid","The payment was settled another way (a bank transfer, a card), so there is nothing to take. `error.details.reason` is `already_paid`.",{"code":709,"details":723,"status":716,"when":725},{"reason":724},"payment_canceled","The payment is canceled. `error.details.reason` is `payment_canceled`.",{"code":709,"details":727,"status":716,"when":729},{"reason":728},"payment_in_progress","The student has a card payment open for this application (opened in the last 25 hours). `error.details.reason` is `payment_in_progress`; try again once it has finished or expired.",{"code":709,"details":731,"status":716,"when":733},{"reason":732},"payment_changed","The payment changed while it was being paid and the call could not settle it after retrying. Nothing was taken. `error.details.reason` is `payment_changed`; read the application and try again.",{"code":735,"status":736,"when":737},"too_many_requests",429,"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.",{"code":739,"status":740,"when":741},"internal_error",500,"Something failed on our side. Retry later, and quote `request_id` if it goes on.",{"code":743,"details":744,"status":746,"when":747},"service_unavailable",{"reason":745},"wallet_unavailable",503,"The wallet is not available in this environment yet. Nothing was paid or written. `error.details.reason` is `wallet_unavailable`.",[749,756],{"description":750,"example":714,"in":751,"name":752,"required":375,"schema":753},"The organization’s `_id`: 24 hexadecimal digits, as `listOrganizations` (`GET \u002Fv1\u002Forganization`) lists it.","path","organizationId",{"pattern":754,"type":755},"^[0-9a-f]{24}$","string",{"description":757,"in":751,"name":758,"required":375,"schema":759},"The application’s `_id`, from `createApplication` or one of the application lists.","applicationId",{"type":755},{"200":761,"400":889,"401":932,"403":954,"404":979,"409":1002,"429":1027,"500":1053,"503":1075},{"content":762,"description":877,"headers":878},{"application\u002Fjson":763},{"examples":764,"schema":784},{"nothingTaken":765,"success":778},{"summary":766,"value":767},"The exam is free, or this wallet already paid it.",{"data":768,"message":777,"success":375},{"amount":769,"applicationId":770,"charged":375,"currency":771,"entryId":772,"paymentId":773,"reason":774,"reference":775,"wallet":776},5000,"6650a1b2c3d4e5f6a7b8c9e5","EUR","6650a1b2c3d4e5f6a7b8c9f2","6650a1b2c3d4e5f6a7b8c9e6","free","stx-19a2c3d4e5f6a7b8c9",{"granted":666,"organization":713,"remaining":615,"spent":432},"Nothing was taken from the wallet.",{"summary":779,"value":780},"Success",{"data":781,"message":783,"success":375},{"amount":769,"applicationId":770,"charged":375,"currency":771,"entryId":772,"paymentId":773,"reason":774,"reference":775,"wallet":782},{"granted":666,"organization":713,"remaining":615,"spent":432},"Application paid from wallet.",{"allOf":785},[786,825],{"x-ref":787,"description":788,"properties":789,"required":822,"type":820},"#\u002Fcomponents\u002Fschemas\u002FSuccessEnvelope","How every successful JSON response is wrapped. `data` is the result, and each operation declares its shape; list operations add `pagination`. `GET \u002Fv1\u002Fapi-account\u002Fvalidate-me` is the one operation that answers without this envelope.",{"success":790,"message":794,"pagination":797},{"description":791,"enum":792,"example":375,"type":793},"Always `true` on a success.",[375],"boolean",{"description":795,"example":796,"type":755},"A sentence saying what happened, written for a person. Branch on the status and on `data`, not on this.","Request completed successfully.",{"allOf":798,"description":821},[799],{"x-ref":800,"description":801,"properties":802,"required":815,"type":820},"#\u002Fcomponents\u002Fschemas\u002FPaginationMeta","Where one page sits in the whole list.",{"page":803,"limit":806,"total":809,"totalPages":813},{"description":804,"example":378,"minimum":378,"type":805},"The page returned, counting from 1.","number",{"description":807,"example":493,"maximum":808,"minimum":378,"type":805},"Items per page: the `limit` you sent, 20 if you sent none, and never more than 100.",100,{"description":810,"example":811,"minimum":812,"type":805},"Items across every page.",57,0,{"description":814,"example":393,"minimum":812,"type":805},"Pages at this `limit`: `total \u002F limit`, rounded up.",[816,817,818,819],"page","limit","total","totalPages","object","On list operations only.",[823,824],"success","message",{"properties":826,"required":875,"type":820},{"message":827,"data":828},{"example":783,"type":755},{"x-ref":829,"description":830,"properties":831,"required":870,"type":820},"#\u002Fcomponents\u002Fschemas\u002FPayApplicationResponse","The answer of `payApplicationFromWallet`.",{"applicationId":832,"paymentId":834,"charged":836,"reason":838,"amount":841,"currency":843,"reference":847,"entryId":849,"wallet":851},{"description":833,"example":770,"type":755},"The application that was paid.",{"description":835,"example":773,"type":755},"Its payment.",{"description":837,"example":375,"type":793},"`true` when a credit was taken by this call. `false` when there was nothing to take: see `reason`.",{"description":839,"enum":840,"example":774,"type":755},"Why nothing was taken, only when `charged` is `false`. `free`: the exam costs nothing, and a free exam never uses a credit. `already_paid`: this wallet already paid it, in an earlier call; `reference` and `entryId` are that payment’s.",[774,720],{"description":842,"example":769,"type":805},"The amount the payment was settled at, in cents: the exam’s price, or the coding bundle price when it is lower. `0` for a free exam.",{"description":844,"enum":845,"example":771,"type":755},"The currency of `amount`: `USD` for neo, `EUR` otherwise.",[771,846],"USD",{"description":848,"example":775,"type":755},"The transaction code of the payment (`stx-...`), the same `reference` the application reads show on a settled payment.",{"description":850,"example":772,"type":755},"The `_id` of the wallet entry (`listWalletEntries`).",{"allOf":852,"description":869},[853],{"x-ref":854,"description":855,"properties":856,"required":865,"type":820},"#\u002Fcomponents\u002Fschemas\u002FWalletBalanceViewResponse","One organization’s balance after a wallet payment.",{"organization":857,"granted":859,"spent":861,"remaining":863},{"description":858,"example":713,"type":755},"The organization’s slug.",{"description":860,"example":666,"type":805},"Credits granted to you in total.",{"description":862,"example":432,"type":805},"Credits spent in total.",{"description":864,"example":615,"type":805},"`granted` minus `spent`.",[498,866,867,868],"granted","spent","remaining","The organization’s balance after the call.",[758,871,872,873,874,155],"paymentId","charged","amount","currency",[876],"data","Success: `message` is \"Application paid from wallet.\".\n\nOr `message` is \"Nothing was taken from the wallet.\": The exam is free, or this wallet already paid it.",{"X-RateLimit-Limit":879,"X-RateLimit-Remaining":883,"X-RateLimit-Reset":886},{"description":880,"schema":881},"Requests your account may make to this operation per window (100).",{"type":882},"integer",{"description":884,"schema":885},"Requests left in the current window.",{"type":882},{"description":887,"schema":888},"Seconds until the current window ends.",{"type":882},{"content":890,"description":931},{"application\u002Fjson":891},{"examples":892,"schema":898},{"bad_request":893},{"summary":682,"value":894},{"error":895},{"code":682,"documentation_url":896,"message":683,"request_id":897},"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#bad_request","0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e",{"x-ref":899,"description":900,"properties":901,"required":929,"type":820},"#\u002Fcomponents\u002Fschemas\u002FErrorEnvelope","How every error response is wrapped.",{"error":902},{"x-ref":903,"description":904,"properties":905,"required":925,"type":820},"#\u002Fcomponents\u002Fschemas\u002FErrorDetail","What went wrong.",{"code":906,"message":914,"documentation_url":917,"request_id":921,"details":923},{"description":907,"enum":908,"example":701,"type":755},"A stable machine code: branch on this. Each one is explained at `documentation_url`.",[909,682,910,687,691,701,709,911,912,913,735,739,743],"invalid_email","subdivision_required","payload_too_large","unsupported_media_type","unprocessable_entity",{"description":915,"example":916,"type":755},"Written for a person, and may change: never branch on it.","Not found!",{"description":918,"example":919,"format":920,"type":755},"Where this code is explained.","https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#not_found","uri",{"description":922,"example":897,"type":755},"This request’s id, also sent as the `X-Request-Id` response header: the one you sent, when it was acceptable, or else one the API made. Quote it when you report a problem.",{"additionalProperties":375,"description":924,"type":820},"Present 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 `details` you do not recognise.",[926,824,927,928],"code","documentation_url","request_id",[930],"error","`bad_request`: `applicationId` is not 24 hexadecimal digits.",{"content":933,"description":953},{"application\u002Fjson":934},{"examples":935,"schema":941},{"unauthorized":936},{"summary":687,"value":937},{"error":938},{"code":687,"documentation_url":939,"message":940,"request_id":897},"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#unauthorized","Authentication is required or the provided credentials are invalid.",{"x-ref":899,"description":900,"properties":942,"required":952,"type":820},{"error":943},{"x-ref":903,"description":904,"properties":944,"required":951,"type":820},{"code":945,"message":947,"documentation_url":948,"request_id":949,"details":950},{"description":907,"enum":946,"example":701,"type":755},[909,682,910,687,691,701,709,911,912,913,735,739,743],{"description":915,"example":916,"type":755},{"description":918,"example":919,"format":920,"type":755},{"description":922,"example":897,"type":755},{"additionalProperties":375,"description":924,"type":820},[926,824,927,928],[930],"`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.",{"content":955,"description":978},{"application\u002Fjson":956},{"examples":957,"schema":966},{"forbidden":958,"forbidden_2":962},{"summary":694,"value":959},{"error":960},{"code":691,"documentation_url":961,"message":692,"request_id":897},"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#forbidden",{"summary":699,"value":963},{"error":964},{"code":691,"details":965,"documentation_url":961,"message":698,"request_id":897},{"reason":697},{"x-ref":899,"description":900,"properties":967,"required":977,"type":820},{"error":968},{"x-ref":903,"description":904,"properties":969,"required":976,"type":820},{"code":970,"message":972,"documentation_url":973,"request_id":974,"details":975},{"description":907,"enum":971,"example":701,"type":755},[909,682,910,687,691,701,709,911,912,913,735,739,743],{"description":915,"example":916,"type":755},{"description":918,"example":919,"format":920,"type":755},{"description":922,"example":897,"type":755},{"additionalProperties":375,"description":924,"type":820},[926,824,927,928],[930],"- `forbidden`: The token is valid, but no role on your account allows `application\u002Fpay` on the organization in the path, or a role denies it.\n- `forbidden`: Your account has no wallet, or it is closed (a wallet is opened only by Main Team, after an agreement and on your request: ask your Main Team contact or info@main-team.org). Asked for by `walletPay: true` even when no credit would be taken. `error.details.reason` is `wallet_not_enabled`.",{"content":980,"description":1001},{"application\u002Fjson":981},{"examples":982,"schema":989},{"not_found":983,"not_found_2":986},{"summary":704,"value":984},{"error":985},{"code":701,"documentation_url":919,"message":702,"request_id":897},{"summary":707,"value":987},{"error":988},{"code":701,"documentation_url":919,"message":706,"request_id":897},{"x-ref":899,"description":900,"properties":990,"required":1000,"type":820},{"error":991},{"x-ref":903,"description":904,"properties":992,"required":999,"type":820},{"code":993,"message":995,"documentation_url":996,"request_id":997,"details":998},{"description":907,"enum":994,"example":701,"type":755},[909,682,910,687,691,701,709,911,912,913,735,739,743],{"description":915,"example":916,"type":755},{"description":918,"example":919,"format":920,"type":755},{"description":922,"example":897,"type":755},{"additionalProperties":375,"description":924,"type":820},[926,824,927,928],[930],"- `not_found`: `organizationId` is not the `_id` of an organization.\n- `not_found`: No application of your students has this id: it matches nothing, or the application belongs to another account’s student. Both get the same answer.",{"content":1003,"description":1026},{"application\u002Fjson":1004},{"examples":1005,"schema":1014},{"conflict":1006},{"summary":709,"value":1007},{"error":1008},{"code":709,"details":1009,"documentation_url":1012,"message":1013,"request_id":897},{"organizations":1010,"reason":715},[1011],{"available":378,"needed":393,"organization":713,"organizationId":714,"short":388},"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#conflict","The request conflicts with the current state of the resource.",{"x-ref":899,"description":900,"properties":1015,"required":1025,"type":820},{"error":1016},{"x-ref":903,"description":904,"properties":1017,"required":1024,"type":820},{"code":1018,"message":1020,"documentation_url":1021,"request_id":1022,"details":1023},{"description":907,"enum":1019,"example":701,"type":755},[909,682,910,687,691,701,709,911,912,913,735,739,743],{"description":915,"example":916,"type":755},{"description":918,"example":919,"format":920,"type":755},{"description":922,"example":897,"type":755},{"additionalProperties":375,"description":924,"type":820},[926,824,927,928],[930],"- `conflict`: The wallet holds fewer credits than the call needs. Nothing was paid or written. `error.details.reason` is `insufficient_credits`, and `error.details.organizations` lists `organizationId`, `organization`, `needed`, `available` and `short`.\n- `conflict`: The payment was settled another way (a bank transfer, a card), so there is nothing to take. `error.details.reason` is `already_paid`.\n- `conflict`: The payment is canceled. `error.details.reason` is `payment_canceled`.\n- `conflict`: The student has a card payment open for this application (opened in the last 25 hours). `error.details.reason` is `payment_in_progress`; try again once it has finished or expired.\n- `conflict`: The payment changed while it was being paid and the call could not settle it after retrying. Nothing was taken. `error.details.reason` is `payment_changed`; read the application and try again.",{"content":1028,"description":1048,"headers":1049},{"application\u002Fjson":1029},{"examples":1030,"schema":1036},{"too_many_requests":1031},{"summary":735,"value":1032},{"error":1033},{"code":735,"documentation_url":1034,"message":1035,"request_id":897},"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#too_many_requests","Too many requests to this operation. Wait the number of seconds in Retry-After, then try again.",{"x-ref":899,"description":900,"properties":1037,"required":1047,"type":820},{"error":1038},{"x-ref":903,"description":904,"properties":1039,"required":1046,"type":820},{"code":1040,"message":1042,"documentation_url":1043,"request_id":1044,"details":1045},{"description":907,"enum":1041,"example":701,"type":755},[909,682,910,687,691,701,709,911,912,913,735,739,743],{"description":915,"example":916,"type":755},{"description":918,"example":919,"format":920,"type":755},{"description":922,"example":897,"type":755},{"additionalProperties":375,"description":924,"type":820},[926,824,927,928],[930],"`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.",{"Retry-After":1050},{"description":1051,"schema":1052},"Seconds to wait before sending again; a request sent sooner is refused too.",{"type":882},{"content":1054,"description":1074},{"application\u002Fjson":1055},{"examples":1056,"schema":1062},{"internal_error":1057},{"summary":739,"value":1058},{"error":1059},{"code":739,"documentation_url":1060,"message":1061,"request_id":897},"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#internal_error","An unexpected error occurred.",{"x-ref":899,"description":900,"properties":1063,"required":1073,"type":820},{"error":1064},{"x-ref":903,"description":904,"properties":1065,"required":1072,"type":820},{"code":1066,"message":1068,"documentation_url":1069,"request_id":1070,"details":1071},{"description":907,"enum":1067,"example":701,"type":755},[909,682,910,687,691,701,709,911,912,913,735,739,743],{"description":915,"example":916,"type":755},{"description":918,"example":919,"format":920,"type":755},{"description":922,"example":897,"type":755},{"additionalProperties":375,"description":924,"type":820},[926,824,927,928],[930],"`internal_error`: Something failed on our side. Retry later, and quote `request_id` if it goes on.",{"content":1076,"description":1097,"headers":1098},{"application\u002Fjson":1077},{"examples":1078,"schema":1085},{"service_unavailable":1079},{"summary":743,"value":1080},{"error":1081},{"code":743,"details":1082,"documentation_url":1083,"message":1084,"request_id":897},{"reason":745},"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#service_unavailable","Not ready.",{"x-ref":899,"description":900,"properties":1086,"required":1096,"type":820},{"error":1087},{"x-ref":903,"description":904,"properties":1088,"required":1095,"type":820},{"code":1089,"message":1091,"documentation_url":1092,"request_id":1093,"details":1094},{"description":907,"enum":1090,"example":701,"type":755},[909,682,910,687,691,701,709,911,912,913,735,739,743],{"description":915,"example":916,"type":755},{"description":918,"example":919,"format":920,"type":755},{"description":922,"example":897,"type":755},{"additionalProperties":375,"description":924,"type":820},[926,824,927,928],[930],"`service_unavailable`: The wallet is not available in this environment yet. Nothing was paid or written. `error.details.reason` is `wallet_unavailable`.",{"Retry-After":1099},{"description":1051,"schema":1100},{"type":882},"200","envelope",{"path":26},{"id":1105,"title":280,"apiPath":600,"body":1106,"deprecated":143,"description":1666,"extension":1667,"meta":1668,"method":150,"navigation":375,"operationId":598,"order":1669,"path":281,"permission":580,"public":143,"seo":1670,"stem":1671,"summary":280,"tag":86,"__hash__":1672},"apiReference\u002Fapi\u002Freference\u002Fpay-application-from-wallet.md",{"type":1107,"value":1108,"toc":1664},"minimark",[1109,1660],[1110,1111,1112,1168,1371],"api-code-group",{},[1113,1114,1120],"pre",{"className":1115,"code":1116,"filename":1117,"language":1118,"meta":1119,"style":1119},"language-bash shiki shiki-themes github-light-high-contrast github-dark-high-contrast","# $TOKEN: a short-lived token you minted with your API key and secret\ncurl -sS -X POST 'https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fapplication\u002F\u003CapplicationId>\u002Fwallet-pay' \\\n  -H \"Authorization: Bearer $TOKEN\"\n","curl","bash","",[926,1121,1122,1130,1153],{"__ignoreMap":1119},[1123,1124,1126],"span",{"class":1125,"line":378},"line",[1123,1127,1129],{"class":1128},"sLBg1","# $TOKEN: a short-lived token you minted with your API key and secret\n",[1123,1131,1132,1135,1139,1142,1146,1149],{"class":1125,"line":388},[1123,1133,1117],{"class":1134},"soyes",[1123,1136,1138],{"class":1137},"s-5SL"," -sS",[1123,1140,1141],{"class":1137}," -X",[1123,1143,1145],{"class":1144},"sT6z2"," POST",[1123,1147,1148],{"class":1144}," 'https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fapplication\u002F\u003CapplicationId>\u002Fwallet-pay'",[1123,1150,1152],{"class":1151},"sHUrx"," \\\n",[1123,1154,1155,1158,1161,1165],{"class":1125,"line":393},[1123,1156,1157],{"class":1137},"  -H",[1123,1159,1160],{"class":1144}," \"Authorization: Bearer ",[1123,1162,1164],{"class":1163},"suds8","$TOKEN",[1123,1166,1167],{"class":1144},"\"\n",[1113,1169,1174],{"className":1170,"code":1171,"filename":1172,"language":1173,"meta":1119,"style":1119},"language-js shiki shiki-themes github-light-high-contrast github-dark-high-contrast","const token = process.env.TOKEN; \u002F\u002F a short-lived token you minted with your API key and secret\n\nconst res = await fetch('https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fapplication\u002F\u003CapplicationId>\u002Fwallet-pay', {\n  method: 'POST',\n  headers: {\n    Authorization: `Bearer ${token}`,\n  },\n});\nconst body = await res.json();\nif (!res.ok) throw new Error(`${res.status} ${body.error.code}: ${body.error.message}`);\nconsole.log(body.data);\n","Node.js","js",[926,1175,1176,1199,1204,1229,1240,1245,1261,1266,1271,1291,1360],{"__ignoreMap":1119},[1123,1177,1178,1181,1184,1187,1190,1193,1196],{"class":1125,"line":378},[1123,1179,1180],{"class":1151},"const",[1123,1182,1183],{"class":1137}," token",[1123,1185,1186],{"class":1151}," =",[1123,1188,1189],{"class":1163}," process.env.",[1123,1191,1192],{"class":1137},"TOKEN",[1123,1194,1195],{"class":1163},"; ",[1123,1197,1198],{"class":1128},"\u002F\u002F a short-lived token you minted with your API key and secret\n",[1123,1200,1201],{"class":1125,"line":388},[1123,1202,1203],{"emptyLinePlaceholder":375},"\n",[1123,1205,1206,1208,1211,1213,1216,1220,1223,1226],{"class":1125,"line":393},[1123,1207,1180],{"class":1151},[1123,1209,1210],{"class":1137}," res",[1123,1212,1186],{"class":1151},[1123,1214,1215],{"class":1151}," await",[1123,1217,1219],{"class":1218},"sKwhi"," fetch",[1123,1221,1222],{"class":1163},"(",[1123,1224,1225],{"class":1144},"'https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fapplication\u002F\u003CapplicationId>\u002Fwallet-pay'",[1123,1227,1228],{"class":1163},", {\n",[1123,1230,1231,1234,1237],{"class":1125,"line":402},[1123,1232,1233],{"class":1163},"  method: ",[1123,1235,1236],{"class":1144},"'POST'",[1123,1238,1239],{"class":1163},",\n",[1123,1241,1242],{"class":1125,"line":407},[1123,1243,1244],{"class":1163},"  headers: {\n",[1123,1246,1247,1250,1253,1256,1259],{"class":1125,"line":416},[1123,1248,1249],{"class":1163},"    Authorization: ",[1123,1251,1252],{"class":1144},"`Bearer ${",[1123,1254,1255],{"class":1163},"token",[1123,1257,1258],{"class":1144},"}`",[1123,1260,1239],{"class":1163},[1123,1262,1263],{"class":1125,"line":421},[1123,1264,1265],{"class":1163},"  },\n",[1123,1267,1268],{"class":1125,"line":426},[1123,1269,1270],{"class":1163},"});\n",[1123,1272,1273,1275,1278,1280,1282,1285,1288],{"class":1125,"line":432},[1123,1274,1180],{"class":1151},[1123,1276,1277],{"class":1137}," body",[1123,1279,1186],{"class":1151},[1123,1281,1215],{"class":1151},[1123,1283,1284],{"class":1163}," res.",[1123,1286,1287],{"class":1218},"json",[1123,1289,1290],{"class":1163},"();\n",[1123,1292,1293,1296,1299,1302,1305,1308,1311,1314,1316,1319,1322,1325,1328,1331,1334,1336,1338,1340,1342,1345,1347,1349,1351,1353,1355,1357],{"class":1125,"line":437},[1123,1294,1295],{"class":1151},"if",[1123,1297,1298],{"class":1163}," (",[1123,1300,1301],{"class":1151},"!",[1123,1303,1304],{"class":1163},"res.ok) ",[1123,1306,1307],{"class":1151},"throw",[1123,1309,1310],{"class":1151}," new",[1123,1312,1313],{"class":1218}," Error",[1123,1315,1222],{"class":1163},[1123,1317,1318],{"class":1144},"`${",[1123,1320,1321],{"class":1163},"res",[1123,1323,1324],{"class":1144},".",[1123,1326,1327],{"class":1163},"status",[1123,1329,1330],{"class":1144},"} ${",[1123,1332,1333],{"class":1163},"body",[1123,1335,1324],{"class":1144},[1123,1337,930],{"class":1163},[1123,1339,1324],{"class":1144},[1123,1341,926],{"class":1163},[1123,1343,1344],{"class":1144},"}: ${",[1123,1346,1333],{"class":1163},[1123,1348,1324],{"class":1144},[1123,1350,930],{"class":1163},[1123,1352,1324],{"class":1144},[1123,1354,824],{"class":1163},[1123,1356,1258],{"class":1144},[1123,1358,1359],{"class":1163},");\n",[1123,1361,1362,1365,1368],{"class":1125,"line":443},[1123,1363,1364],{"class":1163},"console.",[1123,1366,1367],{"class":1218},"log",[1123,1369,1370],{"class":1163},"(body.data);\n",[1113,1372,1377],{"className":1373,"code":1374,"filename":1375,"language":1376,"meta":1119,"style":1119},"language-php shiki shiki-themes github-light-high-contrast github-dark-high-contrast","\u003C?php\n$token = getenv('TOKEN'); \u002F\u002F a short-lived token you minted with your API key and secret\n\n$ch = curl_init('https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fapplication\u002F\u003CapplicationId>\u002Fwallet-pay');\ncurl_setopt_array($ch, [\n    CURLOPT_CUSTOMREQUEST => 'POST',\n    CURLOPT_HTTPHEADER => [\n        'Authorization: Bearer ' . $token,\n    ],\n    CURLOPT_RETURNTRANSFER => true,\n]);\n$response = curl_exec($ch);\nif ($response === false) {\n    throw new RuntimeException(curl_error($ch));\n}\n$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);\n$body = json_decode($response, true);\nif ($status >= 400) {\n    $error = $body['error'];\n    throw new RuntimeException(\"$status {$error['code']}: {$error['message']}\");\n}\nprint_r($body['data']);\n","PHP","php",[926,1378,1379,1387,1408,1412,1428,1436,1449,1459,1470,1475,1487,1492,1505,1521,1539,1544,1562,1580,1595,1611,1643,1647],{"__ignoreMap":1119},[1123,1380,1381,1384],{"class":1125,"line":378},[1123,1382,1383],{"class":1151},"\u003C?",[1123,1385,1386],{"class":1137},"php\n",[1123,1388,1389,1392,1395,1398,1400,1403,1406],{"class":1125,"line":388},[1123,1390,1391],{"class":1163},"$token ",[1123,1393,1394],{"class":1151},"=",[1123,1396,1397],{"class":1137}," getenv",[1123,1399,1222],{"class":1163},[1123,1401,1402],{"class":1144},"'TOKEN'",[1123,1404,1405],{"class":1163},"); ",[1123,1407,1198],{"class":1128},[1123,1409,1410],{"class":1125,"line":393},[1123,1411,1203],{"emptyLinePlaceholder":375},[1123,1413,1414,1417,1419,1422,1424,1426],{"class":1125,"line":402},[1123,1415,1416],{"class":1163},"$ch ",[1123,1418,1394],{"class":1151},[1123,1420,1421],{"class":1137}," curl_init",[1123,1423,1222],{"class":1163},[1123,1425,1225],{"class":1144},[1123,1427,1359],{"class":1163},[1123,1429,1430,1433],{"class":1125,"line":407},[1123,1431,1432],{"class":1137},"curl_setopt_array",[1123,1434,1435],{"class":1163},"($ch, [\n",[1123,1437,1438,1441,1444,1447],{"class":1125,"line":416},[1123,1439,1440],{"class":1137},"    CURLOPT_CUSTOMREQUEST",[1123,1442,1443],{"class":1151}," =>",[1123,1445,1446],{"class":1144}," 'POST'",[1123,1448,1239],{"class":1163},[1123,1450,1451,1454,1456],{"class":1125,"line":421},[1123,1452,1453],{"class":1137},"    CURLOPT_HTTPHEADER",[1123,1455,1443],{"class":1151},[1123,1457,1458],{"class":1163}," [\n",[1123,1460,1461,1464,1467],{"class":1125,"line":426},[1123,1462,1463],{"class":1144},"        'Authorization: Bearer '",[1123,1465,1466],{"class":1151}," .",[1123,1468,1469],{"class":1163}," $token,\n",[1123,1471,1472],{"class":1125,"line":432},[1123,1473,1474],{"class":1163},"    ],\n",[1123,1476,1477,1480,1482,1485],{"class":1125,"line":437},[1123,1478,1479],{"class":1137},"    CURLOPT_RETURNTRANSFER",[1123,1481,1443],{"class":1151},[1123,1483,1484],{"class":1137}," true",[1123,1486,1239],{"class":1163},[1123,1488,1489],{"class":1125,"line":443},[1123,1490,1491],{"class":1163},"]);\n",[1123,1493,1494,1497,1499,1502],{"class":1125,"line":448},[1123,1495,1496],{"class":1163},"$response ",[1123,1498,1394],{"class":1151},[1123,1500,1501],{"class":1137}," curl_exec",[1123,1503,1504],{"class":1163},"($ch);\n",[1123,1506,1507,1509,1512,1515,1518],{"class":1125,"line":457},[1123,1508,1295],{"class":1151},[1123,1510,1511],{"class":1163}," ($response ",[1123,1513,1514],{"class":1151},"===",[1123,1516,1517],{"class":1137}," false",[1123,1519,1520],{"class":1163},") {\n",[1123,1522,1523,1526,1528,1531,1533,1536],{"class":1125,"line":462},[1123,1524,1525],{"class":1151},"    throw",[1123,1527,1310],{"class":1151},[1123,1529,1530],{"class":1137}," RuntimeException",[1123,1532,1222],{"class":1163},[1123,1534,1535],{"class":1137},"curl_error",[1123,1537,1538],{"class":1163},"($ch));\n",[1123,1540,1541],{"class":1125,"line":467},[1123,1542,1543],{"class":1163},"}\n",[1123,1545,1546,1549,1551,1554,1557,1560],{"class":1125,"line":472},[1123,1547,1548],{"class":1163},"$status ",[1123,1550,1394],{"class":1151},[1123,1552,1553],{"class":1137}," curl_getinfo",[1123,1555,1556],{"class":1163},"($ch, ",[1123,1558,1559],{"class":1137},"CURLINFO_RESPONSE_CODE",[1123,1561,1359],{"class":1163},[1123,1563,1564,1567,1569,1572,1575,1578],{"class":1125,"line":477},[1123,1565,1566],{"class":1163},"$body ",[1123,1568,1394],{"class":1151},[1123,1570,1571],{"class":1137}," json_decode",[1123,1573,1574],{"class":1163},"($response, ",[1123,1576,1577],{"class":1137},"true",[1123,1579,1359],{"class":1163},[1123,1581,1582,1584,1587,1590,1593],{"class":1125,"line":482},[1123,1583,1295],{"class":1151},[1123,1585,1586],{"class":1163}," ($status ",[1123,1588,1589],{"class":1151},">=",[1123,1591,1592],{"class":1137}," 400",[1123,1594,1520],{"class":1163},[1123,1596,1597,1600,1602,1605,1608],{"class":1125,"line":487},[1123,1598,1599],{"class":1163},"    $error ",[1123,1601,1394],{"class":1151},[1123,1603,1604],{"class":1163}," $body[",[1123,1606,1607],{"class":1144},"'error'",[1123,1609,1610],{"class":1163},"];\n",[1123,1612,1613,1615,1617,1619,1621,1624,1627,1630,1633,1636,1638,1641],{"class":1125,"line":493},[1123,1614,1525],{"class":1151},[1123,1616,1310],{"class":1151},[1123,1618,1530],{"class":1137},[1123,1620,1222],{"class":1163},[1123,1622,1623],{"class":1144},"\"",[1123,1625,1626],{"class":1163},"$status",[1123,1628,1629],{"class":1144}," {",[1123,1631,1632],{"class":1163},"$error",[1123,1634,1635],{"class":1144},"['code']}: {",[1123,1637,1632],{"class":1163},[1123,1639,1640],{"class":1144},"['message']}\"",[1123,1642,1359],{"class":1163},[1123,1644,1645],{"class":1125,"line":499},[1123,1646,1543],{"class":1163},[1123,1648,1649,1652,1655,1658],{"class":1125,"line":504},[1123,1650,1651],{"class":1137},"print_r",[1123,1653,1654],{"class":1163},"($body[",[1123,1656,1657],{"class":1144},"'data'",[1123,1659,1491],{"class":1163},[1661,1662,1663],"style",{},"html pre.shiki code .sLBg1, html code.shiki .sLBg1{--shiki-default:#66707B;--shiki-dark:#BDC4CC}html pre.shiki code .soyes, html code.shiki .soyes{--shiki-default:#702C00;--shiki-dark:#FFB757}html pre.shiki code .s-5SL, html code.shiki .s-5SL{--shiki-default:#023B95;--shiki-dark:#91CBFF}html pre.shiki code .sT6z2, html code.shiki .sT6z2{--shiki-default:#032563;--shiki-dark:#ADDCFF}html pre.shiki code .sHUrx, html code.shiki .sHUrx{--shiki-default:#A0111F;--shiki-dark:#FF9492}html pre.shiki code .suds8, html code.shiki .suds8{--shiki-default:#0E1116;--shiki-dark:#F0F3F6}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sKwhi, html code.shiki .sKwhi{--shiki-default:#622CBC;--shiki-dark:#DBB7FF}",{"title":1119,"searchDepth":388,"depth":393,"links":1665},[],"Pays the pending payment of one application of one of your students from your wallet: one credit of this organization, the payment marked paid, and an entry in…","md",{},"39",{"title":280,"description":1666},"api\u002Freference\u002Fpay-application-from-wallet","ggf1uD_GArM-8INZzy3vyiFn8oO4RVJ4Wv6pplg-NUE",1795776468491]