[{"data":1,"prerenderedAt":2356},["ShallowReactive",2],{"api-nav":3,"api-guide:\u002Fapi\u002Fguides\u002Fbulk-registration":351,"api-spec:guide:\u002Fapi\u002Fguides\u002Fbulk-registration":2329},[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":353,"body":354,"description":2320,"extension":2321,"meta":2322,"navTitle":65,"navigation":1943,"operations":2323,"order":2325,"path":66,"section":58,"seo":2326,"status":14,"stem":2327,"__hash__":2328},"apiGuides\u002Fapi\u002Fguides\u002Fbulk-registration.md","Registering many students at once",{"type":355,"value":356,"toc":2308},"minimark",[357,361,379,385,390,465,538,541,697,701,709,715,733,737,751,882,887,899,903,912,915,918,942,946,952,961,965,970,1252,1268,1380,1402,1417,1421,1435,1671,1676,1745,1752,1756,1802,1811,1815,1825,1831,1838,1842,2299,2304],[358,359,353],"h1",{"id":360},"registering-many-students-at-once",[362,363,364,368,369,375,376,378],"p",{},[365,366,367],"code",{},"createStudentImport"," registers 30 to 1000 students in one request. Every row follows\n",[370,371,372],"a",{"href":174},[365,373,374],{},"registerStudent","'s rules exactly, so read\n",[370,377,62],{"href":63}," first: this is the same registration, a class at a time.",[362,380,381,382,384],{},"Use it when you have a roster. For a handful of students, call ",[365,383,374],{}," per student —\nan import is queued and answered before it runs, and for five students the wait is not worth it.",[386,387,389],"h2",{"id":388},"how-it-works","How it works",[391,392,393,413,424,435,454],"ol",{},[394,395,396,397,400,401,404,405,408,409,412],"li",{},"You send the rows. The whole batch is checked while you wait: every field, every ",[365,398,399],{},"country",",\n",[365,402,403],{},"grade",", ",[365,406,407],{},"city"," and ",[365,410,411],{},"school",", and every email address.",[394,414,415,416,419,420,423],{},"If anything is wrong, you get ",[365,417,418],{},"422"," and nothing is queued. ",[365,421,422],{},"error.details.rows"," lists every row\nat fault, so one round trip tells you everything to fix.",[394,425,426,427,430,431,434],{},"If everything is right, you get ",[365,428,429],{},"202"," with an import, and the ",[365,432,433],{},"Location"," header is where to read\nit.",[394,436,437,438,441,442,445,446,449,450,453],{},"You poll ",[365,439,440],{},"getStudentImport"," every few seconds until ",[365,443,444],{},"status"," is no longer ",[365,447,448],{},"queued"," or ",[365,451,452],{},"running",".",[394,455,456,457,460,461,464],{},"On ",[365,458,459],{},"succeeded",", every row carries its student's ",[365,462,463],{},"_id",". Keep them.",[466,467,472],"pre",{"className":468,"code":469,"language":470,"meta":471,"style":471},"language-bash shiki shiki-themes github-light-high-contrast github-dark-high-contrast","curl -sS -X POST https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Fstudent\u002Fimport \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"clientReference\":\"year-10-autumn\",\"students\":[ ... 30 to 1000 rows ... ]}'\n","bash","",[365,473,474,501,519,529],{"__ignoreMap":471},[475,476,479,483,487,490,494,497],"span",{"class":477,"line":478},"line",1,[475,480,482],{"class":481},"soyes","curl",[475,484,486],{"class":485},"s-5SL"," -sS",[475,488,489],{"class":485}," -X",[475,491,493],{"class":492},"sT6z2"," POST",[475,495,496],{"class":492}," https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Fstudent\u002Fimport",[475,498,500],{"class":499},"sHUrx"," \\\n",[475,502,504,507,510,514,517],{"class":477,"line":503},2,[475,505,506],{"class":485},"  -H",[475,508,509],{"class":492}," \"Authorization: Bearer ",[475,511,513],{"class":512},"suds8","$TOKEN",[475,515,516],{"class":492},"\"",[475,518,500],{"class":499},[475,520,522,524,527],{"class":477,"line":521},3,[475,523,506],{"class":485},[475,525,526],{"class":492}," 'Content-Type: application\u002Fjson'",[475,528,500],{"class":499},[475,530,532,535],{"class":477,"line":531},4,[475,533,534],{"class":485},"  -d",[475,536,537],{"class":492}," '{\"clientReference\":\"year-10-autumn\",\"students\":[ ... 30 to 1000 rows ... ]}'\n",[362,539,540],{},"The answer:",[466,542,546],{"className":543,"code":544,"language":545,"meta":471,"style":471},"language-json shiki shiki-themes github-light-high-contrast github-dark-high-contrast","{\n  \"success\": true,\n  \"message\": \"Import accepted. The students are registered in the background; read the import to follow it.\",\n  \"data\": {\n    \"_id\": \"65f0c2a1d3e4f5a6b7c8d901\",\n    \"status\": \"queued\",\n    \"total\": 250,\n    \"registered\": 0,\n    \"clientReference\": \"year-10-autumn\",\n    \"students\": [],\n    \"createdAt\": \"2026-10-06T08:15:00.000Z\",\n    \"expiresAt\": \"2026-11-05T08:15:00.000Z\"\n  }\n}\n","json",[365,547,548,553,567,579,587,600,613,626,639,652,661,674,685,691],{"__ignoreMap":471},[475,549,550],{"class":477,"line":478},[475,551,552],{"class":512},"{\n",[475,554,555,559,562,565],{"class":477,"line":503},[475,556,558],{"class":557},"sne4z","  \"success\"",[475,560,561],{"class":512},": ",[475,563,564],{"class":485},"true",[475,566,400],{"class":512},[475,568,569,572,574,577],{"class":477,"line":521},[475,570,571],{"class":557},"  \"message\"",[475,573,561],{"class":512},[475,575,576],{"class":492},"\"Import accepted. The students are registered in the background; read the import to follow it.\"",[475,578,400],{"class":512},[475,580,581,584],{"class":477,"line":531},[475,582,583],{"class":557},"  \"data\"",[475,585,586],{"class":512},": {\n",[475,588,590,593,595,598],{"class":477,"line":589},5,[475,591,592],{"class":557},"    \"_id\"",[475,594,561],{"class":512},[475,596,597],{"class":492},"\"65f0c2a1d3e4f5a6b7c8d901\"",[475,599,400],{"class":512},[475,601,603,606,608,611],{"class":477,"line":602},6,[475,604,605],{"class":557},"    \"status\"",[475,607,561],{"class":512},[475,609,610],{"class":492},"\"queued\"",[475,612,400],{"class":512},[475,614,616,619,621,624],{"class":477,"line":615},7,[475,617,618],{"class":557},"    \"total\"",[475,620,561],{"class":512},[475,622,623],{"class":485},"250",[475,625,400],{"class":512},[475,627,629,632,634,637],{"class":477,"line":628},8,[475,630,631],{"class":557},"    \"registered\"",[475,633,561],{"class":512},[475,635,636],{"class":485},"0",[475,638,400],{"class":512},[475,640,642,645,647,650],{"class":477,"line":641},9,[475,643,644],{"class":557},"    \"clientReference\"",[475,646,561],{"class":512},[475,648,649],{"class":492},"\"year-10-autumn\"",[475,651,400],{"class":512},[475,653,655,658],{"class":477,"line":654},10,[475,656,657],{"class":557},"    \"students\"",[475,659,660],{"class":512},": [],\n",[475,662,664,667,669,672],{"class":477,"line":663},11,[475,665,666],{"class":557},"    \"createdAt\"",[475,668,561],{"class":512},[475,670,671],{"class":492},"\"2026-10-06T08:15:00.000Z\"",[475,673,400],{"class":512},[475,675,677,680,682],{"class":477,"line":676},12,[475,678,679],{"class":557},"    \"expiresAt\"",[475,681,561],{"class":512},[475,683,684],{"class":492},"\"2026-11-05T08:15:00.000Z\"\n",[475,686,688],{"class":477,"line":687},13,[475,689,690],{"class":512},"  }\n",[475,692,694],{"class":477,"line":693},14,[475,695,696],{"class":512},"}\n",[386,698,700],{"id":699},"all-of-them-or-none-of-them","All of them, or none of them",[362,702,703,704,708],{},"The students are written in ",[705,706,707],"strong",{},"one transaction",". A batch registers every row or registers nothing;\nthere is no partial import to reconcile and nothing to undo.",[362,710,711,712,714],{},"That is the whole reason this operation exists rather than a loop over ",[365,713,374],{},". Half a\nclass is worse than none: it leaves you reconciling two systems by hand, with welcome mail already\nsent to some of the children and not others.",[362,716,717,718,720,721,724,725,728,729,732],{},"So when ",[365,719,444],{}," is ",[365,722,723],{},"failed",", no student of that batch was registered, every row reads ",[365,726,727],{},"skipped",",\nand ",[365,730,731],{},"failure"," says why. Fix what it names and send the batch again.",[386,734,736],{"id":735},"a-row","A row",[362,738,739,740,742,743,746,747,750],{},"A row is ",[365,741,374],{},"'s body without ",[365,744,745],{},"password",", plus an optional ",[365,748,749],{},"externalRef"," of your own:",[466,752,754],{"className":543,"code":753,"language":545,"meta":471,"style":471},"{\n  \"firstName\": \"Jane\",\n  \"lastName\": \"Doe\",\n  \"birth\": \"14\u002F05\u002F2008\",\n  \"sex\": \"f\",\n  \"email\": \"jane.doe@example.com\",\n  \"country\": \"64b7f0c2a1d3e4f5a6b7c8d9\",\n  \"grade\": \"10\",\n  \"city\": \"Springfield\",\n  \"school\": \"Springfield High School\",\n  \"externalRef\": \"roster-2026-114\"\n}\n",[365,755,756,760,772,784,796,808,820,832,844,856,868,878],{"__ignoreMap":471},[475,757,758],{"class":477,"line":478},[475,759,552],{"class":512},[475,761,762,765,767,770],{"class":477,"line":503},[475,763,764],{"class":557},"  \"firstName\"",[475,766,561],{"class":512},[475,768,769],{"class":492},"\"Jane\"",[475,771,400],{"class":512},[475,773,774,777,779,782],{"class":477,"line":521},[475,775,776],{"class":557},"  \"lastName\"",[475,778,561],{"class":512},[475,780,781],{"class":492},"\"Doe\"",[475,783,400],{"class":512},[475,785,786,789,791,794],{"class":477,"line":531},[475,787,788],{"class":557},"  \"birth\"",[475,790,561],{"class":512},[475,792,793],{"class":492},"\"14\u002F05\u002F2008\"",[475,795,400],{"class":512},[475,797,798,801,803,806],{"class":477,"line":589},[475,799,800],{"class":557},"  \"sex\"",[475,802,561],{"class":512},[475,804,805],{"class":492},"\"f\"",[475,807,400],{"class":512},[475,809,810,813,815,818],{"class":477,"line":602},[475,811,812],{"class":557},"  \"email\"",[475,814,561],{"class":512},[475,816,817],{"class":492},"\"jane.doe@example.com\"",[475,819,400],{"class":512},[475,821,822,825,827,830],{"class":477,"line":615},[475,823,824],{"class":557},"  \"country\"",[475,826,561],{"class":512},[475,828,829],{"class":492},"\"64b7f0c2a1d3e4f5a6b7c8d9\"",[475,831,400],{"class":512},[475,833,834,837,839,842],{"class":477,"line":628},[475,835,836],{"class":557},"  \"grade\"",[475,838,561],{"class":512},[475,840,841],{"class":492},"\"10\"",[475,843,400],{"class":512},[475,845,846,849,851,854],{"class":477,"line":641},[475,847,848],{"class":557},"  \"city\"",[475,850,561],{"class":512},[475,852,853],{"class":492},"\"Springfield\"",[475,855,400],{"class":512},[475,857,858,861,863,866],{"class":477,"line":654},[475,859,860],{"class":557},"  \"school\"",[475,862,561],{"class":512},[475,864,865],{"class":492},"\"Springfield High School\"",[475,867,400],{"class":512},[475,869,870,873,875],{"class":477,"line":663},[475,871,872],{"class":557},"  \"externalRef\"",[475,874,561],{"class":512},[475,876,877],{"class":492},"\"roster-2026-114\"\n",[475,879,880],{"class":477,"line":676},[475,881,696],{"class":512},[362,883,884,886],{},[365,885,749],{}," is yours: it is echoed back on the row when you read the import, so you can line the\nanswer up with your spreadsheet without matching on the address. It is not stored on the student,\nnothing reads it, and two rows may carry the same one.",[362,888,889,892,893,895,896,453],{},[365,890,891],{},"activatedPlatformsThisSeason"," works exactly as in ",[365,894,374],{},", per row, and defaults to\n",[365,897,898],{},"[\"common\"]",[386,900,902],{"id":901},"no-passwords","No passwords",[362,904,905,906,908,909,453],{},"A row does not take ",[365,907,745],{},", and sending one is refused with ",[365,910,911],{},"400",[362,913,914],{},"Hashing a password is deliberately slow — that is what makes a stolen database useless — so a\nthousand of them would keep your batch waiting, and until they were hashed the passwords you sent\nwould sit in a queue. Neither is a trade worth making for a convenience.",[362,916,917],{},"Sign the students in instead:",[919,920,921,931],"ul",{},[394,922,923,928,929,453],{},[370,924,925],{"href":211},[365,926,927],{},"createSigninLink"," sends one of them straight into a panel\nwith a single-use link. See ",[370,930,80],{"href":81},[394,932,933,938,939,453],{},[370,934,935],{"href":193},[365,936,937],{},"setStudentPassword"," sets a password per student\nafterwards, if you really want one. See ",[370,940,941],{"href":69},"Student passwords",[386,943,945],{"id":944},"the-welcome-email","The welcome email",[362,947,948,949,951],{},"Each student gets the same welcome email ",[365,950,374],{}," sends, one per student, with the same\ntext. Bulk registration changes nothing about it.",[362,953,954,955,960],{},"That is worth a thought before you send a roster: the addresses in it are the ones you typed, and\nevery typo is a message to a stranger. Check the batch with\n",[370,956,957],{"href":177},[365,958,959],{},"checkStudentRegistration"," while you are still\nbuilding it, row by row, if you are not sure of your data.",[386,962,964],{"id":963},"when-a-batch-is-refused","When a batch is refused",[362,966,967,969],{},[365,968,418],{},", nothing queued, and every row at fault named:",[466,971,973],{"className":543,"code":972,"language":545,"meta":471,"style":471},"{\n  \"error\": {\n    \"code\": \"unprocessable_entity\",\n    \"message\": \"3 of 250 rows cannot be registered. Nothing was registered and no import was queued; error.details.rows lists every problem.\",\n    \"documentation_url\": \"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#unprocessable_entity\",\n    \"request_id\": \"0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e\",\n    \"details\": {\n      \"total\": 250,\n      \"rejected\": 3,\n      \"truncated\": false,\n      \"rows\": [\n        { \"row\": 4, \"field\": \"birth\", \"code\": \"invalid_field\", \"message\": \"birth must be a real date in DD\u002FMM\u002FYYYY format\" },\n        { \"row\": 17, \"field\": \"email\", \"code\": \"email_taken_by_your_student\", \"message\": \"One of your students already has this email address.\", \"studentId\": \"652f1c9b8e4b2a0012a3c4d5\" },\n        { \"row\": 31, \"field\": \"email\", \"code\": \"duplicate_in_request\", \"message\": \"Row 12 has the same email address.\", \"duplicateOf\": 12 }\n      ]\n    }\n  }\n}\n",[365,974,975,979,986,998,1010,1022,1034,1041,1052,1064,1076,1084,1130,1180,1230,1236,1242,1247],{"__ignoreMap":471},[475,976,977],{"class":477,"line":478},[475,978,552],{"class":512},[475,980,981,984],{"class":477,"line":503},[475,982,983],{"class":557},"  \"error\"",[475,985,586],{"class":512},[475,987,988,991,993,996],{"class":477,"line":521},[475,989,990],{"class":557},"    \"code\"",[475,992,561],{"class":512},[475,994,995],{"class":492},"\"unprocessable_entity\"",[475,997,400],{"class":512},[475,999,1000,1003,1005,1008],{"class":477,"line":531},[475,1001,1002],{"class":557},"    \"message\"",[475,1004,561],{"class":512},[475,1006,1007],{"class":492},"\"3 of 250 rows cannot be registered. Nothing was registered and no import was queued; error.details.rows lists every problem.\"",[475,1009,400],{"class":512},[475,1011,1012,1015,1017,1020],{"class":477,"line":589},[475,1013,1014],{"class":557},"    \"documentation_url\"",[475,1016,561],{"class":512},[475,1018,1019],{"class":492},"\"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#unprocessable_entity\"",[475,1021,400],{"class":512},[475,1023,1024,1027,1029,1032],{"class":477,"line":602},[475,1025,1026],{"class":557},"    \"request_id\"",[475,1028,561],{"class":512},[475,1030,1031],{"class":492},"\"0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e\"",[475,1033,400],{"class":512},[475,1035,1036,1039],{"class":477,"line":615},[475,1037,1038],{"class":557},"    \"details\"",[475,1040,586],{"class":512},[475,1042,1043,1046,1048,1050],{"class":477,"line":628},[475,1044,1045],{"class":557},"      \"total\"",[475,1047,561],{"class":512},[475,1049,623],{"class":485},[475,1051,400],{"class":512},[475,1053,1054,1057,1059,1062],{"class":477,"line":641},[475,1055,1056],{"class":557},"      \"rejected\"",[475,1058,561],{"class":512},[475,1060,1061],{"class":485},"3",[475,1063,400],{"class":512},[475,1065,1066,1069,1071,1074],{"class":477,"line":654},[475,1067,1068],{"class":557},"      \"truncated\"",[475,1070,561],{"class":512},[475,1072,1073],{"class":485},"false",[475,1075,400],{"class":512},[475,1077,1078,1081],{"class":477,"line":663},[475,1079,1080],{"class":557},"      \"rows\"",[475,1082,1083],{"class":512},": [\n",[475,1085,1086,1089,1092,1094,1097,1099,1102,1104,1107,1109,1112,1114,1117,1119,1122,1124,1127],{"class":477,"line":676},[475,1087,1088],{"class":512},"        { ",[475,1090,1091],{"class":557},"\"row\"",[475,1093,561],{"class":512},[475,1095,1096],{"class":485},"4",[475,1098,404],{"class":512},[475,1100,1101],{"class":557},"\"field\"",[475,1103,561],{"class":512},[475,1105,1106],{"class":492},"\"birth\"",[475,1108,404],{"class":512},[475,1110,1111],{"class":557},"\"code\"",[475,1113,561],{"class":512},[475,1115,1116],{"class":492},"\"invalid_field\"",[475,1118,404],{"class":512},[475,1120,1121],{"class":557},"\"message\"",[475,1123,561],{"class":512},[475,1125,1126],{"class":492},"\"birth must be a real date in DD\u002FMM\u002FYYYY format\"",[475,1128,1129],{"class":512}," },\n",[475,1131,1132,1134,1136,1138,1141,1143,1145,1147,1150,1152,1154,1156,1159,1161,1163,1165,1168,1170,1173,1175,1178],{"class":477,"line":687},[475,1133,1088],{"class":512},[475,1135,1091],{"class":557},[475,1137,561],{"class":512},[475,1139,1140],{"class":485},"17",[475,1142,404],{"class":512},[475,1144,1101],{"class":557},[475,1146,561],{"class":512},[475,1148,1149],{"class":492},"\"email\"",[475,1151,404],{"class":512},[475,1153,1111],{"class":557},[475,1155,561],{"class":512},[475,1157,1158],{"class":492},"\"email_taken_by_your_student\"",[475,1160,404],{"class":512},[475,1162,1121],{"class":557},[475,1164,561],{"class":512},[475,1166,1167],{"class":492},"\"One of your students already has this email address.\"",[475,1169,404],{"class":512},[475,1171,1172],{"class":557},"\"studentId\"",[475,1174,561],{"class":512},[475,1176,1177],{"class":492},"\"652f1c9b8e4b2a0012a3c4d5\"",[475,1179,1129],{"class":512},[475,1181,1182,1184,1186,1188,1191,1193,1195,1197,1199,1201,1203,1205,1208,1210,1212,1214,1217,1219,1222,1224,1227],{"class":477,"line":693},[475,1183,1088],{"class":512},[475,1185,1091],{"class":557},[475,1187,561],{"class":512},[475,1189,1190],{"class":485},"31",[475,1192,404],{"class":512},[475,1194,1101],{"class":557},[475,1196,561],{"class":512},[475,1198,1149],{"class":492},[475,1200,404],{"class":512},[475,1202,1111],{"class":557},[475,1204,561],{"class":512},[475,1206,1207],{"class":492},"\"duplicate_in_request\"",[475,1209,404],{"class":512},[475,1211,1121],{"class":557},[475,1213,561],{"class":512},[475,1215,1216],{"class":492},"\"Row 12 has the same email address.\"",[475,1218,404],{"class":512},[475,1220,1221],{"class":557},"\"duplicateOf\"",[475,1223,561],{"class":512},[475,1225,1226],{"class":485},"12",[475,1228,1229],{"class":512}," }\n",[475,1231,1233],{"class":477,"line":1232},15,[475,1234,1235],{"class":512},"      ]\n",[475,1237,1239],{"class":477,"line":1238},16,[475,1240,1241],{"class":512},"    }\n",[475,1243,1245],{"class":477,"line":1244},17,[475,1246,690],{"class":512},[475,1248,1250],{"class":477,"line":1249},18,[475,1251,696],{"class":512},[362,1253,1254,1257,1258,1260,1261,1263,1264,1267],{},[365,1255,1256],{},"row"," counts from 0, so it is the index in the ",[365,1259,167],{}," array you sent. Branch on ",[365,1262,365],{},", never\non ",[365,1265,1266],{},"message",":",[1269,1270,1271,1285],"table",{},[1272,1273,1274],"thead",{},[1275,1276,1277,1282],"tr",{},[1278,1279,1280],"th",{},[365,1281,365],{},[1278,1283,1284],{},"What to do",[1286,1287,1288,1306,1319,1338,1352,1370],"tbody",{},[1275,1289,1290,1296],{},[1291,1292,1293],"td",{},[365,1294,1295],{},"invalid_field",[1291,1297,1298,1299,1301,1302,1305],{},"The row breaks one of ",[365,1300,374],{},"'s rules. ",[365,1303,1304],{},"field"," says which property.",[1275,1307,1308,1313],{},[1291,1309,1310],{},[365,1311,1312],{},"unexpected_field",[1291,1314,1315,1316,1318],{},"The row carries a property this operation does not accept, ",[365,1317,745],{}," among them.",[1275,1320,1321,1326],{},[1291,1322,1323],{},[365,1324,1325],{},"unknown_reference",[1291,1327,1328,1329,404,1331,404,1333,449,1335,1337],{},"The ",[365,1330,399],{},[365,1332,403],{},[365,1334,407],{},[365,1336,411],{}," matches nothing. Nothing is ever created for you; fix the name or send an id.",[1275,1339,1340,1345],{},[1291,1341,1342],{},[365,1343,1344],{},"duplicate_in_request",[1291,1346,1347,1348,1351],{},"Two rows in your own body have the same address. ",[365,1349,1350],{},"duplicateOf"," is the earlier one.",[1275,1353,1354,1359],{},[1291,1355,1356],{},[365,1357,1358],{},"email_taken_by_your_student",[1291,1360,1361,1362,1365,1366,1369],{},"One of your students already has the address. ",[365,1363,1364],{},"studentId"," is theirs — update them with ",[365,1367,1368],{},"updateStudent"," instead of registering a second record.",[1275,1371,1372,1377],{},[1291,1373,1374],{},[365,1375,1376],{},"email_unavailable",[1291,1378,1379],{},"The address cannot be registered. The answer never says who holds it.",[362,1381,1382,720,1385,1387,1388,1391,1392,1395,1396,1398,1399,1401],{},[365,1383,1384],{},"truncated",[365,1386,564],{}," when ",[365,1389,1390],{},"rows"," is shorter than ",[365,1393,1394],{},"rejected",": fix what is listed and send the batch\nagain to see the rest. ",[365,1397,1390],{}," can also be empty with ",[365,1400,1394],{}," counted, when the only problem is\nunavailable addresses and your account has already been shown those rows several times that day.\nSending rosters of addresses you have not collected yourself is not a supported use of this API.",[362,1403,1404,1409,1410,1413,1414,1416],{},[705,1405,1406,1407,453],{},"A field mistake is answered earlier, with ",[365,1408,911],{}," A row that breaks a property's own rule — a\nbirth date that is not a date, a missing surname — is refused before the batch is checked at all,\nand the message names the row and the property, such as\n",[365,1411,1412],{},"students.4.birth must be a real date in DD\u002FMM\u002FYYYY format",". The ",[365,1415,418],{}," is for everything that takes\na lookup to see.",[386,1418,1420],{"id":1419},"following-an-import","Following an import",[362,1422,1423,1425,1426,408,1429,1432,1433,453],{},[365,1424,440],{}," returns the import and one page of its rows, in the order you sent them. Page it\nwith ",[365,1427,1428],{},"page",[365,1430,1431],{},"limit",", as every list operation is paged; see ",[370,1434,39],{"href":40},[466,1436,1438],{"className":543,"code":1437,"language":545,"meta":471,"style":471},"{\n  \"success\": true,\n  \"message\": \"Import fetched successfully.\",\n  \"data\": {\n    \"_id\": \"65f0c2a1d3e4f5a6b7c8d901\",\n    \"status\": \"succeeded\",\n    \"total\": 250,\n    \"registered\": 250,\n    \"students\": [\n      { \"row\": 0, \"email\": \"jane.doe@example.com\", \"externalRef\": \"roster-2026-114\", \"status\": \"registered\", \"studentId\": \"652f1c9b8e4b2a0012a3c4d5\" }\n    ],\n    \"createdAt\": \"2026-10-06T08:15:00.000Z\",\n    \"startedAt\": \"2026-10-06T08:15:04.000Z\",\n    \"finishedAt\": \"2026-10-06T08:15:09.000Z\",\n    \"expiresAt\": \"2026-11-05T08:15:09.000Z\"\n  },\n  \"pagination\": { \"page\": 1, \"limit\": 20, \"total\": 250, \"totalPages\": 13 }\n}\n",[365,1439,1440,1444,1454,1465,1471,1481,1492,1502,1512,1518,1567,1572,1582,1594,1606,1615,1620,1667],{"__ignoreMap":471},[475,1441,1442],{"class":477,"line":478},[475,1443,552],{"class":512},[475,1445,1446,1448,1450,1452],{"class":477,"line":503},[475,1447,558],{"class":557},[475,1449,561],{"class":512},[475,1451,564],{"class":485},[475,1453,400],{"class":512},[475,1455,1456,1458,1460,1463],{"class":477,"line":521},[475,1457,571],{"class":557},[475,1459,561],{"class":512},[475,1461,1462],{"class":492},"\"Import fetched successfully.\"",[475,1464,400],{"class":512},[475,1466,1467,1469],{"class":477,"line":531},[475,1468,583],{"class":557},[475,1470,586],{"class":512},[475,1472,1473,1475,1477,1479],{"class":477,"line":589},[475,1474,592],{"class":557},[475,1476,561],{"class":512},[475,1478,597],{"class":492},[475,1480,400],{"class":512},[475,1482,1483,1485,1487,1490],{"class":477,"line":602},[475,1484,605],{"class":557},[475,1486,561],{"class":512},[475,1488,1489],{"class":492},"\"succeeded\"",[475,1491,400],{"class":512},[475,1493,1494,1496,1498,1500],{"class":477,"line":615},[475,1495,618],{"class":557},[475,1497,561],{"class":512},[475,1499,623],{"class":485},[475,1501,400],{"class":512},[475,1503,1504,1506,1508,1510],{"class":477,"line":628},[475,1505,631],{"class":557},[475,1507,561],{"class":512},[475,1509,623],{"class":485},[475,1511,400],{"class":512},[475,1513,1514,1516],{"class":477,"line":641},[475,1515,657],{"class":557},[475,1517,1083],{"class":512},[475,1519,1520,1523,1525,1527,1529,1531,1533,1535,1537,1539,1542,1544,1547,1549,1552,1554,1557,1559,1561,1563,1565],{"class":477,"line":654},[475,1521,1522],{"class":512},"      { ",[475,1524,1091],{"class":557},[475,1526,561],{"class":512},[475,1528,636],{"class":485},[475,1530,404],{"class":512},[475,1532,1149],{"class":557},[475,1534,561],{"class":512},[475,1536,817],{"class":492},[475,1538,404],{"class":512},[475,1540,1541],{"class":557},"\"externalRef\"",[475,1543,561],{"class":512},[475,1545,1546],{"class":492},"\"roster-2026-114\"",[475,1548,404],{"class":512},[475,1550,1551],{"class":557},"\"status\"",[475,1553,561],{"class":512},[475,1555,1556],{"class":492},"\"registered\"",[475,1558,404],{"class":512},[475,1560,1172],{"class":557},[475,1562,561],{"class":512},[475,1564,1177],{"class":492},[475,1566,1229],{"class":512},[475,1568,1569],{"class":477,"line":663},[475,1570,1571],{"class":512},"    ],\n",[475,1573,1574,1576,1578,1580],{"class":477,"line":676},[475,1575,666],{"class":557},[475,1577,561],{"class":512},[475,1579,671],{"class":492},[475,1581,400],{"class":512},[475,1583,1584,1587,1589,1592],{"class":477,"line":687},[475,1585,1586],{"class":557},"    \"startedAt\"",[475,1588,561],{"class":512},[475,1590,1591],{"class":492},"\"2026-10-06T08:15:04.000Z\"",[475,1593,400],{"class":512},[475,1595,1596,1599,1601,1604],{"class":477,"line":693},[475,1597,1598],{"class":557},"    \"finishedAt\"",[475,1600,561],{"class":512},[475,1602,1603],{"class":492},"\"2026-10-06T08:15:09.000Z\"",[475,1605,400],{"class":512},[475,1607,1608,1610,1612],{"class":477,"line":1232},[475,1609,679],{"class":557},[475,1611,561],{"class":512},[475,1613,1614],{"class":492},"\"2026-11-05T08:15:09.000Z\"\n",[475,1616,1617],{"class":477,"line":1238},[475,1618,1619],{"class":512},"  },\n",[475,1621,1622,1625,1628,1631,1633,1636,1638,1641,1643,1646,1648,1651,1653,1655,1657,1660,1662,1665],{"class":477,"line":1244},[475,1623,1624],{"class":557},"  \"pagination\"",[475,1626,1627],{"class":512},": { ",[475,1629,1630],{"class":557},"\"page\"",[475,1632,561],{"class":512},[475,1634,1635],{"class":485},"1",[475,1637,404],{"class":512},[475,1639,1640],{"class":557},"\"limit\"",[475,1642,561],{"class":512},[475,1644,1645],{"class":485},"20",[475,1647,404],{"class":512},[475,1649,1650],{"class":557},"\"total\"",[475,1652,561],{"class":512},[475,1654,623],{"class":485},[475,1656,404],{"class":512},[475,1658,1659],{"class":557},"\"totalPages\"",[475,1661,561],{"class":512},[475,1663,1664],{"class":485},"13",[475,1666,1229],{"class":512},[475,1668,1669],{"class":477,"line":1249},[475,1670,696],{"class":512},[362,1672,1673,1675],{},[365,1674,444],{}," is one of:",[1269,1677,1678,1689],{},[1272,1679,1680],{},[1275,1681,1682,1686],{},[1278,1683,1684],{},[365,1685,444],{},[1278,1687,1688],{},"Meaning",[1286,1690,1691,1700,1709,1720,1735],{},[1275,1692,1693,1697],{},[1291,1694,1695],{},[365,1696,448],{},[1291,1698,1699],{},"Accepted, not started.",[1275,1701,1702,1706],{},[1291,1703,1704],{},[365,1705,452],{},[1291,1707,1708],{},"Being registered now.",[1275,1710,1711,1715],{},[1291,1712,1713],{},[365,1714,459],{},[1291,1716,1717,1718,453],{},"Every row registered. Each carries its ",[365,1719,1364],{},[1275,1721,1722,1726],{},[1291,1723,1724],{},[365,1725,723],{},[1291,1727,1728,1729,1731,1732,453],{},"No row registered. ",[365,1730,731],{}," says why, and the rows that explain it carry an ",[365,1733,1734],{},"error",[1275,1736,1737,1742],{},[1291,1738,1739],{},[365,1740,1741],{},"cancelled",[1291,1743,1744],{},"Stopped by an operator. No row registered.",[362,1746,1747,1748,1751],{},"An import stops being readable 30 days after it finishes, and then answers ",[365,1749,1750],{},"404"," exactly like one\nthat never existed. The students stay registered — keep the ids.",[386,1753,1755],{"id":1754},"limits","Limits",[1269,1757,1758,1768],{},[1272,1759,1760],{},[1275,1761,1762,1765],{},[1278,1763,1764],{},"Limit",[1278,1766,1767],{},"Value",[1286,1769,1770,1778,1786,1794],{},[1275,1771,1772,1775],{},[1291,1773,1774],{},"Rows per request",[1291,1776,1777],{},"30 to 1000",[1275,1779,1780,1783],{},[1291,1781,1782],{},"Body size",[1291,1784,1785],{},"1.5 MB on this operation; 100 kB on every other",[1275,1787,1788,1791],{},[1291,1789,1790],{},"Requests",[1291,1792,1793],{},"10 per hour per account",[1275,1795,1796,1799],{},[1291,1797,1798],{},"Imports running",[1291,1800,1801],{},"one per account at a time",[362,1803,1804,1805,1808,1809,453],{},"A second import while one is unfinished is refused with ",[365,1806,1807],{},"409",", and the message carries the id of\nthe one that is running. Read it, and send the next batch when it has finished. See\n",[370,1810,45],{"href":46},[386,1812,1814],{"id":1813},"sending-the-same-batch-twice-is-safe","Sending the same batch twice is safe",[362,1816,1817,1818,1820,1821,1824],{},"The same rows from your account inside 24 hours answer with the import you already have, not a\nsecond one. The ",[365,1819,1266],{}," says so, and ",[365,1822,1823],{},"data._id"," is the id you already had.",[362,1826,1827,1828,453],{},"So a request whose answer you never saw — a timeout, a dropped connection — can simply be sent\nagain. See ",[370,1829,1830],{"href":49},"Retries and idempotency",[362,1832,1833,1834,1837],{},"\"The same rows\" means exactly that: the rows, with addresses compared without regard to case or\nsurrounding spaces, and ",[365,1835,1836],{},"clientReference"," ignored. Change one row and it is a new batch.",[386,1839,1841],{"id":1840},"a-worked-run","A worked run",[466,1843,1847],{"className":1844,"code":1845,"language":1846,"meta":471,"style":471},"language-js shiki shiki-themes github-light-high-contrast github-dark-high-contrast","const submit = await fetch('https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Fstudent\u002Fimport', {\n  method: 'POST',\n  headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application\u002Fjson' },\n  body: JSON.stringify({ clientReference: 'year-10-autumn', students: rows }),\n});\n\nif (submit.status === 422) {\n  const { error } = await submit.json();\n  for (const row of error.details.rows) {\n    console.log(`row ${row.row}: ${row.code} (${row.field}) — ${row.message}`);\n  }\n  throw new Error('fix the rows and send it again');\n}\n\nconst { data: queued } = await submit.json();\n\nlet job = queued;\nwhile (job.status === 'queued' || job.status === 'running') {\n  await new Promise((wake) => setTimeout(wake, 3000));\n  const poll = await fetch(\n    `https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Fstudent\u002Fimport\u002F${queued._id}?limit=100`,\n    { headers: { Authorization: `Bearer ${token}` } },\n  );\n  ({ data: job } = await poll.json());\n}\n\nif (job.status !== 'succeeded') throw new Error(job.failure.message);\n","js",[365,1848,1849,1876,1886,1912,1934,1939,1945,1962,1988,2007,2058,2062,2080,2084,2088,2113,2117,2130,2156,2191,2208,2225,2240,2246,2264,2269,2274],{"__ignoreMap":471},[475,1850,1851,1854,1857,1860,1863,1867,1870,1873],{"class":477,"line":478},[475,1852,1853],{"class":499},"const",[475,1855,1856],{"class":485}," submit",[475,1858,1859],{"class":499}," =",[475,1861,1862],{"class":499}," await",[475,1864,1866],{"class":1865},"sKwhi"," fetch",[475,1868,1869],{"class":512},"(",[475,1871,1872],{"class":492},"'https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Fstudent\u002Fimport'",[475,1874,1875],{"class":512},", {\n",[475,1877,1878,1881,1884],{"class":477,"line":503},[475,1879,1880],{"class":512},"  method: ",[475,1882,1883],{"class":492},"'POST'",[475,1885,400],{"class":512},[475,1887,1888,1891,1894,1897,1900,1902,1905,1907,1910],{"class":477,"line":521},[475,1889,1890],{"class":512},"  headers: { Authorization: ",[475,1892,1893],{"class":492},"`Bearer ${",[475,1895,1896],{"class":512},"token",[475,1898,1899],{"class":492},"}`",[475,1901,404],{"class":512},[475,1903,1904],{"class":492},"'Content-Type'",[475,1906,561],{"class":512},[475,1908,1909],{"class":492},"'application\u002Fjson'",[475,1911,1129],{"class":512},[475,1913,1914,1917,1920,1922,1925,1928,1931],{"class":477,"line":531},[475,1915,1916],{"class":512},"  body: ",[475,1918,1919],{"class":485},"JSON",[475,1921,453],{"class":512},[475,1923,1924],{"class":1865},"stringify",[475,1926,1927],{"class":512},"({ clientReference: ",[475,1929,1930],{"class":492},"'year-10-autumn'",[475,1932,1933],{"class":512},", students: rows }),\n",[475,1935,1936],{"class":477,"line":589},[475,1937,1938],{"class":512},"});\n",[475,1940,1941],{"class":477,"line":602},[475,1942,1944],{"emptyLinePlaceholder":1943},true,"\n",[475,1946,1947,1950,1953,1956,1959],{"class":477,"line":615},[475,1948,1949],{"class":499},"if",[475,1951,1952],{"class":512}," (submit.status ",[475,1954,1955],{"class":499},"===",[475,1957,1958],{"class":485}," 422",[475,1960,1961],{"class":512},") {\n",[475,1963,1964,1967,1970,1972,1975,1978,1980,1983,1985],{"class":477,"line":628},[475,1965,1966],{"class":499},"  const",[475,1968,1969],{"class":512}," { ",[475,1971,1734],{"class":485},[475,1973,1974],{"class":512}," } ",[475,1976,1977],{"class":499},"=",[475,1979,1862],{"class":499},[475,1981,1982],{"class":512}," submit.",[475,1984,545],{"class":1865},[475,1986,1987],{"class":512},"();\n",[475,1989,1990,1993,1996,1998,2001,2004],{"class":477,"line":641},[475,1991,1992],{"class":499},"  for",[475,1994,1995],{"class":512}," (",[475,1997,1853],{"class":499},[475,1999,2000],{"class":485}," row",[475,2002,2003],{"class":499}," of",[475,2005,2006],{"class":512}," error.details.rows) {\n",[475,2008,2009,2012,2015,2017,2020,2022,2024,2026,2029,2031,2033,2035,2038,2040,2042,2044,2047,2049,2051,2053,2055],{"class":477,"line":654},[475,2010,2011],{"class":512},"    console.",[475,2013,2014],{"class":1865},"log",[475,2016,1869],{"class":512},[475,2018,2019],{"class":492},"`row ${",[475,2021,1256],{"class":512},[475,2023,453],{"class":492},[475,2025,1256],{"class":512},[475,2027,2028],{"class":492},"}: ${",[475,2030,1256],{"class":512},[475,2032,453],{"class":492},[475,2034,365],{"class":512},[475,2036,2037],{"class":492},"} (${",[475,2039,1256],{"class":512},[475,2041,453],{"class":492},[475,2043,1304],{"class":512},[475,2045,2046],{"class":492},"}) — ${",[475,2048,1256],{"class":512},[475,2050,453],{"class":492},[475,2052,1266],{"class":512},[475,2054,1899],{"class":492},[475,2056,2057],{"class":512},");\n",[475,2059,2060],{"class":477,"line":663},[475,2061,690],{"class":512},[475,2063,2064,2067,2070,2073,2075,2078],{"class":477,"line":676},[475,2065,2066],{"class":499},"  throw",[475,2068,2069],{"class":499}," new",[475,2071,2072],{"class":1865}," Error",[475,2074,1869],{"class":512},[475,2076,2077],{"class":492},"'fix the rows and send it again'",[475,2079,2057],{"class":512},[475,2081,2082],{"class":477,"line":687},[475,2083,696],{"class":512},[475,2085,2086],{"class":477,"line":693},[475,2087,1944],{"emptyLinePlaceholder":1943},[475,2089,2090,2092,2094,2097,2099,2101,2103,2105,2107,2109,2111],{"class":477,"line":1232},[475,2091,1853],{"class":499},[475,2093,1969],{"class":512},[475,2095,2096],{"class":481},"data",[475,2098,561],{"class":512},[475,2100,448],{"class":485},[475,2102,1974],{"class":512},[475,2104,1977],{"class":499},[475,2106,1862],{"class":499},[475,2108,1982],{"class":512},[475,2110,545],{"class":1865},[475,2112,1987],{"class":512},[475,2114,2115],{"class":477,"line":1238},[475,2116,1944],{"emptyLinePlaceholder":1943},[475,2118,2119,2122,2125,2127],{"class":477,"line":1244},[475,2120,2121],{"class":499},"let",[475,2123,2124],{"class":512}," job ",[475,2126,1977],{"class":499},[475,2128,2129],{"class":512}," queued;\n",[475,2131,2132,2135,2138,2140,2143,2146,2149,2151,2154],{"class":477,"line":1249},[475,2133,2134],{"class":499},"while",[475,2136,2137],{"class":512}," (job.status ",[475,2139,1955],{"class":499},[475,2141,2142],{"class":492}," 'queued'",[475,2144,2145],{"class":499}," ||",[475,2147,2148],{"class":512}," job.status ",[475,2150,1955],{"class":499},[475,2152,2153],{"class":492}," 'running'",[475,2155,1961],{"class":512},[475,2157,2159,2162,2164,2167,2170,2173,2176,2179,2182,2185,2188],{"class":477,"line":2158},19,[475,2160,2161],{"class":499},"  await",[475,2163,2069],{"class":499},[475,2165,2166],{"class":485}," Promise",[475,2168,2169],{"class":512},"((",[475,2171,2172],{"class":481},"wake",[475,2174,2175],{"class":512},") ",[475,2177,2178],{"class":499},"=>",[475,2180,2181],{"class":1865}," setTimeout",[475,2183,2184],{"class":512},"(wake, ",[475,2186,2187],{"class":485},"3000",[475,2189,2190],{"class":512},"));\n",[475,2192,2194,2196,2199,2201,2203,2205],{"class":477,"line":2193},20,[475,2195,1966],{"class":499},[475,2197,2198],{"class":485}," poll",[475,2200,1859],{"class":499},[475,2202,1862],{"class":499},[475,2204,1866],{"class":1865},[475,2206,2207],{"class":512},"(\n",[475,2209,2211,2214,2216,2218,2220,2223],{"class":477,"line":2210},21,[475,2212,2213],{"class":492},"    `https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Fstudent\u002Fimport\u002F${",[475,2215,448],{"class":512},[475,2217,453],{"class":492},[475,2219,463],{"class":512},[475,2221,2222],{"class":492},"}?limit=100`",[475,2224,400],{"class":512},[475,2226,2228,2231,2233,2235,2237],{"class":477,"line":2227},22,[475,2229,2230],{"class":512},"    { headers: { Authorization: ",[475,2232,1893],{"class":492},[475,2234,1896],{"class":512},[475,2236,1899],{"class":492},[475,2238,2239],{"class":512}," } },\n",[475,2241,2243],{"class":477,"line":2242},23,[475,2244,2245],{"class":512},"  );\n",[475,2247,2249,2252,2254,2256,2259,2261],{"class":477,"line":2248},24,[475,2250,2251],{"class":512},"  ({ data: job } ",[475,2253,1977],{"class":499},[475,2255,1862],{"class":499},[475,2257,2258],{"class":512}," poll.",[475,2260,545],{"class":1865},[475,2262,2263],{"class":512},"());\n",[475,2265,2267],{"class":477,"line":2266},25,[475,2268,696],{"class":512},[475,2270,2272],{"class":477,"line":2271},26,[475,2273,1944],{"emptyLinePlaceholder":1943},[475,2275,2277,2279,2281,2284,2287,2289,2292,2294,2296],{"class":477,"line":2276},27,[475,2278,1949],{"class":499},[475,2280,2137],{"class":512},[475,2282,2283],{"class":499},"!==",[475,2285,2286],{"class":492}," 'succeeded'",[475,2288,2175],{"class":512},[475,2290,2291],{"class":499},"throw",[475,2293,2069],{"class":499},[475,2295,2072],{"class":1865},[475,2297,2298],{"class":512},"(job.failure.message);\n",[362,2300,2301,2302,453],{},"Page through the rows afterwards for the ids, then send each student a sign-in link or apply them to\nan exam. See ",[370,2303,86],{"href":87},[2305,2306,2307],"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}",{"title":471,"searchDepth":503,"depth":521,"links":2309},[2310,2311,2312,2313,2314,2315,2316,2317,2318,2319],{"id":388,"depth":503,"text":389},{"id":699,"depth":503,"text":700},{"id":735,"depth":503,"text":736},{"id":901,"depth":503,"text":902},{"id":944,"depth":503,"text":945},{"id":963,"depth":503,"text":964},{"id":1419,"depth":503,"text":1420},{"id":1754,"depth":503,"text":1755},{"id":1813,"depth":503,"text":1814},{"id":1840,"depth":503,"text":1841},"Send a class of students in one request, follow the import while it runs, and fix the rows it refuses. All of them are registered, or none.","md",{},[367,440,374,959,2324,927,937],"getStudent","15",{"title":353,"description":2320},"api\u002Fguides\u002Fbulk-registration","LnBulsI7JTAR_NpWJax5LwAzKqk2S0eXJpgLOYFcJj4",[2330,2335,2338,2341,2344,2348,2353],{"operationId":367,"slug":2331,"method":141,"path":2332,"tag":62,"summary":179,"deprecated":134,"public":134,"permission":2333,"scope":2334,"order":687},"create-student-import","\u002Fv1\u002Fstudent\u002Fimport","student\u002Fcreate:$org:$ID","flat",{"operationId":440,"slug":2336,"method":133,"path":2337,"tag":62,"summary":182,"deprecated":134,"public":134,"permission":2333,"scope":2334,"order":693},"get-student-import","\u002Fv1\u002Fstudent\u002Fimport\u002F{importId}",{"operationId":374,"slug":2339,"method":141,"path":2340,"tag":62,"summary":173,"deprecated":134,"public":134,"permission":2333,"scope":2334,"order":663},"register-student","\u002Fv1\u002Fstudent",{"operationId":959,"slug":2342,"method":141,"path":2343,"tag":62,"summary":176,"deprecated":134,"public":134,"permission":2333,"scope":2334,"order":676},"check-student-registration","\u002Fv1\u002Fstudent\u002Fcheck",{"operationId":2324,"slug":2345,"method":133,"path":2346,"tag":62,"summary":185,"deprecated":134,"public":134,"permission":2347,"scope":2334,"order":1232},"get-student","\u002Fv1\u002Fstudent\u002F{studentId}","student\u002Fread:$org:$ID",{"operationId":927,"slug":2349,"method":141,"path":2350,"tag":80,"summary":210,"deprecated":134,"public":134,"permission":2351,"scope":2352,"order":2227},"create-signin-link","\u002Fv1\u002F{organizationId}\u002Fauth\u002Fsignin","auth\u002Fsignin:$org:$ID","organization",{"operationId":937,"slug":2354,"method":190,"path":2355,"tag":62,"summary":192,"deprecated":134,"public":134,"permission":2351,"scope":2334,"order":1244},"set-student-password","\u002Fv1\u002Fstudent\u002F{studentId}\u002Fpassword",1791554615057]