[{"data":1,"prerenderedAt":2277},["ShallowReactive",2],{"api-nav":3,"api-guide:\u002Fapi\u002Forganizations":351,"api-spec:guide:\u002Fapi\u002Forganizations":2270},[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":22,"body":353,"description":2262,"extension":2263,"meta":2264,"navTitle":22,"navigation":1463,"operations":2265,"order":2266,"path":23,"section":5,"seo":2267,"status":14,"stem":2268,"__hash__":2269},"apiGuides\u002Fapi\u002Forganizations.md",{"type":354,"value":355,"toc":2243},"minimark",[356,360,365,468,483,492,496,499,585,588,710,727,731,750,772,777,823,1101,1104,1113,1204,1212,1229,1242,1246,1272,1382,1408,1417,1421,1431,1670,1680,1687,1691,1694,1787,1793,1809,1813,1823,1827,1830,1858,1861,1865,1872,1876,1891,1902,1981,1994,2005,2009,2023,2032,2035,2132,2141,2144,2161,2170,2174,2191,2213,2217,2239],[357,358,359],"p",{},"The platform behind this API is one core record plus five olympiads. Knowing which data lives where explains most of the API's shape: why some paths have an organization id and others do not, why a student has to sign in before you can enter them for an exam, and why an id sometimes seems to \"not match\".",[361,362,364],"h2",{"id":363},"one-core-record-five-olympiads","One core record, five olympiads",[366,367,368,384],"table",{},[369,370,371],"thead",{},[372,373,374,378,381],"tr",{},[375,376,377],"th",{},"Slug",[375,379,380],{},"What it is",[375,382,383],{},"What lives there",[385,386,387,406,419,432,444,456],"tbody",{},[372,388,389,396,403],{},[390,391,392],"td",{},[393,394,395],"code",{},"mto",[390,397,398,402],{},[399,400,401],"strong",{},"The core record"," of the Main Team platform",[390,404,405],{},"Partner accounts, every student's core record (name, email, grade, country, password), and the shared reference data: countries, grades and the list of organizations",[372,407,408,413,416],{},[390,409,410],{},[393,411,412],{},"stem",[390,414,415],{},"STEM olympiad",[390,417,418],{},"Its own exams, exam categories, applications, certificates and reports, and its own copy of each student who has signed in there",[372,420,421,426,429],{},[390,422,423],{},[393,424,425],{},"hilingua",[390,427,428],{},"Language olympiad",[390,430,431],{},"The same, for this olympiad",[372,433,434,439,442],{},[390,435,436],{},[393,437,438],{},"neo",[390,440,441],{},"Science olympiad",[390,443,431],{},[372,445,446,451,454],{},[390,447,448],{},[393,449,450],{},"gmath",[390,452,453],{},"Mathematics olympiad",[390,455,431],{},[372,457,458,463,466],{},[390,459,460],{},[393,461,462],{},"coding",[390,464,465],{},"Coding olympiad",[390,467,431],{},[357,469,470,471,474,475,478,479,482],{},"The ",[393,472,473],{},"name"," field of ",[393,476,477],{},"GET \u002Fv1\u002Forganization"," has each organization's official name. Use the ",[399,480,481],{},"slug"," in your code; it is short and stable.",[357,484,485,486,491],{},"A student exists once on the core record and, in addition, once in each olympiad they have signed in to (see ",[487,488,490],"a",{"href":489},"#organization-copies-of-a-student","Organization copies","). Exams, applications and results always belong to one olympiad.",[361,493,495],{"id":494},"two-kinds-of-routes","Two kinds of routes",[357,497,498],{},"The path tells you which part of the platform a route acts on.",[366,500,501,517],{},[369,502,503],{},[372,504,505,508,511,514],{},[375,506,507],{},"Kind",[375,509,510],{},"Path",[375,512,513],{},"Acts on",[375,515,516],{},"Examples",[385,518,519,555],{},[372,520,521,526,532,537],{},[390,522,523],{},[399,524,525],{},"Flat",[390,527,528,531],{},[393,529,530],{},"\u002Fv1\u002F\u003Cresource>"," (no organization id)",[390,533,534,535],{},"The core record, ",[393,536,395],{},[390,538,539,542,543,542,546,542,549,542,552],{},[393,540,541],{},"\u002Fv1\u002Fstudent",", ",[393,544,545],{},"\u002Fv1\u002Fcountry",[393,547,548],{},"\u002Fv1\u002Fgrade",[393,550,551],{},"\u002Fv1\u002Forganization",[393,553,554],{},"\u002Fv1\u002Fapi-account\u002F...",[372,556,557,562,567,574],{},[390,558,559],{},[399,560,561],{},"Per organization",[390,563,564],{},[393,565,566],{},"\u002Fv1\u002F{organizationId}\u002F\u003Cresource>",[390,568,569,570,573],{},"The organization whose ",[393,571,572],{},"_id"," is in the path",[390,575,576,542,579,542,582],{},[393,577,578],{},"\u002Fv1\u002F{organizationId}\u002Fexam",[393,580,581],{},"\u002Fv1\u002F{organizationId}\u002Fapplication",[393,583,584],{},"\u002Fv1\u002F{organizationId}\u002Fauth\u002Fsignin",[357,586,587],{},"The complete list:",[366,589,590,603],{},[369,591,592],{},[372,593,594,600],{},[375,595,596,597,599],{},"Flat routes (act on ",[393,598,395],{},")",[375,601,602],{},"Per-organization routes",[385,604,605,626,641,656,670,698],{},[372,606,607,615],{},[390,608,609,542,612],{},[393,610,611],{},"GET \u002Fv1\u002Fapi-account\u002Fvalidate-me",[393,613,614],{},"POST \u002Fv1\u002Fapi-account\u002Frevoke-token",[390,616,617,542,619,622,623],{},[393,618,133],{},[393,620,621],{},"PUT \u002Fv1\u002F{organizationId}\u002Fstudent..."," and ",[393,624,625],{},"PUT ...\u002Fstudent\u002F{studentId}\u002Fsupervisor",[372,627,628,636],{},[390,629,630,542,633],{},[393,631,632],{},"GET \u002Fv1\u002Fcountry",[393,634,635],{},"GET \u002Fv1\u002Fcountry\u002F{id}",[390,637,638],{},[393,639,640],{},"POST \u002Fv1\u002F{organizationId}\u002Fauth\u002Fsignin",[372,642,643,651],{},[390,644,645,542,648],{},[393,646,647],{},"GET \u002Fv1\u002Fgrade",[393,649,650],{},"GET \u002Fv1\u002Fgrade\u002F{id}",[390,652,653],{},[393,654,655],{},"GET \u002Fv1\u002F{organizationId}\u002Fexam-category...",[372,657,658,665],{},[390,659,660,542,662],{},[393,661,477],{},[393,663,664],{},"GET \u002Fv1\u002Forganization\u002F{id}",[390,666,667],{},[393,668,669],{},"GET \u002Fv1\u002F{organizationId}\u002Fexam...",[372,671,672,687],{},[390,673,674,542,676,542,679,542,681,542,684],{},[393,675,133],{},[393,677,678],{},"POST \u002Fv1\u002Fstudent",[393,680,133],{},[393,682,683],{},"PUT \u002Fv1\u002Fstudent\u002F{studentId}",[393,685,686],{},"PUT \u002Fv1\u002Fstudent\u002F{studentId}\u002Fpassword",[390,688,689,542,691,542,693,542,695],{},[393,690,133],{},[393,692,141],{},[393,694,190],{},[393,696,697],{},"DELETE \u002Fv1\u002F{organizationId}\u002Fapplication...",[372,699,700,702],{},[390,701],{},[390,703,704,542,707],{},[393,705,706],{},"GET \u002Fv1\u002F{organizationId}\u002Fcertificate...",[393,708,709],{},"GET \u002Fv1\u002F{organizationId}\u002Freport...",[357,711,712,713,715,716,719,720,722,723,726],{},"This split also decides your permissions. A flat route needs a role whose target is ",[393,714,395],{}," or ",[393,717,718],{},"*",". A per-organization route needs a role whose target is that organization's slug or ",[393,721,718],{},". See ",[487,724,25],{"href":725},"\u002Fapi\u002Fpermissions#target",".",[361,728,730],{"id":729},"the-organization-id","The organization id",[357,732,733,734,737,738,746,747,726],{},"Every per-organization path starts with ",[393,735,736],{},"{organizationId}",": ",[399,739,740,741,743,744],{},"the ",[393,742,572],{}," of the organization, as returned by ",[393,745,477],{},". It is 24 hexadecimal characters, such as ",[393,748,749],{},"64b7f0c2a1e4d5f6a7b8c9d1",[751,752,754],"callout",{"type":753},"warn",[357,755,756,757,760,761,764,765,768,769,771],{},"The slug does not work in the path. ",[393,758,759],{},"\u002Fv1\u002Fstem\u002Fexam"," answers ",[393,762,763],{},"404 not_found"," with ",[393,766,767],{},"Organization not found!",", just as an id that belongs to no listed organization does. Always put the ",[393,770,572],{}," there.",[773,774,776],"h3",{"id":775},"list-organizations","List organizations",[778,779,784],"pre",{"className":780,"code":781,"language":782,"meta":783,"style":783},"language-bash shiki shiki-themes github-light-high-contrast github-dark-high-contrast","curl -s \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Forganization?limit=100\" \\\n  -H \"Authorization: Bearer $TOKEN\"\n","bash","",[393,785,786,807],{"__ignoreMap":783},[787,788,791,795,799,803],"span",{"class":789,"line":790},"line",1,[787,792,794],{"class":793},"soyes","curl",[787,796,798],{"class":797},"s-5SL"," -s",[787,800,802],{"class":801},"sT6z2"," \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Forganization?limit=100\"",[787,804,806],{"class":805},"sHUrx"," \\\n",[787,808,810,813,816,820],{"class":789,"line":809},2,[787,811,812],{"class":797},"  -H",[787,814,815],{"class":801}," \"Authorization: Bearer ",[787,817,819],{"class":818},"suds8","$TOKEN",[787,821,822],{"class":801},"\"\n",[778,824,828],{"className":825,"code":826,"language":827,"meta":783,"style":783},"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\": \"64b7f0c2a1e4d5f6a7b8c9d1\",\n      \"name\": \"STEM Olympiad\",\n      \"slug\": \"stem\",\n      \"logo\": \"https:\u002F\u002Fexample.org\u002Flogos\u002Fstem.png\",\n      \"desc\": \"International STEM olympiad.\",\n      \"defaultRedirect\": \"https:\u002F\u002Fmy.example-stem.org\"\n    },\n    {\n      \"_id\": \"64b7f0c2a1e4d5f6a7b8c9d2\",\n      \"name\": \"Hi-Lingua\",\n      \"slug\": \"hilingua\",\n      \"logo\": \"https:\u002F\u002Fexample.org\u002Flogos\u002Fhilingua.png\",\n      \"desc\": \"International language olympiad.\",\n      \"defaultRedirect\": \"https:\u002F\u002Fmy.example-hilingua.org\"\n    }\n  ],\n  \"pagination\": { \"page\": 1, \"limit\": 100, \"total\": 5, \"totalPages\": 1 }\n}\n","json",[393,829,830,835,849,862,871,877,890,903,916,929,942,953,959,964,976,988,1000,1012,1024,1034,1040,1046,1095],{"__ignoreMap":783},[787,831,832],{"class":789,"line":790},[787,833,834],{"class":818},"{\n",[787,836,837,841,843,846],{"class":789,"line":809},[787,838,840],{"class":839},"sne4z","  \"success\"",[787,842,737],{"class":818},[787,844,845],{"class":797},"true",[787,847,848],{"class":818},",\n",[787,850,852,855,857,860],{"class":789,"line":851},3,[787,853,854],{"class":839},"  \"message\"",[787,856,737],{"class":818},[787,858,859],{"class":801},"\"Organizations fetched successfully.\"",[787,861,848],{"class":818},[787,863,865,868],{"class":789,"line":864},4,[787,866,867],{"class":839},"  \"data\"",[787,869,870],{"class":818},": [\n",[787,872,874],{"class":789,"line":873},5,[787,875,876],{"class":818},"    {\n",[787,878,880,883,885,888],{"class":789,"line":879},6,[787,881,882],{"class":839},"      \"_id\"",[787,884,737],{"class":818},[787,886,887],{"class":801},"\"64b7f0c2a1e4d5f6a7b8c9d1\"",[787,889,848],{"class":818},[787,891,893,896,898,901],{"class":789,"line":892},7,[787,894,895],{"class":839},"      \"name\"",[787,897,737],{"class":818},[787,899,900],{"class":801},"\"STEM Olympiad\"",[787,902,848],{"class":818},[787,904,906,909,911,914],{"class":789,"line":905},8,[787,907,908],{"class":839},"      \"slug\"",[787,910,737],{"class":818},[787,912,913],{"class":801},"\"stem\"",[787,915,848],{"class":818},[787,917,919,922,924,927],{"class":789,"line":918},9,[787,920,921],{"class":839},"      \"logo\"",[787,923,737],{"class":818},[787,925,926],{"class":801},"\"https:\u002F\u002Fexample.org\u002Flogos\u002Fstem.png\"",[787,928,848],{"class":818},[787,930,932,935,937,940],{"class":789,"line":931},10,[787,933,934],{"class":839},"      \"desc\"",[787,936,737],{"class":818},[787,938,939],{"class":801},"\"International STEM olympiad.\"",[787,941,848],{"class":818},[787,943,945,948,950],{"class":789,"line":944},11,[787,946,947],{"class":839},"      \"defaultRedirect\"",[787,949,737],{"class":818},[787,951,952],{"class":801},"\"https:\u002F\u002Fmy.example-stem.org\"\n",[787,954,956],{"class":789,"line":955},12,[787,957,958],{"class":818},"    },\n",[787,960,962],{"class":789,"line":961},13,[787,963,876],{"class":818},[787,965,967,969,971,974],{"class":789,"line":966},14,[787,968,882],{"class":839},[787,970,737],{"class":818},[787,972,973],{"class":801},"\"64b7f0c2a1e4d5f6a7b8c9d2\"",[787,975,848],{"class":818},[787,977,979,981,983,986],{"class":789,"line":978},15,[787,980,895],{"class":839},[787,982,737],{"class":818},[787,984,985],{"class":801},"\"Hi-Lingua\"",[787,987,848],{"class":818},[787,989,991,993,995,998],{"class":789,"line":990},16,[787,992,908],{"class":839},[787,994,737],{"class":818},[787,996,997],{"class":801},"\"hilingua\"",[787,999,848],{"class":818},[787,1001,1003,1005,1007,1010],{"class":789,"line":1002},17,[787,1004,921],{"class":839},[787,1006,737],{"class":818},[787,1008,1009],{"class":801},"\"https:\u002F\u002Fexample.org\u002Flogos\u002Fhilingua.png\"",[787,1011,848],{"class":818},[787,1013,1015,1017,1019,1022],{"class":789,"line":1014},18,[787,1016,934],{"class":839},[787,1018,737],{"class":818},[787,1020,1021],{"class":801},"\"International language olympiad.\"",[787,1023,848],{"class":818},[787,1025,1027,1029,1031],{"class":789,"line":1026},19,[787,1028,947],{"class":839},[787,1030,737],{"class":818},[787,1032,1033],{"class":801},"\"https:\u002F\u002Fmy.example-hilingua.org\"\n",[787,1035,1037],{"class":789,"line":1036},20,[787,1038,1039],{"class":818},"    }\n",[787,1041,1043],{"class":789,"line":1042},21,[787,1044,1045],{"class":818},"  ],\n",[787,1047,1049,1052,1055,1058,1060,1063,1065,1068,1070,1073,1075,1078,1080,1083,1085,1088,1090,1092],{"class":789,"line":1048},22,[787,1050,1051],{"class":839},"  \"pagination\"",[787,1053,1054],{"class":818},": { ",[787,1056,1057],{"class":839},"\"page\"",[787,1059,737],{"class":818},[787,1061,1062],{"class":797},"1",[787,1064,542],{"class":818},[787,1066,1067],{"class":839},"\"limit\"",[787,1069,737],{"class":818},[787,1071,1072],{"class":797},"100",[787,1074,542],{"class":818},[787,1076,1077],{"class":839},"\"total\"",[787,1079,737],{"class":818},[787,1081,1082],{"class":797},"5",[787,1084,542],{"class":818},[787,1086,1087],{"class":839},"\"totalPages\"",[787,1089,737],{"class":818},[787,1091,1062],{"class":797},[787,1093,1094],{"class":818}," }\n",[787,1096,1098],{"class":789,"line":1097},23,[787,1099,1100],{"class":818},"}\n",[357,1102,1103],{},"(Example data, shortened to two of the five organizations.)",[357,1105,1106,1107,1109,1110,1112],{},"The list holds the five olympiads. ",[393,1108,395],{},", the core record, is not in it: every flat route acts on ",[393,1111,395],{},", so you never need its id.",[366,1114,1115,1125],{},[369,1116,1117],{},[372,1118,1119,1122],{},[375,1120,1121],{},"Field",[375,1123,1124],{},"Meaning",[385,1126,1127,1139,1165,1174,1184,1194],{},[372,1128,1129,1133],{},[390,1130,1131],{},[393,1132,572],{},[390,1134,1135,1136],{},"The id to put in ",[393,1137,1138],{},"\u002Fv1\u002F{organizationId}\u002F...",[372,1140,1141,1145],{},[390,1142,1143],{},[393,1144,481],{},[390,1146,1147,1148,1150,1151,542,1153,542,1155,542,1157,542,1159,542,1161,715,1163],{},"The short name, such as ",[393,1149,412],{},". Role targets use it too, and a role can name only ",[393,1152,395],{},[393,1154,412],{},[393,1156,425],{},[393,1158,438],{},[393,1160,450],{},[393,1162,462],{},[393,1164,718],{},[372,1166,1167,1171],{},[390,1168,1169],{},[393,1170,473],{},[390,1172,1173],{},"Display name",[372,1175,1176,1181],{},[390,1177,1178],{},[393,1179,1180],{},"logo",[390,1182,1183],{},"Logo image URL, when the organization has one",[372,1185,1186,1191],{},[390,1187,1188],{},[393,1189,1190],{},"desc",[390,1192,1193],{},"Short description, when the organization has one",[372,1195,1196,1201],{},[390,1197,1198],{},[393,1199,1200],{},"defaultRedirect",[390,1202,1203],{},"Where that organization's student panel lives. A sign-in link lands there when you do not name a page",[357,1205,1206,1207,622,1209,1211],{},"Fields an organization does not have are left out of its entry, so treat every field except ",[393,1208,572],{},[393,1210,481],{}," as optional.",[357,1213,1214,1215,1218,1219,1222,1223,1226,1227,726],{},"The list is paginated like every list (",[393,1216,1217],{},"page"," defaults to 1, ",[393,1220,1221],{},"limit"," to 20, and values above 100 are lowered to 100). With ",[393,1224,1225],{},"limit=100"," you get every organization in one request. See ",[487,1228,39],{"href":40},[357,1230,1231,1232,1235,1236,1238,1239,726],{},"Needs ",[393,1233,1234],{},"organization\u002Fread"," on ",[393,1237,395],{},". Reference: ",[487,1240,1241],{"href":162},"listOrganizations",[773,1243,1245],{"id":1244},"get-one-organization","Get one organization",[778,1247,1249],{"className":780,"code":1248,"language":782,"meta":783,"style":783},"curl -s \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Forganization\u002F64b7f0c2a1e4d5f6a7b8c9d1\" \\\n  -H \"Authorization: Bearer $TOKEN\"\n",[393,1250,1251,1262],{"__ignoreMap":783},[787,1252,1253,1255,1257,1260],{"class":789,"line":790},[787,1254,794],{"class":793},[787,1256,798],{"class":797},[787,1258,1259],{"class":801}," \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Forganization\u002F64b7f0c2a1e4d5f6a7b8c9d1\"",[787,1261,806],{"class":805},[787,1263,1264,1266,1268,1270],{"class":789,"line":809},[787,1265,812],{"class":797},[787,1267,815],{"class":801},[787,1269,819],{"class":818},[787,1271,822],{"class":801},[778,1273,1275],{"className":825,"code":1274,"language":827,"meta":783,"style":783},"{\n  \"success\": true,\n  \"message\": \"Organization fetched successfully.\",\n  \"data\": {\n    \"_id\": \"64b7f0c2a1e4d5f6a7b8c9d1\",\n    \"name\": \"STEM Olympiad\",\n    \"slug\": \"stem\",\n    \"logo\": \"https:\u002F\u002Fexample.org\u002Flogos\u002Fstem.png\",\n    \"desc\": \"International STEM olympiad.\",\n    \"defaultRedirect\": \"https:\u002F\u002Fmy.example-stem.org\"\n  }\n}\n",[393,1276,1277,1281,1291,1302,1309,1320,1331,1342,1353,1364,1373,1378],{"__ignoreMap":783},[787,1278,1279],{"class":789,"line":790},[787,1280,834],{"class":818},[787,1282,1283,1285,1287,1289],{"class":789,"line":809},[787,1284,840],{"class":839},[787,1286,737],{"class":818},[787,1288,845],{"class":797},[787,1290,848],{"class":818},[787,1292,1293,1295,1297,1300],{"class":789,"line":851},[787,1294,854],{"class":839},[787,1296,737],{"class":818},[787,1298,1299],{"class":801},"\"Organization fetched successfully.\"",[787,1301,848],{"class":818},[787,1303,1304,1306],{"class":789,"line":864},[787,1305,867],{"class":839},[787,1307,1308],{"class":818},": {\n",[787,1310,1311,1314,1316,1318],{"class":789,"line":873},[787,1312,1313],{"class":839},"    \"_id\"",[787,1315,737],{"class":818},[787,1317,887],{"class":801},[787,1319,848],{"class":818},[787,1321,1322,1325,1327,1329],{"class":789,"line":879},[787,1323,1324],{"class":839},"    \"name\"",[787,1326,737],{"class":818},[787,1328,900],{"class":801},[787,1330,848],{"class":818},[787,1332,1333,1336,1338,1340],{"class":789,"line":892},[787,1334,1335],{"class":839},"    \"slug\"",[787,1337,737],{"class":818},[787,1339,913],{"class":801},[787,1341,848],{"class":818},[787,1343,1344,1347,1349,1351],{"class":789,"line":905},[787,1345,1346],{"class":839},"    \"logo\"",[787,1348,737],{"class":818},[787,1350,926],{"class":801},[787,1352,848],{"class":818},[787,1354,1355,1358,1360,1362],{"class":789,"line":918},[787,1356,1357],{"class":839},"    \"desc\"",[787,1359,737],{"class":818},[787,1361,939],{"class":801},[787,1363,848],{"class":818},[787,1365,1366,1369,1371],{"class":789,"line":931},[787,1367,1368],{"class":839},"    \"defaultRedirect\"",[787,1370,737],{"class":818},[787,1372,952],{"class":801},[787,1374,1375],{"class":789,"line":944},[787,1376,1377],{"class":818},"  }\n",[787,1379,1380],{"class":789,"line":955},[787,1381,1100],{"class":818},[357,1383,1384,1385,1387,1388,764,1390,1392,1393,1396,1397,764,1400,1403,1404,1407],{},"An id that names none of the listed organizations, ",[393,1386,395],{},"'s included, answers ",[393,1389,763],{},[393,1391,767],{},". A malformed id, such as ",[393,1394,1395],{},"abc",", answers ",[393,1398,1399],{},"400 bad_request",[393,1401,1402],{},"Invalid value for '_id': expected ObjectId.",". (This route is flat, so it does not go through the organization check described below, where a malformed id answers ",[393,1405,1406],{},"404"," too.)",[357,1409,1231,1410,1235,1412,1238,1414,726],{},[393,1411,1234],{},[393,1413,395],{},[487,1415,1416],{"href":165},"getOrganization",[773,1418,1420],{"id":1419},"keep-a-slug-to-id-map","Keep a slug-to-id map",[357,1422,1423,1424,1426,1427,764,1429,726],{},"Organizations rarely change. Fetch the list when your integration starts, keep a map from slug to ",[393,1425,572],{},", and refresh it once a day, or whenever a call answers ",[393,1428,1406],{},[393,1430,767],{},[778,1432,1436],{"className":1433,"code":1434,"language":1435,"meta":783,"style":783},"language-js shiki shiki-themes github-light-high-contrast github-dark-high-contrast","let orgIds = null; \u002F\u002F { stem: '...', hilingua: '...', ... }\n\nasync function organizationId(slug) {\n  if (!orgIds) {\n    const { data } = await api('\u002Forganization?limit=100');\n    orgIds = Object.fromEntries(data.map((o) => [o.slug, o._id]));\n  }\n  const id = orgIds[slug];\n  if (!id) throw new Error(`Unknown organization slug: ${slug}`);\n  return id;\n}\n\n\u002F\u002F GET \u002Fv1\u002F{stem's _id}\u002Fexam\nconst exams = await api(`\u002F${await organizationId('stem')}\u002Fexam`);\n","js",[393,1437,1438,1459,1465,1485,1499,1529,1563,1567,1581,1613,1621,1625,1629,1634],{"__ignoreMap":783},[787,1439,1440,1443,1446,1449,1452,1455],{"class":789,"line":790},[787,1441,1442],{"class":805},"let",[787,1444,1445],{"class":818}," orgIds ",[787,1447,1448],{"class":805},"=",[787,1450,1451],{"class":797}," null",[787,1453,1454],{"class":818},"; ",[787,1456,1458],{"class":1457},"sLBg1","\u002F\u002F { stem: '...', hilingua: '...', ... }\n",[787,1460,1461],{"class":789,"line":809},[787,1462,1464],{"emptyLinePlaceholder":1463},true,"\n",[787,1466,1467,1470,1473,1477,1480,1482],{"class":789,"line":851},[787,1468,1469],{"class":805},"async",[787,1471,1472],{"class":805}," function",[787,1474,1476],{"class":1475},"sKwhi"," organizationId",[787,1478,1479],{"class":818},"(",[787,1481,481],{"class":793},[787,1483,1484],{"class":818},") {\n",[787,1486,1487,1490,1493,1496],{"class":789,"line":864},[787,1488,1489],{"class":805},"  if",[787,1491,1492],{"class":818}," (",[787,1494,1495],{"class":805},"!",[787,1497,1498],{"class":818},"orgIds) {\n",[787,1500,1501,1504,1507,1510,1513,1515,1518,1521,1523,1526],{"class":789,"line":873},[787,1502,1503],{"class":805},"    const",[787,1505,1506],{"class":818}," { ",[787,1508,1509],{"class":797},"data",[787,1511,1512],{"class":818}," } ",[787,1514,1448],{"class":805},[787,1516,1517],{"class":805}," await",[787,1519,1520],{"class":1475}," api",[787,1522,1479],{"class":818},[787,1524,1525],{"class":801},"'\u002Forganization?limit=100'",[787,1527,1528],{"class":818},");\n",[787,1530,1531,1534,1536,1539,1542,1545,1548,1551,1554,1557,1560],{"class":789,"line":879},[787,1532,1533],{"class":818},"    orgIds ",[787,1535,1448],{"class":805},[787,1537,1538],{"class":818}," Object.",[787,1540,1541],{"class":1475},"fromEntries",[787,1543,1544],{"class":818},"(data.",[787,1546,1547],{"class":1475},"map",[787,1549,1550],{"class":818},"((",[787,1552,1553],{"class":793},"o",[787,1555,1556],{"class":818},") ",[787,1558,1559],{"class":805},"=>",[787,1561,1562],{"class":818}," [o.slug, o._id]));\n",[787,1564,1565],{"class":789,"line":892},[787,1566,1377],{"class":818},[787,1568,1569,1572,1575,1578],{"class":789,"line":905},[787,1570,1571],{"class":805},"  const",[787,1573,1574],{"class":797}," id",[787,1576,1577],{"class":805}," =",[787,1579,1580],{"class":818}," orgIds[slug];\n",[787,1582,1583,1585,1587,1589,1592,1595,1598,1601,1603,1606,1608,1611],{"class":789,"line":918},[787,1584,1489],{"class":805},[787,1586,1492],{"class":818},[787,1588,1495],{"class":805},[787,1590,1591],{"class":818},"id) ",[787,1593,1594],{"class":805},"throw",[787,1596,1597],{"class":805}," new",[787,1599,1600],{"class":1475}," Error",[787,1602,1479],{"class":818},[787,1604,1605],{"class":801},"`Unknown organization slug: ${",[787,1607,481],{"class":818},[787,1609,1610],{"class":801},"}`",[787,1612,1528],{"class":818},[787,1614,1615,1618],{"class":789,"line":931},[787,1616,1617],{"class":805},"  return",[787,1619,1620],{"class":818}," id;\n",[787,1622,1623],{"class":789,"line":944},[787,1624,1100],{"class":818},[787,1626,1627],{"class":789,"line":955},[787,1628,1464],{"emptyLinePlaceholder":1463},[787,1630,1631],{"class":789,"line":961},[787,1632,1633],{"class":1457},"\u002F\u002F GET \u002Fv1\u002F{stem's _id}\u002Fexam\n",[787,1635,1636,1639,1642,1644,1646,1648,1650,1653,1656,1658,1660,1663,1665,1668],{"class":789,"line":966},[787,1637,1638],{"class":805},"const",[787,1640,1641],{"class":797}," exams",[787,1643,1577],{"class":805},[787,1645,1517],{"class":805},[787,1647,1520],{"class":1475},[787,1649,1479],{"class":818},[787,1651,1652],{"class":801},"`\u002F${",[787,1654,1655],{"class":805},"await",[787,1657,1476],{"class":1475},[787,1659,1479],{"class":801},[787,1661,1662],{"class":801},"'stem'",[787,1664,599],{"class":801},[787,1666,1667],{"class":801},"}\u002Fexam`",[787,1669,1528],{"class":818},[357,1671,1479,1672,1675,1676,1679],{},[393,1673,1674],{},"api()"," is the helper from ",[487,1677,19],{"href":1678},"\u002Fapi\u002Fauthentication#nodejs",".)",[357,1681,1682,1683,1686],{},"The list is not filtered by your roles, so it may include organizations you have no role on. That is harmless: a call to one of them answers ",[393,1684,1685],{},"403 forbidden",". Work only with the organizations you agreed with the operator, and look them up by slug rather than by their position in the list, because the list has no guaranteed order.",[773,1688,1690],{"id":1689},"how-the-id-is-checked","How the id is checked",[357,1692,1693],{},"On a per-organization route the API checks, in this order:",[366,1695,1696,1709],{},[369,1697,1698],{},[372,1699,1700,1703,1706],{},[375,1701,1702],{},"Order",[375,1704,1705],{},"Check",[375,1707,1708],{},"If it fails",[385,1710,1711,1724,1741,1756,1769],{},[372,1712,1713,1715,1718],{},[390,1714,1062],{},[390,1716,1717],{},"Your token",[390,1719,1720,1723],{},[393,1721,1722],{},"401 unauthorized",", whatever the organization id. Someone without a valid token cannot find out which organizations exist",[372,1725,1726,1729,1735],{},[390,1727,1728],{},"2",[390,1730,1731,1732,1734],{},"The organization id is 24 hexadecimal characters and names an organization that ",[393,1733,477],{}," lists",[390,1736,1737,542,1739],{},[393,1738,763],{},[393,1740,767],{},[372,1742,1743,1746,1749],{},[390,1744,1745],{},"3",[390,1747,1748],{},"Your roles allow this action on this organization",[390,1750,1751,542,1753],{},[393,1752,1685],{},[393,1754,1755],{},"Insufficient role permissions",[372,1757,1758,1761,1764],{},[390,1759,1760],{},"4",[390,1762,1763],{},"Your rate limit for this route",[390,1765,1766],{},[393,1767,1768],{},"429 too_many_requests",[372,1770,1771,1773,1776],{},[390,1772,1082],{},[390,1774,1775],{},"The request body and the route's own rules",[390,1777,1778,542,1781,542,1783,1786],{},[393,1779,1780],{},"400",[393,1782,1406],{},[393,1784,1785],{},"409"," and so on, as each route documents",[357,1788,1789,1790,1792],{},"So an unknown organization id answers ",[393,1791,1406],{}," even when your roles would not have allowed the call, and the id's letter case does not matter. Requests refused at steps 1 to 3 do not count against your rate limit.",[357,1794,1795,1796,1799,1800,1803,1804,1806,1807,726],{},"One thing happens before all of these steps: reading the request body. A body over 100 kB (",[393,1797,1798],{},"413 payload_too_large","), a body in an encoding the API does not read (",[393,1801,1802],{},"415 unsupported_media_type","), or a body that is not valid JSON (",[393,1805,1399],{},") is refused before the token is even looked at. See ",[487,1808,33],{"href":34},[361,1810,1812],{"id":1811},"your-students","Your students",[357,1814,1815,1816,1818,1819,1822],{},"A student belongs to the partner account that registered them, through ",[393,1817,678],{},". Every route that reads or changes a student, or anything reached through a student (applications, certificates, reports, sign-in links, supervisor links), only ever finds ",[399,1820,1821],{},"your own"," students.",[773,1824,1826],{"id":1825},"a-foreign-record-looks-like-a-missing-one","A foreign record looks like a missing one",[357,1828,1829],{},"The API never tells you that a record exists but belongs to someone else. A student, application, certificate or report that belongs to another partner answers exactly as if it did not exist:",[1831,1832,1833,1848],"ul",{},[1834,1835,1836,1837,1839,1840,1843,1844,1847],"li",{},"Every route answers ",[393,1838,763],{},", with the message it gives for a missing record: ",[393,1841,1842],{},"Student not found!"," for a student, ",[393,1845,1846],{},"Application not found!"," for an application.",[1834,1849,1850,1851,1854,1855,1857],{},"Some routes use one message for every refusal of their own. The supervisor link answers ",[393,1852,1853],{},"Not found!"," whatever check failed, and the certificate and report downloads answer ",[393,1856,1853],{}," for a document that is missing, not yet released, not yours, or has no file.",[357,1859,1860],{},"This is deliberate. If a partner could tell \"exists but not yours\" from \"does not exist\", it could probe ids to learn about other partners' students.",[773,1862,1864],{"id":1863},"a-new-account-does-not-see-old-students","A new account does not see old students",[357,1866,1867,1868,1871],{},"Ownership is tied to your ",[399,1869,1870],{},"account",", not your company. If an operator issues you a replacement account (after a leaked secret, for example), the new account does not see the students the old one registered. Talk to the operator about those students before you switch.",[773,1873,1875],{"id":1874},"which-students-an-organization-route-shows","Which students an organization route shows",[357,1877,1878,1879,622,1881,1883,1884,1886,1887,1890],{},"The student routes under an organization, ",[393,1880,133],{},[393,1882,621],{},", work on the same core records as the flat ",[393,1885,541],{}," routes, filtered to your students ",[399,1888,1889],{},"who have access to that organization",":",[357,1892,1893,1894,1897,1898,1901],{},"Access is held in the student's ",[393,1895,1896],{},"activatedPlatformsThisSeason"," list. ",[393,1899,1900],{},"common"," in that list means \"every organization\"; otherwise the list names the slugs the student may use.",[366,1903,1904,1914],{},[369,1905,1906],{},[372,1907,1908,1911],{},[375,1909,1910],{},"You do",[375,1912,1913],{},"The student's access afterwards",[385,1915,1916,1931,1944,1962,1972],{},[372,1917,1918,1925],{},[390,1919,1920,1922,1923],{},[393,1921,678],{}," without ",[393,1924,1896],{},[390,1926,1927,1930],{},[393,1928,1929],{},"[\"common\"]",": every organization. This is the default",[372,1932,1933,1941],{},[390,1934,1935,1937,1938],{},[393,1936,678],{}," with a list, for example ",[393,1939,1940],{},"[\"stem\"]",[390,1942,1943],{},"Only the organizations on the list",[372,1945,1946,1957],{},[390,1947,1948,1922,1951,1953,1954],{},[393,1949,1950],{},"PUT \u002Fv1\u002F{organizationId}\u002Fstudent\u002F{studentId}",[393,1952,1896],{},", even with an empty body ",[393,1955,1956],{},"{}",[390,1958,1959,1960],{},"That organization is added, unless the student already has ",[393,1961,1900],{},[372,1963,1964,1969],{},[390,1965,1966,1968],{},[393,1967,1950],{}," with a list",[390,1970,1971],{},"The organizations on your list are added. The organization in the path is added only if it is on your list",[372,1973,1974,1978],{},[390,1975,1976,1968],{},[393,1977,683],{},[390,1979,1980],{},"The organizations on your list are added",[751,1982,1984],{"type":1983},"note",[357,1985,1986,1987,1990,1991,1993],{},"An update only ever adds. Nothing you send removes an organization from a student's list: a value the list already holds is not added twice, and ",[393,1988,1989],{},"[]"," adds nothing. To give a student one more organization, send ",[393,1992,1956],{}," to that organization's update route, or send the slug alone. You never need to read the current list first.",[357,1995,1996,1997,764,1999,2002,2003,726],{},"A sign-in link for a student without access to the organization answers ",[393,1998,1685],{},[393,2000,2001],{},"Student is not activated for organization \u003Cslug>.",". The student guide covers the field in full: see ",[487,2004,62],{"href":63},[361,2006,2008],{"id":2007},"organization-copies-of-a-student","Organization copies of a student",[357,2010,2011,2012,2015,2016,2018,2019,2022],{},"Each olympiad keeps ",[399,2013,2014],{},"its own copy"," of every student who has signed in there. That copy has its own ",[393,2017,572],{}," in the olympiad, and it points back to the core record through the field ",[393,2020,2021],{},"mainId",". Applications, certificates and reports belong to the olympiad's copy.",[357,2024,2025,2028,2029,2031],{},[399,2026,2027],{},"The copy is created the first time the student signs in to that olympiad."," For an integration, that means the student following a sign-in link you minted with ",[393,2030,640],{},". No API call creates the copy directly; only a sign-in does.",[357,2033,2034],{},"Until the student has signed in to an olympiad once (the examples use stem; the message names the olympiad you called):",[366,2036,2037,2047],{},[369,2038,2039],{},[372,2040,2041,2044],{},[375,2042,2043],{},"You call",[375,2045,2046],{},"You get",[385,2048,2049,2064,2076,2090,2104,2120],{},[372,2050,2051,2056],{},[390,2052,2053],{},[393,2054,2055],{},"POST \u002Fv1\u002F{organizationId}\u002Fapplication",[390,2057,2058,737,2061],{},[393,2059,2060],{},"409 conflict",[393,2062,2063],{},"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.",[372,2065,2066,2071],{},[390,2067,2068],{},[393,2069,2070],{},"GET \u002Fv1\u002F{organizationId}\u002Fapplication\u002Fstudent-applications\u002F{studentId}",[390,2072,2073,2074],{},"The same ",[393,2075,2060],{},[372,2077,2078,2086],{},[390,2079,2080,622,2083],{},[393,2081,2082],{},"GET \u002Fv1\u002F{organizationId}\u002Fcertificate\u002F{userId}",[393,2084,2085],{},"GET \u002Fv1\u002F{organizationId}\u002Freport\u002F{userId}",[390,2087,2073,2088],{},[393,2089,2060],{},[372,2091,2092,2097],{},[390,2093,2094],{},[393,2095,2096],{},"PUT \u002Fv1\u002F{organizationId}\u002Fstudent\u002F{studentId}\u002Fsupervisor",[390,2098,2099,542,2101,2103],{},[393,2100,763],{},[393,2102,1853],{}," (the supervisor link uses one answer for every refusal)",[372,2105,2106,2114],{},[390,2107,2108,622,2111],{},[393,2109,2110],{},"GET \u002Fv1\u002F{organizationId}\u002Fapplication",[393,2112,2113],{},"GET \u002Fv1\u002F{organizationId}\u002Fapplication\u002Fexam-applications\u002F{examId}",[390,2115,2116,2119],{},[393,2117,2118],{},"200",". The student is simply not in the results",[372,2121,2122,2127],{},[390,2123,2124],{},[393,2125,2126],{},"GET \u002Fv1\u002F{organizationId}\u002Fexam\u002Favailable\u002F{studentId}",[390,2128,2129,2131],{},[393,2130,2118],{},", as long as the student has a grade. The exam picker works before the first sign-in, so you can show the choices early",[357,2133,470,2134,2136,2137,764,2139,726],{},[393,2135,1785],{}," comes after the ownership check, so a student who is not yours still answers ",[393,2138,1406],{},[393,2140,1842],{},[357,2142,2143],{},"So the usual order for a new student on an olympiad is:",[2145,2146,2147,2152,2158],"ol",{},[1834,2148,2149,2150,726],{},"Register the student on the core record: ",[393,2151,678],{},[1834,2153,2154,2155,2157],{},"Mint a sign-in link on the olympiad and send the student to it: ",[393,2156,640],{},". Their first sign-in creates the olympiad's copy.",[1834,2159,2160],{},"Now enter them for exams and link supervisors on that olympiad.",[357,2162,470,2163,2166,2167,2169],{},[487,2164,2165],{"href":101},"register and apply tutorial"," walks through this end to end, and ",[487,2168,80],{"href":81}," covers the link itself.",[773,2171,2173],{"id":2172},"which-id-to-use","Which id to use",[357,2175,2176,2177,2180,2181,2183,2184,2186,2187,2190],{},"Always identify a student by the ",[399,2178,2179],{},"core id",": the ",[393,2182,572],{}," that ",[393,2185,678],{}," returned. Every route that takes a ",[393,2188,2189],{},"studentId"," expects it, including the per-organization routes.",[357,2192,2193,2194,622,2196,2198,2199,2201,2202,2204,2205,2210,2211,726],{},"In responses that come from an olympiad (applications, for example), a student appears with both ",[393,2195,572],{},[393,2197,2021],{},". There, ",[393,2200,572],{}," is the olympiad's copy and ",[393,2203,2021],{}," is the core id you know. ",[399,2206,2207,2208,726],{},"Match on ",[393,2209,2021],{}," See ",[487,2212,36],{"href":37},[361,2214,2216],{"id":2215},"where-to-go-next","Where to go next",[1831,2218,2219,2224,2229,2234],{},[1834,2220,2221,2222,726],{},"The permission model and the target of a role: ",[487,2223,25],{"href":26},[1834,2225,2226,2227,726],{},"Registering and updating students: ",[487,2228,62],{"href":63},[1834,2230,2231,2232,726],{},"Countries and grades for registration: ",[487,2233,74],{"href":75},[1834,2235,2236,2237,726],{},"Exams and what \"open\" means: ",[487,2238,83],{"href":84},[2240,2241,2242],"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 .sLBg1, html code.shiki .sLBg1{--shiki-default:#66707B;--shiki-dark:#BDC4CC}html pre.shiki code .sKwhi, html code.shiki .sKwhi{--shiki-default:#622CBC;--shiki-dark:#DBB7FF}",{"title":783,"searchDepth":809,"depth":851,"links":2244},[2245,2246,2247,2253,2258,2261],{"id":363,"depth":809,"text":364},{"id":494,"depth":809,"text":495},{"id":729,"depth":809,"text":730,"children":2248},[2249,2250,2251,2252],{"id":775,"depth":851,"text":776},{"id":1244,"depth":851,"text":1245},{"id":1419,"depth":851,"text":1420},{"id":1689,"depth":851,"text":1690},{"id":1811,"depth":809,"text":1812,"children":2254},[2255,2256,2257],{"id":1825,"depth":851,"text":1826},{"id":1863,"depth":851,"text":1864},{"id":1874,"depth":851,"text":1875},{"id":2007,"depth":809,"text":2008,"children":2259},[2260],{"id":2172,"depth":851,"text":2173},{"id":2215,"depth":809,"text":2216},"The core record (mto) and the five olympiads, which routes act on which, why paths take the organization _id, and what \"your students\" means.","md",{},[1241,1416],"40",{"title":22,"description":2262},"api\u002Forganizations","DL73doDoaTTMi6spdgOrjXxEdcKbRq9xG57QY-YPfuo",[2271,2274],{"operationId":1241,"slug":775,"method":133,"path":551,"tag":74,"summary":161,"deprecated":134,"public":134,"permission":2272,"scope":2273,"order":905},"organization\u002Fread:$org:$ID","flat",{"operationId":1416,"slug":2275,"method":133,"path":2276,"tag":74,"summary":164,"deprecated":134,"public":134,"permission":2272,"scope":2273,"order":918},"get-organization","\u002Fv1\u002Forganization\u002F{id}",1791554614905]