[{"data":1,"prerenderedAt":3265},["ShallowReactive",2],{"api-nav":3,"api-guide:\u002Fapi\u002Fidentifiers":351,"api-spec:guide:\u002Fapi\u002Fidentifiers":3234},[4,28,57,95,115,301,317,331],{"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":94},"resources","Guides",[61,64,67,70,73,76,79,82,85,88,91],{"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},"Group challenges","\u002Fapi\u002Fguides\u002Fgroup-challenges",{"title":92,"to":93,"status":14},"Certificates and reports","\u002Fapi\u002Fguides\u002Fcertificates-and-reports",[],{"id":96,"title":97,"links":98,"groups":114},"tutorials","Tutorials",[99,102,105,108,111],{"title":100,"to":101,"status":14},"Register and apply","\u002Fapi\u002Ftutorials\u002Fregister-and-apply",{"title":103,"to":104,"status":14},"Send a student to the panel","\u002Fapi\u002Ftutorials\u002Fsend-student-to-panel",{"title":106,"to":107,"status":14},"Change an application","\u002Fapi\u002Ftutorials\u002Fchange-an-application",{"title":109,"to":110,"status":14},"Collect results","\u002Fapi\u002Ftutorials\u002Fcollect-results",{"title":112,"to":113,"status":14},"Token handling","\u002Fapi\u002Ftutorials\u002Ftoken-handling",[],{"id":116,"title":117,"links":118,"groups":125},"reference","Reference",[119,122],{"title":120,"to":121},"All endpoints","\u002Fapi\u002Freference",{"title":123,"to":124},"Sandbox console","\u002Fapi\u002Fconsole",[126,135,145,166,206,212,230,255,271],{"tag":127,"slug":128,"links":129},"Health","health",[130],{"title":131,"to":132,"method":133,"deprecated":134},"Check that the API is up","\u002Fapi\u002Freference\u002Fget-health","GET",false,{"tag":77,"slug":136,"links":137},"api-account",[138,142],{"title":139,"to":140,"method":141,"deprecated":134},"Revoke the token you send, before it expires","\u002Fapi\u002Freference\u002Frevoke-token","POST",{"title":143,"to":144,"method":133,"deprecated":134},"Fetch the API account your token belongs to","\u002Fapi\u002Freference\u002Fget-current-api-account",{"tag":74,"slug":146,"links":147},"reference-data",[148,151,154,157,160,163],{"title":149,"to":150,"method":133,"deprecated":134},"List the countries a student can be registered in","\u002Fapi\u002Freference\u002Flist-countries",{"title":152,"to":153,"method":133,"deprecated":134},"Fetch one country by its id","\u002Fapi\u002Freference\u002Fget-country",{"title":155,"to":156,"method":133,"deprecated":134},"List the grades a student can be registered with","\u002Fapi\u002Freference\u002Flist-grades",{"title":158,"to":159,"method":133,"deprecated":134},"Fetch one grade by its id","\u002Fapi\u002Freference\u002Fget-grade",{"title":161,"to":162,"method":133,"deprecated":134},"List the organizations and their ids","\u002Fapi\u002Freference\u002Flist-organizations",{"title":164,"to":165,"method":133,"deprecated":134},"Fetch one organization by its id","\u002Fapi\u002Freference\u002Fget-organization",{"tag":62,"slug":167,"links":168},"students",[169,172,175,178,181,184,187,191,194,197,200,203],{"title":170,"to":171,"method":133,"deprecated":134},"List your students","\u002Fapi\u002Freference\u002Flist-students",{"title":173,"to":174,"method":141,"deprecated":134},"Register a student","\u002Fapi\u002Freference\u002Fregister-student",{"title":176,"to":177,"method":141,"deprecated":134},"Check a registration without registering the student","\u002Fapi\u002Freference\u002Fcheck-student-registration",{"title":179,"to":180,"method":141,"deprecated":134},"Register many students at once","\u002Fapi\u002Freference\u002Fcreate-student-import",{"title":182,"to":183,"method":133,"deprecated":134},"Follow a batch of students you sent","\u002Fapi\u002Freference\u002Fget-student-import",{"title":185,"to":186,"method":133,"deprecated":134},"Fetch one of your students","\u002Fapi\u002Freference\u002Fget-student",{"title":188,"to":189,"method":190,"deprecated":134},"Update one of your students","\u002Fapi\u002Freference\u002Fupdate-student","PUT",{"title":192,"to":193,"method":190,"deprecated":134},"Set the sign-in password of one of your students","\u002Fapi\u002Freference\u002Fset-student-password",{"title":195,"to":196,"method":133,"deprecated":134},"List your students who can use this organization","\u002Fapi\u002Freference\u002Flist-org-students",{"title":198,"to":199,"method":133,"deprecated":134},"Fetch one of your students, if they can use this organization","\u002Fapi\u002Freference\u002Fget-org-student",{"title":201,"to":202,"method":190,"deprecated":134},"Update one of your students and give them access to this organization","\u002Fapi\u002Freference\u002Fupdate-org-student",{"title":204,"to":205,"method":190,"deprecated":134},"Link one of your students to a supervisor on this organization","\u002Fapi\u002Freference\u002Flink-student-supervisor",{"tag":80,"slug":207,"links":208},"sign-in-links",[209],{"title":210,"to":211,"method":141,"deprecated":134},"Create a single-use sign-in link for one of your students","\u002Fapi\u002Freference\u002Fcreate-signin-link",{"tag":83,"slug":213,"links":214},"exams",[215,218,221,224,227],{"title":216,"to":217,"method":133,"deprecated":134},"List the exams open for applications","\u002Fapi\u002Freference\u002Flist-exams",{"title":219,"to":220,"method":133,"deprecated":134},"List an organization’s exam categories","\u002Fapi\u002Freference\u002Flist-exam-categories",{"title":222,"to":223,"method":133,"deprecated":134},"Fetch one exam category","\u002Fapi\u002Freference\u002Fget-exam-category",{"title":225,"to":226,"method":133,"deprecated":134},"List the exams one of your students can apply to","\u002Fapi\u002Freference\u002Flist-available-exams",{"title":228,"to":229,"method":133,"deprecated":134},"Fetch one exam that is open for applications","\u002Fapi\u002Freference\u002Fget-exam",{"tag":86,"slug":231,"links":232},"applications",[233,236,239,242,245,248,251],{"title":234,"to":235,"method":133,"deprecated":134},"List your students’ applications in this organization","\u002Fapi\u002Freference\u002Flist-applications",{"title":237,"to":238,"method":141,"deprecated":134},"Enter one of your students for an exam","\u002Fapi\u002Freference\u002Fcreate-application",{"title":240,"to":241,"method":133,"deprecated":134},"List your students’ applications for one exam","\u002Fapi\u002Freference\u002Flist-exam-applications",{"title":243,"to":244,"method":133,"deprecated":134},"List one of your students’ applications in this organization","\u002Fapi\u002Freference\u002Flist-student-applications",{"title":246,"to":247,"method":133,"deprecated":134},"Fetch one of your students’ applications","\u002Fapi\u002Freference\u002Fget-application",{"title":249,"to":250,"method":190,"deprecated":134},"Move one of your students’ applications to another exam","\u002Fapi\u002Freference\u002Fmove-application",{"title":252,"to":253,"method":254,"deprecated":134},"Withdraw one of your students from an exam","\u002Fapi\u002Freference\u002Fdelete-application","DELETE",{"tag":256,"slug":257,"links":258},"Documents","documents",[259,262,265,268],{"title":260,"to":261,"method":133,"deprecated":134},"Download a certificate file","\u002Fapi\u002Freference\u002Fdownload-certificate",{"title":263,"to":264,"method":133,"deprecated":134},"List one of your students’ released certificates","\u002Fapi\u002Freference\u002Flist-student-certificates",{"title":266,"to":267,"method":133,"deprecated":134},"Download a result report file","\u002Fapi\u002Freference\u002Fdownload-report",{"title":269,"to":270,"method":133,"deprecated":134},"List one of your students’ released result reports","\u002Fapi\u002Freference\u002Flist-student-reports",{"tag":89,"slug":272,"links":273},"group-challenges",[274,277,280,283,286,289,292,295,298],{"title":275,"to":276,"method":133,"deprecated":134},"List the group challenges an organization runs","\u002Fapi\u002Freference\u002Flist-group-challenges",{"title":278,"to":279,"method":133,"deprecated":134},"Fetch one group challenge","\u002Fapi\u002Freference\u002Fget-group-challenge",{"title":281,"to":282,"method":133,"deprecated":134},"List the groups your students are in for a group challenge","\u002Fapi\u002Freference\u002Flist-group-challenge-groups",{"title":284,"to":285,"method":133,"deprecated":134},"Fetch one group, with its steps and files","\u002Fapi\u002Freference\u002Fget-group-challenge-group",{"title":287,"to":288,"method":133,"deprecated":134},"List what has happened in one group","\u002Fapi\u002Freference\u002Flist-group-challenge-activity",{"title":290,"to":291,"method":141,"deprecated":134},"Send a group’s finished work for one of your students","\u002Fapi\u002Freference\u002Fsubmit-group-challenge-work",{"title":293,"to":294,"method":141,"deprecated":134},"Submit one step of a group for one of your students","\u002Fapi\u002Freference\u002Fsubmit-group-challenge-step",{"title":296,"to":297,"method":133,"deprecated":134},"List your students’ eligibility and groups for a group challenge","\u002Fapi\u002Freference\u002Flist-group-challenge-students",{"title":299,"to":300,"method":133,"deprecated":134},"Fetch one of your students’ eligibility and group for a group challenge","\u002Fapi\u002Freference\u002Fget-group-challenge-student",{"id":302,"title":303,"links":304,"groups":316},"clients","Clients",[305,307,310,313],{"title":9,"to":306,"status":14},"\u002Fapi\u002Fclients",{"title":308,"to":309,"status":14},"Node.js","\u002Fapi\u002Fclients\u002Fnode",{"title":311,"to":312,"status":14},"PHP","\u002Fapi\u002Fclients\u002Fphp",{"title":314,"to":315,"status":14},"Build your own","\u002Fapi\u002Fclients\u002Fbuild-your-own",[],{"id":318,"title":319,"links":320,"groups":330},"agents","AI agents",[321,324,327],{"title":322,"to":323},"AI connections","\u002Fapi\u002Fmcp",{"title":325,"to":326},"What it can do","\u002Fapi\u002Fmcp\u002Ftools",{"title":328,"to":329},"Agent skills","\u002Fapi\u002Fskills",[],{"id":332,"title":333,"links":334,"groups":350},"help","Help",[335,338,341,344,347],{"title":336,"to":337,"status":14},"Glossary","\u002Fapi\u002Fglossary",{"title":339,"to":340,"status":14},"FAQ","\u002Fapi\u002Ffaq",{"title":342,"to":343,"status":14},"Troubleshooting","\u002Fapi\u002Ftroubleshooting",{"title":345,"to":346,"status":14},"Support","\u002Fapi\u002Fsupport",{"title":348,"to":349},"Changelog","\u002Fapi\u002Fchangelog",[],{"id":352,"title":36,"body":353,"description":3226,"extension":3227,"meta":3228,"navTitle":36,"navigation":3229,"operations":3230,"order":983,"path":37,"section":29,"seo":3231,"status":14,"stem":3232,"__hash__":3233},"apiGuides\u002Fapi\u002Fidentifiers.md",{"type":354,"value":355,"toc":3205},"minimark",[356,360,368,401,406,674,678,688,734,1012,1053,1112,1115,1118,1234,1237,1326,1337,1341,1346,1356,1508,1511,1593,1607,1611,1624,1627,1634,1764,1767,1780,1813,1843,1846,1987,1995,1999,2002,2092,2101,2105,2108,2120,2134,2153,2157,2180,2183,2270,2278,2282,2285,2306,2312,2338,2342,2348,2426,2432,2437,2469,2475,2508,2511,2571,2633,2641,2654,2694,2717,2721,2743,2759,2762,2766,2772,2842,2859,2864,2920,2924,2927,3157,3166,3170,3201],[357,358,359],"p",{},"Almost every mistake in a new integration is the wrong id in the right place. This page explains every kind of id the API uses, where you get each one, where you send it, and the one id that has two faces: the student.",[357,361,362,363,367],{},"Every id is a 24-character lowercase hexadecimal string, such as ",[364,365,366],"code",{},"652f1c9b8e4b2a0012a3c4d5",". Treat ids as opaque strings:",[369,370,371,379,385,395],"ul",{},[372,373,374,378],"li",{},[375,376,377],"strong",{},"You never make one up."," Every id you send came from an earlier response.",[372,380,381,384],{},[375,382,383],{},"Compare them as strings."," They are always lowercase.",[372,386,387,390,391,394],{},[375,388,389],{},"Store them as text",", for example in a ",[364,392,393],{},"CHAR(24)"," column.",[372,396,397,400],{},[375,398,399],{},"Read nothing into them."," An id's characters carry no meaning you should rely on, dates included.",[402,403,405],"h2",{"id":404},"the-ids-at-a-glance","The ids at a glance",[407,408,409,428],"table",{},[410,411,412],"thead",{},[413,414,415,419,422,425],"tr",{},[416,417,418],"th",{},"Id",[416,420,421],{},"Where you get it",[416,423,424],{},"Where you send it",[416,426,427],{},"Valid in",[429,430,431,455,493,509,529,554,575,609,629,658],"tbody",{},[413,432,433,440,446,452],{},[434,435,436,437],"td",{},"Organization ",[364,438,439],{},"_id",[434,441,442],{},[443,444,445],"a",{"href":162},"listOrganizations",[434,447,448,451],{},[364,449,450],{},"\u003CorganizationId>"," in organization paths",[434,453,454],{},"Every call",[413,456,457,463,476,490],{},[434,458,459,460,462],{},"Student id (the student's ",[364,461,439],{},")",[434,464,465,468,469,472,473],{},[364,466,467],{},"data._id"," from ",[443,470,471],{"href":174},"registerStudent",", or ",[443,474,475],{"href":171},"listStudents",[434,477,478,481,482,485,486,489],{},[364,479,480],{},"\u003CstudentId>"," and ",[364,483,484],{},"\u003CuserId>"," in paths, ",[364,487,488],{},"studentId"," in bodies",[434,491,492],{},"Every organization",[413,494,495,500,503,506],{},[434,496,497,498],{},"Organization copy ",[364,499,439],{},[434,501,502],{},"Inside applications, certificates and payments",[434,504,505],{},"Never",[434,507,508],{},"One organization",[413,510,511,516,519,526],{},[434,512,513],{},[364,514,515],{},"mainId",[434,517,518],{},"On organization copies",[434,520,521,522,525],{},"Never. It ",[375,523,524],{},"is"," the student id",[434,527,528],{},"–",[413,530,531,536,541,547],{},[434,532,533,534],{},"Country ",[364,535,439],{},[434,537,538],{},[443,539,540],{"href":150},"listCountries",[434,542,543,546],{},[364,544,545],{},"country"," when registering a student, or on either student update",[434,548,549,550,462],{},"Student records. Exams use each organization's own country records (see ",[443,551,553],{"href":552},"#countries","Countries",[413,555,556,561,566,572],{},[434,557,558,559],{},"Grade ",[364,560,439],{},[434,562,563],{},[443,564,565],{"href":156},"listGrades",[434,567,568,571],{},[364,569,570],{},"grade"," when registering or updating a student",[434,573,574],{},"Every organization, unchanged",[413,576,577,582,594,607],{},[434,578,579,580],{},"Exam, category, session and language ",[364,581,439],{},[434,583,584,587,588,587,591],{},[443,585,586],{"href":217},"listExams",", ",[443,589,590],{"href":226},"listAvailableExams",[443,592,593],{"href":220},"listExamCategories",[434,595,596,599,600,481,603,606],{},[364,597,598],{},"examId"," in bodies, ",[364,601,602],{},"\u003CexamId>",[364,604,605],{},"\u003CcategoryId>"," in paths",[434,608,508],{},[413,610,611,616,622,627],{},[434,612,613,614],{},"Application ",[364,615,439],{},[434,617,618,621],{},[443,619,620],{"href":238},"createApplication"," and the application lists",[434,623,624,606],{},[364,625,626],{},"\u003CapplicationId>",[434,628,508],{},[413,630,631,639,647,656],{},[434,632,633,634,587,636],{},"Certificate and report ",[364,635,439],{},[364,637,638],{},"shortId",[434,640,641,587,644],{},[443,642,643],{"href":264},"listStudentCertificates",[443,645,646],{"href":270},"listStudentReports",[434,648,649,587,652,655],{},[364,650,651],{},"\u003CcertificateId>",[364,653,654],{},"\u003CreportId>"," on downloads",[434,657,508],{},[413,659,660,663,666,672],{},[434,661,662],{},"Username",[434,664,665],{},"Every student record",[434,667,668,669],{},"A supervisor's username, in ",[364,670,671],{},"supervisorUsername",[434,673,528],{},[402,675,677],{"id":676},"organization-ids","Organization ids",[357,679,680,681,684,685,687],{},"Every organization path starts with ",[364,682,683],{},"\u002Fv1\u002F\u003CorganizationId>\u002F",". The value is the organization's ",[364,686,439],{},". Get the ids once, from the organization list:",[689,690,695],"pre",{"className":691,"code":692,"language":693,"meta":694,"style":694},"language-bash shiki shiki-themes github-light-high-contrast github-dark-high-contrast","curl -sS \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Forganization\" \\\n  -H \"Authorization: Bearer $TOKEN\"\n","bash","",[364,696,697,718],{"__ignoreMap":694},[698,699,702,706,710,714],"span",{"class":700,"line":701},"line",1,[698,703,705],{"class":704},"soyes","curl",[698,707,709],{"class":708},"s-5SL"," -sS",[698,711,713],{"class":712},"sT6z2"," \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Forganization\"",[698,715,717],{"class":716},"sHUrx"," \\\n",[698,719,721,724,727,731],{"class":700,"line":720},2,[698,722,723],{"class":708},"  -H",[698,725,726],{"class":712}," \"Authorization: Bearer ",[698,728,730],{"class":729},"suds8","$TOKEN",[698,732,733],{"class":712},"\"\n",[689,735,739],{"className":736,"code":737,"language":738,"meta":694,"style":694},"language-json shiki shiki-themes github-light-high-contrast github-dark-high-contrast","{\n  \"success\": true,\n  \"message\": \"Organizations fetched successfully.\",\n  \"data\": [\n    {\n      \"_id\": \"64f0a1b2c3d4e5f6a7b8c9d1\",\n      \"name\": \"STEM Olympiad\",\n      \"slug\": \"stem\",\n      \"logo\": \"https:\u002F\u002Fcdn.example.com\u002Flogos\u002Fstem.png\",\n      \"desc\": \"Science, technology, engineering and mathematics.\",\n      \"defaultRedirect\": \"\u002F\"\n    },\n    {\n      \"_id\": \"64f0a1b2c3d4e5f6a7b8c9d2\",\n      \"name\": \"Hi-Lingua\",\n      \"slug\": \"hilingua\",\n      \"logo\": \"https:\u002F\u002Fcdn.example.com\u002Flogos\u002Fhilingua.png\",\n      \"desc\": \"International language olympiad.\",\n      \"defaultRedirect\": \"\u002F\"\n    }\n  ],\n  \"pagination\": { \"page\": 1, \"limit\": 20, \"total\": 5, \"totalPages\": 1 }\n}\n","json",[364,740,741,746,761,774,783,789,802,815,828,841,854,865,871,876,888,900,912,924,936,945,951,957,1006],{"__ignoreMap":694},[698,742,743],{"class":700,"line":701},[698,744,745],{"class":729},"{\n",[698,747,748,752,755,758],{"class":700,"line":720},[698,749,751],{"class":750},"sne4z","  \"success\"",[698,753,754],{"class":729},": ",[698,756,757],{"class":708},"true",[698,759,760],{"class":729},",\n",[698,762,764,767,769,772],{"class":700,"line":763},3,[698,765,766],{"class":750},"  \"message\"",[698,768,754],{"class":729},[698,770,771],{"class":712},"\"Organizations fetched successfully.\"",[698,773,760],{"class":729},[698,775,777,780],{"class":700,"line":776},4,[698,778,779],{"class":750},"  \"data\"",[698,781,782],{"class":729},": [\n",[698,784,786],{"class":700,"line":785},5,[698,787,788],{"class":729},"    {\n",[698,790,792,795,797,800],{"class":700,"line":791},6,[698,793,794],{"class":750},"      \"_id\"",[698,796,754],{"class":729},[698,798,799],{"class":712},"\"64f0a1b2c3d4e5f6a7b8c9d1\"",[698,801,760],{"class":729},[698,803,805,808,810,813],{"class":700,"line":804},7,[698,806,807],{"class":750},"      \"name\"",[698,809,754],{"class":729},[698,811,812],{"class":712},"\"STEM Olympiad\"",[698,814,760],{"class":729},[698,816,818,821,823,826],{"class":700,"line":817},8,[698,819,820],{"class":750},"      \"slug\"",[698,822,754],{"class":729},[698,824,825],{"class":712},"\"stem\"",[698,827,760],{"class":729},[698,829,831,834,836,839],{"class":700,"line":830},9,[698,832,833],{"class":750},"      \"logo\"",[698,835,754],{"class":729},[698,837,838],{"class":712},"\"https:\u002F\u002Fcdn.example.com\u002Flogos\u002Fstem.png\"",[698,840,760],{"class":729},[698,842,844,847,849,852],{"class":700,"line":843},10,[698,845,846],{"class":750},"      \"desc\"",[698,848,754],{"class":729},[698,850,851],{"class":712},"\"Science, technology, engineering and mathematics.\"",[698,853,760],{"class":729},[698,855,857,860,862],{"class":700,"line":856},11,[698,858,859],{"class":750},"      \"defaultRedirect\"",[698,861,754],{"class":729},[698,863,864],{"class":712},"\"\u002F\"\n",[698,866,868],{"class":700,"line":867},12,[698,869,870],{"class":729},"    },\n",[698,872,874],{"class":700,"line":873},13,[698,875,788],{"class":729},[698,877,879,881,883,886],{"class":700,"line":878},14,[698,880,794],{"class":750},[698,882,754],{"class":729},[698,884,885],{"class":712},"\"64f0a1b2c3d4e5f6a7b8c9d2\"",[698,887,760],{"class":729},[698,889,891,893,895,898],{"class":700,"line":890},15,[698,892,807],{"class":750},[698,894,754],{"class":729},[698,896,897],{"class":712},"\"Hi-Lingua\"",[698,899,760],{"class":729},[698,901,903,905,907,910],{"class":700,"line":902},16,[698,904,820],{"class":750},[698,906,754],{"class":729},[698,908,909],{"class":712},"\"hilingua\"",[698,911,760],{"class":729},[698,913,915,917,919,922],{"class":700,"line":914},17,[698,916,833],{"class":750},[698,918,754],{"class":729},[698,920,921],{"class":712},"\"https:\u002F\u002Fcdn.example.com\u002Flogos\u002Fhilingua.png\"",[698,923,760],{"class":729},[698,925,927,929,931,934],{"class":700,"line":926},18,[698,928,846],{"class":750},[698,930,754],{"class":729},[698,932,933],{"class":712},"\"International language olympiad.\"",[698,935,760],{"class":729},[698,937,939,941,943],{"class":700,"line":938},19,[698,940,859],{"class":750},[698,942,754],{"class":729},[698,944,864],{"class":712},[698,946,948],{"class":700,"line":947},20,[698,949,950],{"class":729},"    }\n",[698,952,954],{"class":700,"line":953},21,[698,955,956],{"class":729},"  ],\n",[698,958,960,963,966,969,971,974,976,979,981,984,986,989,991,994,996,999,1001,1003],{"class":700,"line":959},22,[698,961,962],{"class":750},"  \"pagination\"",[698,964,965],{"class":729},": { ",[698,967,968],{"class":750},"\"page\"",[698,970,754],{"class":729},[698,972,973],{"class":708},"1",[698,975,587],{"class":729},[698,977,978],{"class":750},"\"limit\"",[698,980,754],{"class":729},[698,982,983],{"class":708},"20",[698,985,587],{"class":729},[698,987,988],{"class":750},"\"total\"",[698,990,754],{"class":729},[698,992,993],{"class":708},"5",[698,995,587],{"class":729},[698,997,998],{"class":750},"\"totalPages\"",[698,1000,754],{"class":729},[698,1002,973],{"class":708},[698,1004,1005],{"class":729}," }\n",[698,1007,1009],{"class":700,"line":1008},23,[698,1010,1011],{"class":729},"}\n",[357,1013,1014,1015,587,1017,587,1020,587,1023,587,1026,481,1029,1032,1033,587,1036,587,1039,587,1042,481,1045,1048,1049,1052],{},"Each organization comes back with ",[364,1016,439],{},[364,1018,1019],{},"name",[364,1021,1022],{},"slug",[364,1024,1025],{},"logo",[364,1027,1028],{},"desc",[364,1030,1031],{},"defaultRedirect",". The list holds the five organizations that run exams, with the slugs ",[364,1034,1035],{},"stem",[364,1037,1038],{},"hilingua",[364,1040,1041],{},"neo",[364,1043,1044],{},"gmath",[364,1046,1047],{},"coding",". ",[364,1050,1051],{},"mto",", the core record, is not listed: the flat paths act on it and take no organization id.",[369,1054,1055,1075,1095],{},[372,1056,1057,1063,1064,1067,1068,587,1071,1074],{},[375,1058,1059,1060,1062],{},"The slug tells you which organization it is. The ",[364,1061,439],{}," is what goes in the path."," ",[364,1065,1066],{},"\u002Fv1\u002Fstem\u002Fexam"," is not a valid path: it answers ",[364,1069,1070],{},"404 not_found",[364,1072,1073],{},"Organization not found!",".",[372,1076,1077,1080,1081,1084,1085,587,1088,1090,1091,1094],{},[375,1078,1079],{},"A malformed or unknown organization id",", or the id of an organization ",[364,1082,1083],{},"GET \u002Fv1\u002Forganization"," does not list, answers the same ",[364,1086,1087],{},"404",[364,1089,1073],{},". The API checks it only after it has accepted your token, so a request without a valid token gets ",[364,1092,1093],{},"401"," whatever the id.",[372,1096,1097,1063,1100,587,1103,1106,1107,1109,1110,1074],{},[375,1098,1099],{},"Flat paths take no organization id.",[364,1101,1102],{},"\u002Fv1\u002Fstudent",[364,1104,1105],{},"\u002Fv1\u002Fcountry"," and the other flat paths act on ",[364,1108,1051],{},". See ",[443,1111,22],{"href":23},[357,1113,1114],{},"Build a slug-to-id map when your integration starts and keep it. Organizations are not created or changed through the API.",[357,1116,1117],{},"Node.js:",[689,1119,1123],{"className":1120,"code":1121,"language":1122,"meta":694,"style":694},"language-js shiki shiki-themes github-light-high-contrast github-dark-high-contrast","const { body } = await api(token, 'GET', '\u002Forganization?limit=100');\nconst orgId = Object.fromEntries(body.data.map((o) => [o.slug, o._id]));\n\u002F\u002F orgId.stem === '64f0a1b2c3d4e5f6a7b8c9d1'\nawait api(token, 'GET', `\u002F${orgId.stem}\u002Fexam`);\n","js",[364,1124,1125,1163,1200,1206],{"__ignoreMap":694},[698,1126,1127,1130,1133,1136,1139,1142,1145,1149,1152,1155,1157,1160],{"class":700,"line":701},[698,1128,1129],{"class":716},"const",[698,1131,1132],{"class":729}," { ",[698,1134,1135],{"class":708},"body",[698,1137,1138],{"class":729}," } ",[698,1140,1141],{"class":716},"=",[698,1143,1144],{"class":716}," await",[698,1146,1148],{"class":1147},"sKwhi"," api",[698,1150,1151],{"class":729},"(token, ",[698,1153,1154],{"class":712},"'GET'",[698,1156,587],{"class":729},[698,1158,1159],{"class":712},"'\u002Forganization?limit=100'",[698,1161,1162],{"class":729},");\n",[698,1164,1165,1167,1170,1173,1176,1179,1182,1185,1188,1191,1194,1197],{"class":700,"line":720},[698,1166,1129],{"class":716},[698,1168,1169],{"class":708}," orgId",[698,1171,1172],{"class":716}," =",[698,1174,1175],{"class":729}," Object.",[698,1177,1178],{"class":1147},"fromEntries",[698,1180,1181],{"class":729},"(body.data.",[698,1183,1184],{"class":1147},"map",[698,1186,1187],{"class":729},"((",[698,1189,1190],{"class":704},"o",[698,1192,1193],{"class":729},") ",[698,1195,1196],{"class":716},"=>",[698,1198,1199],{"class":729}," [o.slug, o._id]));\n",[698,1201,1202],{"class":700,"line":763},[698,1203,1205],{"class":1204},"sLBg1","\u002F\u002F orgId.stem === '64f0a1b2c3d4e5f6a7b8c9d1'\n",[698,1207,1208,1211,1213,1215,1217,1219,1222,1225,1227,1229,1232],{"class":700,"line":776},[698,1209,1210],{"class":716},"await",[698,1212,1148],{"class":1147},[698,1214,1151],{"class":729},[698,1216,1154],{"class":712},[698,1218,587],{"class":729},[698,1220,1221],{"class":712},"`\u002F${",[698,1223,1224],{"class":729},"orgId",[698,1226,1074],{"class":712},[698,1228,1035],{"class":729},[698,1230,1231],{"class":712},"}\u002Fexam`",[698,1233,1162],{"class":729},[357,1235,1236],{},"PHP:",[689,1238,1242],{"className":1239,"code":1240,"language":1241,"meta":694,"style":694},"language-php shiki shiki-themes github-light-high-contrast github-dark-high-contrast","$result = api($token, 'GET', '\u002Forganization?limit=100');\n$orgId = array_column($result['body']['data'], '_id', 'slug');\n\u002F\u002F $orgId['stem'] === '64f0a1b2c3d4e5f6a7b8c9d1'\napi($token, 'GET', \"\u002F{$orgId['stem']}\u002Fexam\");\n","php",[364,1243,1244,1264,1299,1304],{"__ignoreMap":694},[698,1245,1246,1249,1251,1253,1256,1258,1260,1262],{"class":700,"line":701},[698,1247,1248],{"class":729},"$result ",[698,1250,1141],{"class":716},[698,1252,1148],{"class":1147},[698,1254,1255],{"class":729},"($token, ",[698,1257,1154],{"class":712},[698,1259,587],{"class":729},[698,1261,1159],{"class":712},[698,1263,1162],{"class":729},[698,1265,1266,1269,1271,1274,1277,1280,1283,1286,1289,1292,1294,1297],{"class":700,"line":720},[698,1267,1268],{"class":729},"$orgId ",[698,1270,1141],{"class":716},[698,1272,1273],{"class":708}," array_column",[698,1275,1276],{"class":729},"($result[",[698,1278,1279],{"class":712},"'body'",[698,1281,1282],{"class":729},"][",[698,1284,1285],{"class":712},"'data'",[698,1287,1288],{"class":729},"], ",[698,1290,1291],{"class":712},"'_id'",[698,1293,587],{"class":729},[698,1295,1296],{"class":712},"'slug'",[698,1298,1162],{"class":729},[698,1300,1301],{"class":700,"line":763},[698,1302,1303],{"class":1204},"\u002F\u002F $orgId['stem'] === '64f0a1b2c3d4e5f6a7b8c9d1'\n",[698,1305,1306,1309,1311,1313,1315,1318,1321,1324],{"class":700,"line":776},[698,1307,1308],{"class":1147},"api",[698,1310,1255],{"class":729},[698,1312,1154],{"class":712},[698,1314,587],{"class":729},[698,1316,1317],{"class":712},"\"\u002F{",[698,1319,1320],{"class":729},"$orgId",[698,1322,1323],{"class":712},"['stem']}\u002Fexam\"",[698,1325,1162],{"class":729},[357,1327,1328,1329,1332,1333,1336],{},"(",[364,1330,1331],{},"api()"," is the helper from ",[443,1334,33],{"href":1335},"\u002Fapi\u002Frequests-and-responses#putting-it-together-a-small-request-helper",".)",[402,1338,1340],{"id":1339},"students-one-student-id-several-records","Students: one student id, several records",[1342,1343,1345],"h3",{"id":1344},"the-student-id","The student id",[357,1347,1348,1349,1351,1352,1355],{},"When you register a student, the response's ",[364,1350,467],{}," is ",[375,1353,1354],{},"the student id",". Store it; it is the key for that student in your system. The response below is shortened to a few of the student's fields:",[689,1357,1359],{"className":736,"code":1358,"language":738,"meta":694,"style":694},"{\n  \"success\": true,\n  \"message\": \"User registered successfully.\",\n  \"data\": {\n    \"_id\": \"652f1c9b8e4b2a0012a3c4d5\",\n    \"username\": \"XXK1042\",\n    \"firstName\": \"Jane\",\n    \"lastName\": \"Doe\",\n    \"fullName\": \"Jane Doe\",\n    \"email\": \"jane.doe@example.com\",\n    \"emailConfirmed\": false,\n    \"createdAt\": \"2026-09-15T08:30:12.345Z\",\n    \"updatedAt\": \"2026-09-15T08:30:12.345Z\"\n  }\n}\n",[364,1360,1361,1365,1375,1386,1393,1405,1417,1429,1441,1453,1465,1477,1489,1499,1504],{"__ignoreMap":694},[698,1362,1363],{"class":700,"line":701},[698,1364,745],{"class":729},[698,1366,1367,1369,1371,1373],{"class":700,"line":720},[698,1368,751],{"class":750},[698,1370,754],{"class":729},[698,1372,757],{"class":708},[698,1374,760],{"class":729},[698,1376,1377,1379,1381,1384],{"class":700,"line":763},[698,1378,766],{"class":750},[698,1380,754],{"class":729},[698,1382,1383],{"class":712},"\"User registered successfully.\"",[698,1385,760],{"class":729},[698,1387,1388,1390],{"class":700,"line":776},[698,1389,779],{"class":750},[698,1391,1392],{"class":729},": {\n",[698,1394,1395,1398,1400,1403],{"class":700,"line":785},[698,1396,1397],{"class":750},"    \"_id\"",[698,1399,754],{"class":729},[698,1401,1402],{"class":712},"\"652f1c9b8e4b2a0012a3c4d5\"",[698,1404,760],{"class":729},[698,1406,1407,1410,1412,1415],{"class":700,"line":791},[698,1408,1409],{"class":750},"    \"username\"",[698,1411,754],{"class":729},[698,1413,1414],{"class":712},"\"XXK1042\"",[698,1416,760],{"class":729},[698,1418,1419,1422,1424,1427],{"class":700,"line":804},[698,1420,1421],{"class":750},"    \"firstName\"",[698,1423,754],{"class":729},[698,1425,1426],{"class":712},"\"Jane\"",[698,1428,760],{"class":729},[698,1430,1431,1434,1436,1439],{"class":700,"line":817},[698,1432,1433],{"class":750},"    \"lastName\"",[698,1435,754],{"class":729},[698,1437,1438],{"class":712},"\"Doe\"",[698,1440,760],{"class":729},[698,1442,1443,1446,1448,1451],{"class":700,"line":830},[698,1444,1445],{"class":750},"    \"fullName\"",[698,1447,754],{"class":729},[698,1449,1450],{"class":712},"\"Jane Doe\"",[698,1452,760],{"class":729},[698,1454,1455,1458,1460,1463],{"class":700,"line":843},[698,1456,1457],{"class":750},"    \"email\"",[698,1459,754],{"class":729},[698,1461,1462],{"class":712},"\"jane.doe@example.com\"",[698,1464,760],{"class":729},[698,1466,1467,1470,1472,1475],{"class":700,"line":856},[698,1468,1469],{"class":750},"    \"emailConfirmed\"",[698,1471,754],{"class":729},[698,1473,1474],{"class":708},"false",[698,1476,760],{"class":729},[698,1478,1479,1482,1484,1487],{"class":700,"line":867},[698,1480,1481],{"class":750},"    \"createdAt\"",[698,1483,754],{"class":729},[698,1485,1486],{"class":712},"\"2026-09-15T08:30:12.345Z\"",[698,1488,760],{"class":729},[698,1490,1491,1494,1496],{"class":700,"line":873},[698,1492,1493],{"class":750},"    \"updatedAt\"",[698,1495,754],{"class":729},[698,1497,1498],{"class":712},"\"2026-09-15T08:30:12.345Z\"\n",[698,1500,1501],{"class":700,"line":878},[698,1502,1503],{"class":729},"  }\n",[698,1505,1506],{"class":700,"line":890},[698,1507,1011],{"class":729},[357,1509,1510],{},"That one id works on every route, on the core record and on every organization:",[407,1512,1513,1523],{},[410,1514,1515],{},[413,1516,1517,1520],{},[416,1518,1519],{},"Where",[416,1521,1522],{},"Operations",[429,1524,1525,1543,1566,1579],{},[413,1526,1527,1532],{},[434,1528,1529,1531],{},[364,1530,480],{}," on flat paths",[434,1533,1534,587,1537,587,1540],{},[443,1535,1536],{"href":186},"getStudent",[443,1538,1539],{"href":189},"updateStudent",[443,1541,1542],{"href":193},"setStudentPassword",[413,1544,1545,1550],{},[434,1546,1547,1549],{},[364,1548,480],{}," on organization paths",[434,1551,1552,587,1555,587,1558,587,1561,587,1563],{},[443,1553,1554],{"href":199},"getOrgStudent",[443,1556,1557],{"href":202},"updateOrgStudent",[443,1559,1560],{"href":205},"linkStudentSupervisor",[443,1562,590],{"href":226},[443,1564,1565],{"href":244},"listStudentApplications",[413,1567,1568,1573],{},[434,1569,1570,1572],{},[364,1571,484],{}," on organization paths (same id, different name)",[434,1574,1575,587,1577],{},[443,1576,643],{"href":264},[443,1578,646],{"href":270},[413,1580,1581,1586],{},[434,1582,1583,1585],{},[364,1584,488],{}," in a body",[434,1587,1588,587,1590],{},[443,1589,620],{"href":238},[443,1591,1592],{"href":211},"createSigninLink",[357,1594,1595,1596,481,1598,1601,1602,1604,1605,1074],{},"Both student lists, ",[443,1597,475],{"href":171},[443,1599,1600],{"href":196},"listOrgStudents",", return the student's core record. There, ",[364,1603,439],{}," is the student id and there is no ",[364,1606,515],{},[1342,1608,1610],{"id":1609},"organization-copies","Organization copies",[357,1612,1613,1614,1617,1618,1620,1621,1623],{},"Each organization keeps its own copy of a student. The organization creates that copy itself the first time the student follows a ",[443,1615,1616],{"href":81},"sign-in link"," to it. The copy has an ",[364,1619,439],{}," of its own, and a ",[364,1622,515],{}," that points back at the student id.",[357,1625,1626],{},"Everything that lives inside an organization (applications, certificates, reports, payments) belongs to the copy, not to the core record. You never have to deal with that when you send a request: you always send the student id, and the API finds the right copy.",[357,1628,1629,1630,1633],{},"You do see copies in some ",[375,1631,1632],{},"responses",":",[407,1635,1636,1651],{},[410,1637,1638],{},[413,1639,1640,1642,1645,1648],{},[416,1641,1519],{},[416,1643,1644],{},"Field",[416,1646,1647],{},"What it holds",[416,1649,1650],{},"What to use",[429,1652,1653,1675,1694,1709,1723,1744],{},[413,1654,1655,1661,1666,1669],{},[434,1656,1657,1658],{},"Application lists and ",[443,1659,1660],{"href":247},"getApplication",[434,1662,1663],{},[364,1664,1665],{},"user._id",[434,1667,1668],{},"The copy's id",[434,1670,1671,1674],{},[364,1672,1673],{},"user.mainId",", which is the student id",[413,1676,1677,1680,1686,1688],{},[434,1678,1679],{},"Responses to create, move and delete an application",[434,1681,1682,1685],{},[364,1683,1684],{},"user"," (a plain id)",[434,1687,1668],{},[434,1689,1690,1691,1693],{},"Look the student up by the ",[364,1692,488],{}," you sent",[413,1695,1696,1699,1704,1706],{},[434,1697,1698],{},"Certificates",[434,1700,1701,1703],{},[364,1702,1684],{}," (when present)",[434,1705,1668],{},[434,1707,1708],{},"You asked for the list by student id, so you already know it",[413,1710,1711,1714,1719,1721],{},[434,1712,1713],{},"A payment on an application",[434,1715,1716],{},[364,1717,1718],{},"for",[434,1720,1668],{},[434,1722,528],{},[413,1724,1725,1729,1737,1740],{},[434,1726,1727],{},[443,1728,1560],{"href":205},[434,1730,1731,481,1734],{},[364,1732,1733],{},"data.student._id",[364,1735,1736],{},"data.student.mainId",[434,1738,1739],{},"The copy's id and the student id",[434,1741,1742],{},[364,1743,1736],{},[413,1745,1746,1750,1755,1758],{},[434,1747,1748],{},[443,1749,1560],{"href":205},[434,1751,1752],{},[364,1753,1754],{},"data.supervisor._id",[434,1756,1757],{},"The supervisor's id in that organization",[434,1759,1760,1763],{},[364,1761,1762],{},"data.supervisor.username",", if you need to refer to them again",[357,1765,1766],{},"One rule covers every person object in every response:",[1768,1769,1771],"callout",{"type":1770},"note",[357,1772,1773,1774,1776,1777,1779],{},"A person's student id is their ",[364,1775,515],{}," when the object has one, and their ",[364,1778,439],{}," when it does not.",[689,1781,1783],{"className":1120,"code":1782,"language":1122,"meta":694,"style":694},"const studentIdOf = (person) => person.mainId ?? person._id;\n",[364,1784,1785],{"__ignoreMap":694},[698,1786,1787,1789,1792,1794,1797,1800,1802,1804,1807,1810],{"class":700,"line":701},[698,1788,1129],{"class":716},[698,1790,1791],{"class":1147}," studentIdOf",[698,1793,1172],{"class":716},[698,1795,1796],{"class":729}," (",[698,1798,1799],{"class":704},"person",[698,1801,1193],{"class":729},[698,1803,1196],{"class":716},[698,1805,1806],{"class":729}," person.mainId ",[698,1808,1809],{"class":716},"??",[698,1811,1812],{"class":729}," person._id;\n",[689,1814,1816],{"className":1239,"code":1815,"language":1241,"meta":694,"style":694},"$studentId = $person['mainId'] ?? $person['_id'];\n",[364,1817,1818],{"__ignoreMap":694},[698,1819,1820,1823,1825,1828,1831,1834,1836,1838,1840],{"class":700,"line":701},[698,1821,1822],{"class":729},"$studentId ",[698,1824,1141],{"class":716},[698,1826,1827],{"class":729}," $person[",[698,1829,1830],{"class":712},"'mainId'",[698,1832,1833],{"class":729},"] ",[698,1835,1809],{"class":716},[698,1837,1827],{"class":729},[698,1839,1291],{"class":712},[698,1841,1842],{"class":729},"];\n",[357,1844,1845],{},"A listed application, shortened to the fields that matter here:",[689,1847,1849],{"className":736,"code":1848,"language":738,"meta":694,"style":694},"{\n  \"_id\": \"66b2c3d4e5f60718293a4b5c\",\n  \"exam\": { \"_id\": \"64a1f0b2c9d8e7f600112233\", \"price\": 25 },\n  \"user\": {\n    \"_id\": \"66a0b1c2d3e4f5061728394a\",\n    \"mainId\": \"652f1c9b8e4b2a0012a3c4d5\",\n    \"firstName\": \"Jane\",\n    \"lastName\": \"Doe\"\n  },\n  \"payment\": { \"_id\": \"66b2c3d4e5f60718293a4b5d\", \"status\": \"pending\", \"amount\": 25 }\n}\n",[364,1850,1851,1855,1867,1895,1902,1913,1924,1934,1943,1948,1983],{"__ignoreMap":694},[698,1852,1853],{"class":700,"line":701},[698,1854,745],{"class":729},[698,1856,1857,1860,1862,1865],{"class":700,"line":720},[698,1858,1859],{"class":750},"  \"_id\"",[698,1861,754],{"class":729},[698,1863,1864],{"class":712},"\"66b2c3d4e5f60718293a4b5c\"",[698,1866,760],{"class":729},[698,1868,1869,1872,1874,1877,1879,1882,1884,1887,1889,1892],{"class":700,"line":763},[698,1870,1871],{"class":750},"  \"exam\"",[698,1873,965],{"class":729},[698,1875,1876],{"class":750},"\"_id\"",[698,1878,754],{"class":729},[698,1880,1881],{"class":712},"\"64a1f0b2c9d8e7f600112233\"",[698,1883,587],{"class":729},[698,1885,1886],{"class":750},"\"price\"",[698,1888,754],{"class":729},[698,1890,1891],{"class":708},"25",[698,1893,1894],{"class":729}," },\n",[698,1896,1897,1900],{"class":700,"line":776},[698,1898,1899],{"class":750},"  \"user\"",[698,1901,1392],{"class":729},[698,1903,1904,1906,1908,1911],{"class":700,"line":785},[698,1905,1397],{"class":750},[698,1907,754],{"class":729},[698,1909,1910],{"class":712},"\"66a0b1c2d3e4f5061728394a\"",[698,1912,760],{"class":729},[698,1914,1915,1918,1920,1922],{"class":700,"line":791},[698,1916,1917],{"class":750},"    \"mainId\"",[698,1919,754],{"class":729},[698,1921,1402],{"class":712},[698,1923,760],{"class":729},[698,1925,1926,1928,1930,1932],{"class":700,"line":804},[698,1927,1421],{"class":750},[698,1929,754],{"class":729},[698,1931,1426],{"class":712},[698,1933,760],{"class":729},[698,1935,1936,1938,1940],{"class":700,"line":817},[698,1937,1433],{"class":750},[698,1939,754],{"class":729},[698,1941,1942],{"class":712},"\"Doe\"\n",[698,1944,1945],{"class":700,"line":830},[698,1946,1947],{"class":729},"  },\n",[698,1949,1950,1953,1955,1957,1959,1962,1964,1967,1969,1972,1974,1977,1979,1981],{"class":700,"line":843},[698,1951,1952],{"class":750},"  \"payment\"",[698,1954,965],{"class":729},[698,1956,1876],{"class":750},[698,1958,754],{"class":729},[698,1960,1961],{"class":712},"\"66b2c3d4e5f60718293a4b5d\"",[698,1963,587],{"class":729},[698,1965,1966],{"class":750},"\"status\"",[698,1968,754],{"class":729},[698,1970,1971],{"class":712},"\"pending\"",[698,1973,587],{"class":729},[698,1975,1976],{"class":750},"\"amount\"",[698,1978,754],{"class":729},[698,1980,1891],{"class":708},[698,1982,1005],{"class":729},[698,1984,1985],{"class":700,"line":856},[698,1986,1011],{"class":729},[357,1988,1989,1990,1992,1993,1074],{},"Match that row to your student by ",[364,1991,1673],{},", never by ",[364,1994,1665],{},[1342,1996,1998],{"id":1997},"before-the-first-sign-in","Before the first sign-in",[357,2000,2001],{},"Until a student has followed a sign-in link to an organization, that organization has no copy of them. The operations that need one tell you:",[407,2003,2004,2014],{},[410,2005,2006],{},[413,2007,2008,2011],{},[416,2009,2010],{},"Operation",[416,2012,2013],{},"Answer without a copy",[429,2015,2016,2030,2045,2061,2074,2083],{},[413,2017,2018,2022],{},[434,2019,2020],{},[443,2021,620],{"href":238},[434,2023,2024,754,2027],{},[364,2025,2026],{},"409 conflict",[364,2028,2029],{},"Student has never signed in to stem, so stem holds no record for them. Generate a sign-in link first with POST \u002F:organizationId\u002Fauth\u002Fsignin.",[413,2031,2032,2040],{},[434,2033,2034,587,2036,587,2038],{},[443,2035,1565],{"href":244},[443,2037,643],{"href":264},[443,2039,646],{"href":270},[434,2041,2042,2043],{},"The same ",[364,2044,2026],{},[413,2046,2047,2051],{},[434,2048,2049],{},[443,2050,1560],{"href":205},[434,2052,2053,587,2055,2058,2059,462],{},[364,2054,1070],{},[364,2056,2057],{},"Not found!",", the one answer this operation gives to every refusal (see ",[443,2060,71],{"href":72},[413,2062,2063,2071],{},[434,2064,2065,587,2068],{},[443,2066,2067],{"href":235},"listApplications",[443,2069,2070],{"href":241},"listExamApplications",[434,2072,2073],{},"The student simply does not appear",[413,2075,2076,2080],{},[434,2077,2078],{},[443,2079,590],{"href":226},[434,2081,2082],{},"Works. The picker does not need the copy",[413,2084,2085,2089],{},[434,2086,2087],{},[443,2088,1592],{"href":211},[434,2090,2091],{},"Works. Following the link is what creates the copy",[357,2093,2094,2095,2098,2099,1074],{},"The message names the organization by its slug, not its id. Slugs also appear in a few responses, such as ",[364,2096,2097],{},"organization"," in the sign-in link and supervisor link responses. They are there for people to read; paths always take the ",[364,2100,439],{},[402,2102,2104],{"id":2103},"reference-data-ids","Reference data ids",[1342,2106,553],{"id":2107},"countries",[357,2109,2110,2111,2113,2114,2116,2117,2119],{},"Take country ids from ",[443,2112,540],{"href":150}," and send them as ",[364,2115,545],{}," when you register or update a student. ",[364,2118,545],{}," takes an id only, not a name.",[357,2121,2122,2123,2126,2127,2129,2130,2133],{},"Some countries cannot be selected. They are left out of the list, ",[443,2124,2125],{"href":153},"getCountry"," answers ",[364,2128,1070],{}," for them, and a student write that names one is refused with ",[364,2131,2132],{},"400 bad_request",", exactly as for an id that does not exist.",[357,2135,2136,2137,2139,2140,2142,2143,2146,2147,2150,2151,1074],{},"An exam's ",[364,2138,2107],{}," are that organization's own country records. Their ",[364,2141,439],{},"s are not guaranteed to match the ids from ",[364,2144,2145],{},"GET \u002Fv1\u002Fcountry",". To compare a student's country with an exam's, compare ",[364,2148,2149],{},"iso2",", not ",[364,2152,439],{},[1342,2154,2156],{"id":2155},"grades","Grades",[357,2158,2159,2160,2162,2163,2165,2166,2169,2170,2173,2174,2176,2177,2179],{},"Take grade ids from ",[443,2161,565],{"href":156},". A grade has the same ",[364,2164,439],{}," in every organization, so an exam's ",[364,2167,2168],{},"grades[]._id"," can be compared directly with a student's ",[364,2171,2172],{},"grade._id",". When registering, ",[364,2175,570],{}," also accepts the grade's name (see ",[443,2178,62],{"href":63},").",[357,2181,2182],{},"For display, for example to grey out exams a student could never sit:",[689,2184,2186],{"className":1120,"code":2185,"language":1122,"meta":694,"style":694},"const gradeFits = exam.grades.some((g) => g._id === student.grade._id);\nconst countryFits =\n  exam.countries.length === 0 || exam.countries.some((c) => c.iso2 === student.country.iso2);\n",[364,2187,2188,2221,2231],{"__ignoreMap":694},[698,2189,2190,2192,2195,2197,2200,2203,2205,2208,2210,2212,2215,2218],{"class":700,"line":701},[698,2191,1129],{"class":716},[698,2193,2194],{"class":708}," gradeFits",[698,2196,1172],{"class":716},[698,2198,2199],{"class":729}," exam.grades.",[698,2201,2202],{"class":1147},"some",[698,2204,1187],{"class":729},[698,2206,2207],{"class":704},"g",[698,2209,1193],{"class":729},[698,2211,1196],{"class":716},[698,2213,2214],{"class":729}," g._id ",[698,2216,2217],{"class":716},"===",[698,2219,2220],{"class":729}," student.grade._id);\n",[698,2222,2223,2225,2228],{"class":700,"line":720},[698,2224,1129],{"class":716},[698,2226,2227],{"class":708}," countryFits",[698,2229,2230],{"class":716}," =\n",[698,2232,2233,2236,2239,2242,2245,2248,2251,2253,2255,2258,2260,2262,2265,2267],{"class":700,"line":763},[698,2234,2235],{"class":729},"  exam.countries.",[698,2237,2238],{"class":708},"length",[698,2240,2241],{"class":716}," ===",[698,2243,2244],{"class":708}," 0",[698,2246,2247],{"class":716}," ||",[698,2249,2250],{"class":729}," exam.countries.",[698,2252,2202],{"class":1147},[698,2254,1187],{"class":729},[698,2256,2257],{"class":704},"c",[698,2259,1193],{"class":729},[698,2261,1196],{"class":716},[698,2263,2264],{"class":729}," c.iso2 ",[698,2266,2217],{"class":716},[698,2268,2269],{"class":729}," student.country.iso2);\n",[357,2271,2272,2273,2275,2276,1074],{},"This is only a hint for your own screens. What a student may actually apply for is decided by the picker and by ",[443,2274,620],{"href":238},"; see ",[443,2277,83],{"href":84},[402,2279,2281],{"id":2280},"ids-that-belong-to-one-organization","Ids that belong to one organization",[357,2283,2284],{},"Exam, category, session, language, application, payment, certificate and report ids exist only in the organization that returned them. Always keep them together with that organization's id, and send them only on that organization's paths.",[357,2286,2287,2288,2290,2291,2293,2294,587,2296,2299,2300,2303,2304,2179],{},"An exam id from ",[364,2289,1035],{}," sent on a ",[364,2292,1041],{}," path does not reach the stem exam. It answers ",[364,2295,1070],{},[364,2297,2298],{},"Exam not found!",", because neo has no exam with that id. The same goes for applications (",[364,2301,2302],{},"Application not found!",") and downloads (",[364,2305,2057],{},[357,2307,2308,2309,1074],{},"A good key for an application in your own database is the pair ",[364,2310,2311],{},"(organizationId, applicationId)",[357,2313,2314,2315,2317,2318,2321,2322,2324,2325,587,2328,481,2331,2334,2335,2337],{},"In the picker (",[443,2316,590],{"href":226},"), each leaf's ",[364,2319,2320],{},"matchedExam._id"," is the ",[364,2323,598],{}," to apply with. ",[364,2326,2327],{},"matchedExam.session",[364,2329,2330],{},"matchedExam.category",[364,2332,2333],{},"matchedExam.language"," are plain ids, equal to the ",[364,2336,439],{}," of the tree levels above that leaf.",[402,2339,2341],{"id":2340},"references-resolved-on-reads-plain-ids-on-writes","References: resolved on reads, plain ids on writes",[357,2343,2344,2347],{},[375,2345,2346],{},"Reads resolve references into objects",", so you do not need a second call per row:",[407,2349,2350,2360],{},[410,2351,2352],{},[413,2353,2354,2357],{},[416,2355,2356],{},"Record",[416,2358,2359],{},"Resolved fields",[429,2361,2362,2389],{},[413,2363,2364,2367],{},[434,2365,2366],{},"Application",[434,2368,2369,587,2372,2375,2376,2378,2379,587,2381,587,2383,587,2386,462],{},[364,2370,2371],{},"exam",[364,2373,2374],{},"payment",", and ",[364,2377,1684],{}," (only ",[364,2380,439],{},[364,2382,515],{},[364,2384,2385],{},"firstName",[364,2387,2388],{},"lastName",[413,2390,2391,2394],{},[434,2392,2393],{},"Student",[434,2395,2396,587,2398,587,2401,587,2404,2375,2406,481,2409,2378,2412,587,2414,587,2416,587,2418,587,2420,587,2423,462],{},[364,2397,545],{},[364,2399,2400],{},"city",[364,2402,2403],{},"school",[364,2405,570],{},[364,2407,2408],{},"supervisor",[364,2410,2411],{},"partner",[364,2413,439],{},[364,2415,515],{},[364,2417,2385],{},[364,2419,2388],{},[364,2421,2422],{},"fullName",[364,2424,2425],{},"username",[357,2427,2428,2429,2431],{},"People are deliberately thin. For a student's full profile, call ",[443,2430,1536],{"href":186}," with their student id.",[357,2433,2434],{},[375,2435,2436],{},"Some references stay ids on reads, on purpose:",[369,2438,2439,2447,2453],{},[372,2440,2441,2443,2444,2446],{},[364,2442,2371],{}," on the rows of ",[443,2445,2070],{"href":241},". It is the exam you asked about, so resolving it would repeat the same document on every row.",[372,2448,2449,2452],{},[364,2450,2451],{},"partners[].user"," on team applications. Those are co-participants, who need not be your students, and you only ever receive details of your own.",[372,2454,2455,587,2458,481,2461,2464,2465,2468],{},[364,2456,2457],{},"session",[364,2459,2460],{},"category",[364,2462,2463],{},"language"," on the picker's ",[364,2466,2467],{},"matchedExam"," (above).",[357,2470,2471,2474],{},[375,2472,2473],{},"Writes answer with the record as stored",", so references there are plain ids:",[369,2476,2477,2491],{},[372,2478,2479,2480,2483,2484,587,2486,481,2488,2490],{},"Creating an application (including the ",[364,2481,2482],{},"200"," repeat), moving one and deleting one: ",[364,2485,2371],{},[364,2487,1684],{},[364,2489,2374],{}," are ids.",[372,2492,2493,2494,587,2496,587,2498,587,2500,481,2502,2504,2505,2507],{},"Registering a student, both student updates, setting a password and linking a supervisor: ",[364,2495,545],{},[364,2497,2400],{},[364,2499,2403],{},[364,2501,570],{},[364,2503,2408],{}," are ids. Read the student again with ",[443,2506,1536],{"href":186}," if you need them resolved.",[357,2509,2510],{},"Code that reads both shapes:",[689,2512,2514],{"className":1120,"code":2513,"language":1122,"meta":694,"style":694},"const idOf = (ref) => (typeof ref === 'string' ? ref : ref?._id);\nconst examId = idOf(application.exam);\n",[364,2515,2516,2557],{"__ignoreMap":694},[698,2517,2518,2520,2523,2525,2527,2530,2532,2534,2536,2539,2542,2544,2547,2550,2552,2554],{"class":700,"line":701},[698,2519,1129],{"class":716},[698,2521,2522],{"class":1147}," idOf",[698,2524,1172],{"class":716},[698,2526,1796],{"class":729},[698,2528,2529],{"class":704},"ref",[698,2531,1193],{"class":729},[698,2533,1196],{"class":716},[698,2535,1796],{"class":729},[698,2537,2538],{"class":716},"typeof",[698,2540,2541],{"class":729}," ref ",[698,2543,2217],{"class":716},[698,2545,2546],{"class":712}," 'string'",[698,2548,2549],{"class":716}," ?",[698,2551,2541],{"class":729},[698,2553,1633],{"class":716},[698,2555,2556],{"class":729}," ref?._id);\n",[698,2558,2559,2561,2564,2566,2568],{"class":700,"line":720},[698,2560,1129],{"class":716},[698,2562,2563],{"class":708}," examId",[698,2565,1172],{"class":716},[698,2567,2522],{"class":1147},[698,2569,2570],{"class":729},"(application.exam);\n",[689,2572,2574],{"className":1239,"code":2573,"language":1241,"meta":694,"style":694},"$idOf = fn ($ref) => is_array($ref) ? ($ref['_id'] ?? null) : $ref;\n$examId = $idOf($application['exam']);\n",[364,2575,2576,2617],{"__ignoreMap":694},[698,2577,2578,2581,2583,2586,2589,2592,2595,2598,2601,2603,2605,2607,2610,2612,2614],{"class":700,"line":701},[698,2579,2580],{"class":729},"$idOf ",[698,2582,1141],{"class":716},[698,2584,2585],{"class":716}," fn",[698,2587,2588],{"class":729}," ($ref) => ",[698,2590,2591],{"class":708},"is_array",[698,2593,2594],{"class":729},"($ref) ",[698,2596,2597],{"class":716},"?",[698,2599,2600],{"class":729}," ($ref[",[698,2602,1291],{"class":712},[698,2604,1833],{"class":729},[698,2606,1809],{"class":716},[698,2608,2609],{"class":708}," null",[698,2611,1193],{"class":729},[698,2613,1633],{"class":716},[698,2615,2616],{"class":729}," $ref;\n",[698,2618,2619,2622,2624,2627,2630],{"class":700,"line":720},[698,2620,2621],{"class":729},"$examId ",[698,2623,1141],{"class":716},[698,2625,2626],{"class":729}," $idOf($application[",[698,2628,2629],{"class":712},"'exam'",[698,2631,2632],{"class":729},"]);\n",[402,2634,2636,2637,481,2639],{"id":2635},"certificates-and-reports-_id-and-shortid","Certificates and reports: ",[364,2638,439],{},[364,2640,638],{},[357,2642,2643,2644,2646,2647,2649,2650,2653],{},"Every certificate and report has an ",[364,2645,439],{}," and a ",[364,2648,638],{},": 10 capital letters and digits, such as ",[364,2651,2652],{},"K7Q2M9X4TD",". The download operations accept either one:",[689,2655,2657],{"className":691,"code":2656,"language":693,"meta":694,"style":694},"curl -sS -o report.pdf -w '%{http_code}\\n' -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Freport\u002Fdownload\u002FK7Q2M9X4TD\"\n",[364,2658,2659,2689],{"__ignoreMap":694},[698,2660,2661,2663,2665,2668,2671,2674,2677,2680,2682,2684,2687],{"class":700,"line":701},[698,2662,705],{"class":704},[698,2664,709],{"class":708},[698,2666,2667],{"class":708}," -o",[698,2669,2670],{"class":712}," report.pdf",[698,2672,2673],{"class":708}," -w",[698,2675,2676],{"class":712}," '%{http_code}\\n'",[698,2678,2679],{"class":708}," -H",[698,2681,726],{"class":712},[698,2683,730],{"class":729},[698,2685,2686],{"class":712},"\"",[698,2688,717],{"class":716},[698,2690,2691],{"class":700,"line":720},[698,2692,2693],{"class":712},"  \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Freport\u002Fdownload\u002FK7Q2M9X4TD\"\n",[357,2695,2696,2697,2699,2700,587,2702,2150,2704,2707,2708,2710,2711,2713,2714,2716],{},"A value that is not a 24-character id is looked up as a ",[364,2698,638],{},". So a mistyped id answers ",[364,2701,1070],{},[364,2703,2057],{},[364,2705,2706],{},"400",". The ",[364,2709,638],{}," lookup is case-sensitive: send it in capitals, exactly as it was issued. Use ",[364,2712,439],{}," as the key in your own records. Keep ",[364,2715,638],{}," for when a person has to read or type the code.",[402,2718,2720],{"id":2719},"usernames","Usernames",[357,2722,2723,2724,2727,2728,2731,2732,587,2735,2738,2739,2742],{},"Every student is given a username at registration, such as ",[364,2725,2726],{},"XXK1042",": the country's two-letter code (written ",[364,2729,2730],{},"XX"," in these examples), a letter, and a number of at least four digits. The letter is never ",[364,2733,2734],{},"P",[364,2736,2737],{},"S"," or ",[364,2740,2741],{},"T","; those are kept for other kinds of account. The username is read-only: no operation accepts it in a body.",[357,2744,2745,2746,2748,2749,2752,2753,2756,2757,1074],{},"You never use a student's username to address them; ids do that. The one operation that takes a username is ",[443,2747,1560],{"href":205},", and it takes the ",[375,2750,2751],{},"supervisor's"," username (for example ",[364,2754,2755],{},"XXT1003","), because that is how a supervisor is identified to you. See ",[443,2758,71],{"href":72},[357,2760,2761],{},"Do not use usernames as keys in your own database. Use the student id.",[402,2763,2765],{"id":2764},"ids-in-error-messages","Ids in error messages",[357,2767,2768,2769,2771],{},"One error message is designed to carry an id. When you register a student with an email address that is already registered to your account, the ",[364,2770,2026],{}," names the existing student:",[689,2773,2775],{"className":736,"code":2774,"language":738,"meta":694,"style":694},"{\n  \"error\": {\n    \"code\": \"conflict\",\n    \"message\": \"A student with that email is already registered to this account (652f1c9b8e4b2a0012a3c4d5).\",\n    \"documentation_url\": \"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#conflict\",\n    \"request_id\": \"2c1d0e9f-8a7b-4c6d-9e5f-a4b3c2d1e0f9\"\n  }\n}\n",[364,2776,2777,2781,2788,2800,2812,2824,2834,2838],{"__ignoreMap":694},[698,2778,2779],{"class":700,"line":701},[698,2780,745],{"class":729},[698,2782,2783,2786],{"class":700,"line":720},[698,2784,2785],{"class":750},"  \"error\"",[698,2787,1392],{"class":729},[698,2789,2790,2793,2795,2798],{"class":700,"line":763},[698,2791,2792],{"class":750},"    \"code\"",[698,2794,754],{"class":729},[698,2796,2797],{"class":712},"\"conflict\"",[698,2799,760],{"class":729},[698,2801,2802,2805,2807,2810],{"class":700,"line":776},[698,2803,2804],{"class":750},"    \"message\"",[698,2806,754],{"class":729},[698,2808,2809],{"class":712},"\"A student with that email is already registered to this account (652f1c9b8e4b2a0012a3c4d5).\"",[698,2811,760],{"class":729},[698,2813,2814,2817,2819,2822],{"class":700,"line":785},[698,2815,2816],{"class":750},"    \"documentation_url\"",[698,2818,754],{"class":729},[698,2820,2821],{"class":712},"\"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#conflict\"",[698,2823,760],{"class":729},[698,2825,2826,2829,2831],{"class":700,"line":791},[698,2827,2828],{"class":750},"    \"request_id\"",[698,2830,754],{"class":729},[698,2832,2833],{"class":712},"\"2c1d0e9f-8a7b-4c6d-9e5f-a4b3c2d1e0f9\"\n",[698,2835,2836],{"class":700,"line":804},[698,2837,1503],{"class":729},[698,2839,2840],{"class":700,"line":817},[698,2841,1011],{"class":729},[357,2843,2844,2845,2848,2849,2852,2853,2856,2857,1074],{},"Fetch or update that student instead of retrying. If the same address is registered to a ",[375,2846,2847],{},"different"," account, the ",[364,2850,2851],{},"409"," carries no id: ",[364,2854,2855],{},"That email address is already registered."," See ",[443,2858,62],{"href":63},[357,2860,2861,2862,1633],{},"If you want the id programmatically, extract it defensively and fall back to searching your own records or ",[443,2863,475],{"href":171},[689,2865,2867],{"className":1120,"code":2866,"language":1122,"meta":694,"style":694},"const existingId = \u002F\\(([0-9a-f]{24})\\)\u002F.exec(err.message)?.[1] ?? null;\n",[364,2868,2869],{"__ignoreMap":694},[698,2870,2871,2873,2876,2878,2881,2885,2887,2890,2893,2895,2898,2901,2903,2906,2909,2911,2913,2915,2917],{"class":700,"line":701},[698,2872,1129],{"class":716},[698,2874,2875],{"class":708}," existingId",[698,2877,1172],{"class":716},[698,2879,2880],{"class":712}," \u002F",[698,2882,2884],{"class":2883},"sJaa3","\\(",[698,2886,1328],{"class":712},[698,2888,2889],{"class":708},"[0-9a-f]",[698,2891,2892],{"class":716},"{24}",[698,2894,462],{"class":712},[698,2896,2897],{"class":2883},"\\)",[698,2899,2900],{"class":712},"\u002F",[698,2902,1074],{"class":729},[698,2904,2905],{"class":1147},"exec",[698,2907,2908],{"class":729},"(err.message)?.[",[698,2910,973],{"class":708},[698,2912,1833],{"class":729},[698,2914,1809],{"class":716},[698,2916,2609],{"class":708},[698,2918,2919],{"class":729},";\n",[402,2921,2923],{"id":2922},"when-an-id-is-wrong","When an id is wrong",[357,2925,2926],{},"What each operation answers for an id it cannot use. \"Unknown\" means a well-formed id that matches nothing you can see: missing, another account's, or not reachable from this organization.",[407,2928,2929,2941],{},[410,2930,2931],{},[413,2932,2933,2935,2938],{},[416,2934,2010],{},[416,2936,2937],{},"Unknown id",[416,2939,2940],{},"Malformed id",[429,2942,2943,2962,2987,3021,3037,3059,3076,3096,3111,3136],{},[413,2944,2945,2950,2956],{},[434,2946,2947,2948],{},"Any organization path, bad ",[364,2949,450],{},[434,2951,2952,587,2954],{},[364,2953,1087],{},[364,2955,1073],{},[434,2957,2958,587,2960],{},[364,2959,1087],{},[364,2961,1073],{},[413,2963,2964,2976,2983],{},[434,2965,2966,587,2968,587,2970,587,2972,587,2974],{},[443,2967,1536],{"href":186},[443,2969,1554],{"href":199},[443,2971,1539],{"href":189},[443,2973,1542],{"href":193},[443,2975,1557],{"href":202},[434,2977,2978,587,2980],{},[364,2979,1087],{},[364,2981,2982],{},"Student not found!",[434,2984,2985],{},[364,2986,2706],{},[413,2988,2989,3002,3017],{},[434,2990,2991,587,2993,587,2996,587,2999],{},[443,2992,2125],{"href":153},[443,2994,2995],{"href":159},"getGrade",[443,2997,2998],{"href":165},"getOrganization",[443,3000,3001],{"href":223},"getExamCategory",[434,3003,3004,754,3006,587,3009,587,3012,2738,3014],{},[364,3005,1087],{},[364,3007,3008],{},"Country not found!",[364,3010,3011],{},"Grade not found!",[364,3013,1073],{},[364,3015,3016],{},"Category not found!",[434,3018,3019],{},[364,3020,2706],{},[413,3022,3023,3027,3033],{},[434,3024,3025],{},[443,3026,1560],{"href":205},[434,3028,3029,587,3031],{},[364,3030,1087],{},[364,3032,2057],{},[434,3034,3035],{},[364,3036,2706],{},[413,3038,3039,3049,3055],{},[434,3040,3041,587,3043,587,3045,587,3047],{},[443,3042,590],{"href":226},[443,3044,1565],{"href":244},[443,3046,643],{"href":264},[443,3048,646],{"href":270},[434,3050,3051,587,3053],{},[364,3052,1087],{},[364,3054,2982],{},[434,3056,3057],{},[364,3058,2706],{},[413,3060,3061,3066,3072],{},[434,3062,3063],{},[443,3064,3065],{"href":229},"getExam",[434,3067,3068,587,3070],{},[364,3069,1087],{},[364,3071,2298],{},[434,3073,3074],{},[364,3075,2706],{},[413,3077,3078,3088,3092],{},[434,3079,3080,587,3082,587,3085],{},[443,3081,1660],{"href":247},[443,3083,3084],{"href":250},"moveApplication",[443,3086,3087],{"href":253},"deleteApplication",[434,3089,3090],{},[364,3091,1087],{},[434,3093,3094],{},[364,3095,2706],{},[413,3097,3098,3102,3107],{},[434,3099,3100],{},[443,3101,2070],{"href":241},[434,3103,3104,3106],{},[364,3105,2482],{}," with an empty page",[434,3108,3109],{},[364,3110,2706],{},[413,3112,3113,3121,3127],{},[434,3114,3115,587,3118],{},[443,3116,3117],{"href":261},"downloadCertificate",[443,3119,3120],{"href":267},"downloadReport",[434,3122,3123,587,3125],{},[364,3124,1087],{},[364,3126,2057],{},[434,3128,3129,587,3131,3133,3134,462],{},[364,3130,1087],{},[364,3132,2057],{}," (looked up as a ",[364,3135,638],{},[413,3137,3138,3147,3150],{},[434,3139,3140,3141,587,3143,587,3145,462],{},"An id field in a body (",[364,3142,488],{},[364,3144,598],{},[364,3146,545],{},[434,3148,3149],{},"Depends on the operation; see its reference page",[434,3151,3152,587,3154],{},[364,3153,2706],{},[364,3155,3156],{},"\u003Cfield> must be a mongodb id",[357,3158,3159,3160,3162,3163],{},"A malformed id in a path answers ",[364,3161,2132],{}," with a message such as ",[364,3164,3165],{},"Invalid value for '_id': expected ObjectId.",[402,3167,3169],{"id":3168},"a-checklist-for-storing-ids","A checklist for storing ids",[369,3171,3172,3181,3187,3193,3198],{},[372,3173,3174,3175,3177,3178,3180],{},"Key students by the student id (",[364,3176,439],{}," from registration). Never by a copy's ",[364,3179,439],{},", never by username, never by email.",[372,3182,3183,3184,1074],{},"Key applications, exams and downloads by the pair ",[364,3185,3186],{},"(organizationId, id)",[372,3188,3189,3190,3192],{},"Keep the organization ",[364,3191,439],{},"s in configuration or a startup cache, keyed by slug.",[372,3194,3195,3196,1074],{},"When you read a person out of an application or any other organization record, take ",[364,3197,515],{},[372,3199,3200],{},"Store ids as 24-character strings and compare them as strings.",[3202,3203,3204],"style",{},"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 .sne4z, html code.shiki .sne4z{--shiki-default:#024C1A;--shiki-dark:#72F088}html pre.shiki code .sKwhi, html code.shiki .sKwhi{--shiki-default:#622CBC;--shiki-dark:#DBB7FF}html pre.shiki code .sLBg1, html code.shiki .sLBg1{--shiki-default:#66707B;--shiki-dark:#BDC4CC}html pre.shiki code .sJaa3, html code.shiki .sJaa3{--shiki-default:#024C1A;--shiki-default-font-weight:bold;--shiki-dark:#72F088;--shiki-dark-font-weight:bold}",{"title":694,"searchDepth":720,"depth":763,"links":3206},[3207,3208,3209,3214,3218,3219,3220,3222,3223,3224,3225],{"id":404,"depth":720,"text":405},{"id":676,"depth":720,"text":677},{"id":1339,"depth":720,"text":1340,"children":3210},[3211,3212,3213],{"id":1344,"depth":763,"text":1345},{"id":1609,"depth":763,"text":1610},{"id":1997,"depth":763,"text":1998},{"id":2103,"depth":720,"text":2104,"children":3215},[3216,3217],{"id":2107,"depth":763,"text":553},{"id":2155,"depth":763,"text":2156},{"id":2280,"depth":720,"text":2281},{"id":2340,"depth":720,"text":2341},{"id":2635,"depth":720,"text":3221},"Certificates and reports: _id and shortId",{"id":2719,"depth":720,"text":2720},{"id":2764,"depth":720,"text":2765},{"id":2922,"depth":720,"text":2923},{"id":3168,"depth":720,"text":3169},"Which id to send where. Covers organization ids, the student id and organization copies, mainId, per-organization ids, shortId and usernames.","md",{},true,[445,2998,1536,1554,1565,3117,3120],{"title":36,"description":3226},"api\u002Fidentifiers","e12uW5j6AY3NHCyIFMLFnqCsy3VzTKUsN3ZoCH3dTwE",[3235,3240,3243,3247,3250,3255,3260],{"operationId":445,"slug":3236,"method":133,"path":3237,"tag":74,"summary":161,"deprecated":134,"public":134,"permission":3238,"scope":3239,"order":817},"list-organizations","\u002Fv1\u002Forganization","organization\u002Fread:$org:$ID","flat",{"operationId":2998,"slug":3241,"method":133,"path":3242,"tag":74,"summary":164,"deprecated":134,"public":134,"permission":3238,"scope":3239,"order":830},"get-organization","\u002Fv1\u002Forganization\u002F{id}",{"operationId":1536,"slug":3244,"method":133,"path":3245,"tag":62,"summary":185,"deprecated":134,"public":134,"permission":3246,"scope":3239,"order":890},"get-student","\u002Fv1\u002Fstudent\u002F{studentId}","student\u002Fread:$org:$ID",{"operationId":1554,"slug":3248,"method":133,"path":3249,"tag":62,"summary":198,"deprecated":134,"public":134,"permission":3246,"scope":2097,"order":938},"get-org-student","\u002Fv1\u002F{organizationId}\u002Fstudent\u002F{studentId}",{"operationId":1565,"slug":3251,"method":133,"path":3252,"tag":86,"summary":243,"deprecated":134,"public":134,"permission":3253,"scope":2097,"order":3254},"list-student-applications","\u002Fv1\u002F{organizationId}\u002Fapplication\u002Fstudent-applications\u002F{studentId}","application\u002Fread:$org:$ID",31,{"operationId":3117,"slug":3256,"method":133,"path":3257,"tag":256,"summary":260,"deprecated":134,"public":134,"permission":3258,"scope":2097,"order":3259},"download-certificate","\u002Fv1\u002F{organizationId}\u002Fcertificate\u002Fdownload\u002F{certificateId}","certificate\u002Fread:$org:$ID",35,{"operationId":3120,"slug":3261,"method":133,"path":3262,"tag":256,"summary":266,"deprecated":134,"public":134,"permission":3263,"scope":2097,"order":3264},"download-report","\u002Fv1\u002F{organizationId}\u002Freport\u002Fdownload\u002F{reportId}","report\u002Fread:$org:$ID",37,1791554614921]