[{"data":1,"prerenderedAt":2950},["ShallowReactive",2],{"api-nav":3,"api-guide:\u002Fapi\u002Fguides\u002Fcertificates-and-reports":351,"api-spec:guide:\u002Fapi\u002Fguides\u002Fcertificates-and-reports":2934},[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":92,"body":353,"description":2922,"extension":2923,"meta":2924,"navTitle":92,"navigation":1524,"operations":2925,"order":2930,"path":93,"section":58,"seo":2931,"status":14,"stem":2932,"__hash__":2933},"apiGuides\u002Fapi\u002Fguides\u002Fcertificates-and-reports.md",{"type":354,"value":355,"toc":2909},"minimark",[356,369,374,381,417,420,423,427,525,532,536,546,592,802,828,1001,1014,1084,1094,1099,1152,1156,1168,1210,1217,1282,1341,1355,1359,1427,1436,1440,2049,2772,2778,2782,2785,2814,2817,2840,2848,2854,2858,2905],[357,358,359,360,364,365,368],"p",{},"When results come out, an organization publishes ",[361,362,363],"strong",{},"certificates"," and ",[361,366,367],{},"result reports"," for the students who sat its exams. This API lets you list them for each of your students and download the PDF files. It never creates, changes or withdraws them.",[370,371,373],"h2",{"id":372},"only-released-documents","Only released documents",[357,375,376,377,380],{},"An organization prepares certificates and reports before results are announced. It then ",[361,378,379],{},"releases"," them. Until then, they are embargoed.",[382,383,384,397],"table",{},[385,386,387],"thead",{},[388,389,390,394],"tr",{},[391,392,393],"th",{},"Document",[391,395,396],{},"Visible through the API when",[398,399,400,409],"tbody",{},[388,401,402,406],{},[403,404,405],"td",{},"Certificate",[403,407,408],{},"the organization has released it",[388,410,411,414],{},[403,412,413],{},"Report",[403,415,416],{},"the organization has released it and has not canceled it",[357,418,419],{},"A document that isn't released is never listed. Asked for by id, it answers exactly like a document that doesn't exist. So an empty list shortly after a sitting usually means \"not released yet\", not \"missing\". Check again after the organization announces results.",[357,421,422],{},"A report that is withdrawn after release (canceled) disappears from the list and can no longer be downloaded. If you mirror files, remove your copy when a report stops appearing.",[370,424,426],{"id":425},"operations","Operations",[382,428,429,445],{},[385,430,431],{},[388,432,433,436,439,442],{},[391,434,435],{},"Operation",[391,437,438],{},"Request",[391,440,441],{},"Permission",[391,443,444],{},"Returns",[398,446,447,469,488,507],{},[388,448,449,455,461,466],{},[403,450,451],{},[452,453,454],"a",{"href":264},"List a student's certificates",[403,456,457],{},[458,459,460],"code",{},"GET \u002Fv1\u002F\u003CorganizationId>\u002Fcertificate\u002F\u003CstudentId>",[403,462,463],{},[458,464,465],{},"certificate\u002Fread",[403,467,468],{},"JSON, paginated",[388,470,471,476,481,485],{},[403,472,473],{},[452,474,475],{"href":261},"Download a certificate",[403,477,478],{},[458,479,480],{},"GET \u002Fv1\u002F\u003CorganizationId>\u002Fcertificate\u002Fdownload\u002F\u003CcertificateId>",[403,482,483],{},[458,484,465],{},[403,486,487],{},"the file",[388,489,490,495,500,505],{},[403,491,492],{},[452,493,494],{"href":270},"List a student's reports",[403,496,497],{},[458,498,499],{},"GET \u002Fv1\u002F\u003CorganizationId>\u002Freport\u002F\u003CstudentId>",[403,501,502],{},[458,503,504],{},"report\u002Fread",[403,506,468],{},[388,508,509,514,519,523],{},[403,510,511],{},[452,512,513],{"href":267},"Download a report",[403,515,516],{},[458,517,518],{},"GET \u002Fv1\u002F\u003CorganizationId>\u002Freport\u002Fdownload\u002F\u003CreportId>",[403,520,521],{},[458,522,504],{},[403,524,487],{},[357,526,527,528,531],{},"Every permission's target is the organization in the path, or ",[458,529,530],{},"*",".",[370,533,535],{"id":534},"list-a-students-documents","List a student's documents",[357,537,538,541,542,545],{},[458,539,540],{},"\u003CstudentId>"," is the student's core id, the ",[458,543,544],{},"_id"," that registration returned. The lists cover every season, not just the current one, because your records outlive a season.",[547,548,553],"pre",{"className":549,"code":550,"language":551,"meta":552,"style":552},"language-bash shiki shiki-themes github-light-high-contrast github-dark-high-contrast","curl -s \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fcertificate\u002F652f1c9b8e4b2a0012a3c4d5?limit=100\" \\\n  -H \"Authorization: Bearer $TOKEN\"\n","bash","",[458,554,555,576],{"__ignoreMap":552},[556,557,560,564,568,572],"span",{"class":558,"line":559},"line",1,[556,561,563],{"class":562},"soyes","curl",[556,565,567],{"class":566},"s-5SL"," -s",[556,569,571],{"class":570},"sT6z2"," \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fcertificate\u002F652f1c9b8e4b2a0012a3c4d5?limit=100\"",[556,573,575],{"class":574},"sHUrx"," \\\n",[556,577,579,582,585,589],{"class":558,"line":578},2,[556,580,581],{"class":566},"  -H",[556,583,584],{"class":570}," \"Authorization: Bearer ",[556,586,588],{"class":587},"suds8","$TOKEN",[556,590,591],{"class":570},"\"\n",[547,593,597],{"className":594,"code":595,"language":596,"meta":552,"style":552},"language-json shiki shiki-themes github-light-high-contrast github-dark-high-contrast","{\n  \"success\": true,\n  \"message\": \"Certificates fetched successfully.\",\n  \"data\": [\n    {\n      \"_id\": \"6712a0b1c2d3e4f5a6b7c8d9\",\n      \"application\": \"6703d4e5f6a7b8c9d0e1f203\",\n      \"title\": \"Gold Medal\",\n      \"shortId\": \"K2J8X0Q4TZ\",\n      \"active\": true,\n      \"createdAt\": \"2026-12-01T09:00:00.000Z\",\n      \"updatedAt\": \"2026-12-05T12:00:00.000Z\"\n    }\n  ],\n  \"pagination\": { \"page\": 1, \"limit\": 100, \"total\": 1, \"totalPages\": 1 }\n}\n","json",[458,598,599,604,619,632,641,647,660,673,686,699,711,724,735,741,747,796],{"__ignoreMap":552},[556,600,601],{"class":558,"line":559},[556,602,603],{"class":587},"{\n",[556,605,606,610,613,616],{"class":558,"line":578},[556,607,609],{"class":608},"sne4z","  \"success\"",[556,611,612],{"class":587},": ",[556,614,615],{"class":566},"true",[556,617,618],{"class":587},",\n",[556,620,622,625,627,630],{"class":558,"line":621},3,[556,623,624],{"class":608},"  \"message\"",[556,626,612],{"class":587},[556,628,629],{"class":570},"\"Certificates fetched successfully.\"",[556,631,618],{"class":587},[556,633,635,638],{"class":558,"line":634},4,[556,636,637],{"class":608},"  \"data\"",[556,639,640],{"class":587},": [\n",[556,642,644],{"class":558,"line":643},5,[556,645,646],{"class":587},"    {\n",[556,648,650,653,655,658],{"class":558,"line":649},6,[556,651,652],{"class":608},"      \"_id\"",[556,654,612],{"class":587},[556,656,657],{"class":570},"\"6712a0b1c2d3e4f5a6b7c8d9\"",[556,659,618],{"class":587},[556,661,663,666,668,671],{"class":558,"line":662},7,[556,664,665],{"class":608},"      \"application\"",[556,667,612],{"class":587},[556,669,670],{"class":570},"\"6703d4e5f6a7b8c9d0e1f203\"",[556,672,618],{"class":587},[556,674,676,679,681,684],{"class":558,"line":675},8,[556,677,678],{"class":608},"      \"title\"",[556,680,612],{"class":587},[556,682,683],{"class":570},"\"Gold Medal\"",[556,685,618],{"class":587},[556,687,689,692,694,697],{"class":558,"line":688},9,[556,690,691],{"class":608},"      \"shortId\"",[556,693,612],{"class":587},[556,695,696],{"class":570},"\"K2J8X0Q4TZ\"",[556,698,618],{"class":587},[556,700,702,705,707,709],{"class":558,"line":701},10,[556,703,704],{"class":608},"      \"active\"",[556,706,612],{"class":587},[556,708,615],{"class":566},[556,710,618],{"class":587},[556,712,714,717,719,722],{"class":558,"line":713},11,[556,715,716],{"class":608},"      \"createdAt\"",[556,718,612],{"class":587},[556,720,721],{"class":570},"\"2026-12-01T09:00:00.000Z\"",[556,723,618],{"class":587},[556,725,727,730,732],{"class":558,"line":726},12,[556,728,729],{"class":608},"      \"updatedAt\"",[556,731,612],{"class":587},[556,733,734],{"class":570},"\"2026-12-05T12:00:00.000Z\"\n",[556,736,738],{"class":558,"line":737},13,[556,739,740],{"class":587},"    }\n",[556,742,744],{"class":558,"line":743},14,[556,745,746],{"class":587},"  ],\n",[556,748,750,753,756,759,761,764,767,770,772,775,777,780,782,784,786,789,791,793],{"class":558,"line":749},15,[556,751,752],{"class":608},"  \"pagination\"",[556,754,755],{"class":587},": { ",[556,757,758],{"class":608},"\"page\"",[556,760,612],{"class":587},[556,762,763],{"class":566},"1",[556,765,766],{"class":587},", ",[556,768,769],{"class":608},"\"limit\"",[556,771,612],{"class":587},[556,773,774],{"class":566},"100",[556,776,766],{"class":587},[556,778,779],{"class":608},"\"total\"",[556,781,612],{"class":587},[556,783,763],{"class":566},[556,785,766],{"class":587},[556,787,788],{"class":608},"\"totalPages\"",[556,790,612],{"class":587},[556,792,763],{"class":566},[556,794,795],{"class":587}," }\n",[556,797,799],{"class":558,"line":798},16,[556,800,801],{"class":587},"}\n",[547,803,805],{"className":549,"code":804,"language":551,"meta":552,"style":552},"curl -s \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Freport\u002F652f1c9b8e4b2a0012a3c4d5\" \\\n  -H \"Authorization: Bearer $TOKEN\"\n",[458,806,807,818],{"__ignoreMap":552},[556,808,809,811,813,816],{"class":558,"line":559},[556,810,563],{"class":562},[556,812,567],{"class":566},[556,814,815],{"class":570}," \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Freport\u002F652f1c9b8e4b2a0012a3c4d5\"",[556,817,575],{"class":574},[556,819,820,822,824,826],{"class":558,"line":578},[556,821,581],{"class":566},[556,823,584],{"class":570},[556,825,588],{"class":587},[556,827,591],{"class":570},[547,829,831],{"className":594,"code":830,"language":596,"meta":552,"style":552},"{\n  \"success\": true,\n  \"message\": \"Reports fetched successfully.\",\n  \"data\": [\n    {\n      \"_id\": \"6712a0b1c2d3e4f5a6b7c8e0\",\n      \"application\": \"6703d4e5f6a7b8c9d0e1f203\",\n      \"relatedApplications\": [],\n      \"shortId\": \"Q8ZK2M4X7P\",\n      \"isActive\": true,\n      \"isCanceled\": false,\n      \"createdAt\": \"2026-12-01T09:00:00.000Z\",\n      \"updatedAt\": \"2026-12-05T12:00:00.000Z\"\n    }\n  ],\n  \"pagination\": { \"page\": 1, \"limit\": 20, \"total\": 1, \"totalPages\": 1 }\n}\n",[458,832,833,837,847,858,864,868,879,889,897,908,919,931,941,949,953,957,996],{"__ignoreMap":552},[556,834,835],{"class":558,"line":559},[556,836,603],{"class":587},[556,838,839,841,843,845],{"class":558,"line":578},[556,840,609],{"class":608},[556,842,612],{"class":587},[556,844,615],{"class":566},[556,846,618],{"class":587},[556,848,849,851,853,856],{"class":558,"line":621},[556,850,624],{"class":608},[556,852,612],{"class":587},[556,854,855],{"class":570},"\"Reports fetched successfully.\"",[556,857,618],{"class":587},[556,859,860,862],{"class":558,"line":634},[556,861,637],{"class":608},[556,863,640],{"class":587},[556,865,866],{"class":558,"line":643},[556,867,646],{"class":587},[556,869,870,872,874,877],{"class":558,"line":649},[556,871,652],{"class":608},[556,873,612],{"class":587},[556,875,876],{"class":570},"\"6712a0b1c2d3e4f5a6b7c8e0\"",[556,878,618],{"class":587},[556,880,881,883,885,887],{"class":558,"line":662},[556,882,665],{"class":608},[556,884,612],{"class":587},[556,886,670],{"class":570},[556,888,618],{"class":587},[556,890,891,894],{"class":558,"line":675},[556,892,893],{"class":608},"      \"relatedApplications\"",[556,895,896],{"class":587},": [],\n",[556,898,899,901,903,906],{"class":558,"line":688},[556,900,691],{"class":608},[556,902,612],{"class":587},[556,904,905],{"class":570},"\"Q8ZK2M4X7P\"",[556,907,618],{"class":587},[556,909,910,913,915,917],{"class":558,"line":701},[556,911,912],{"class":608},"      \"isActive\"",[556,914,612],{"class":587},[556,916,615],{"class":566},[556,918,618],{"class":587},[556,920,921,924,926,929],{"class":558,"line":713},[556,922,923],{"class":608},"      \"isCanceled\"",[556,925,612],{"class":587},[556,927,928],{"class":566},"false",[556,930,618],{"class":587},[556,932,933,935,937,939],{"class":558,"line":726},[556,934,716],{"class":608},[556,936,612],{"class":587},[556,938,721],{"class":570},[556,940,618],{"class":587},[556,942,943,945,947],{"class":558,"line":737},[556,944,729],{"class":608},[556,946,612],{"class":587},[556,948,734],{"class":570},[556,950,951],{"class":558,"line":743},[556,952,740],{"class":587},[556,954,955],{"class":558,"line":749},[556,956,746],{"class":587},[556,958,959,961,963,965,967,969,971,973,975,978,980,982,984,986,988,990,992,994],{"class":558,"line":798},[556,960,752],{"class":608},[556,962,755],{"class":587},[556,964,758],{"class":608},[556,966,612],{"class":587},[556,968,763],{"class":566},[556,970,766],{"class":587},[556,972,769],{"class":608},[556,974,612],{"class":587},[556,976,977],{"class":566},"20",[556,979,766],{"class":587},[556,981,779],{"class":608},[556,983,612],{"class":587},[556,985,763],{"class":566},[556,987,766],{"class":587},[556,989,788],{"class":608},[556,991,612],{"class":587},[556,993,763],{"class":566},[556,995,795],{"class":587},[556,997,999],{"class":558,"line":998},17,[556,1000,801],{"class":587},[357,1002,1003,1004,766,1007,766,1010,1013],{},"The examples are trimmed. Each document comes back with all its stored fields. A report also carries the result data it was generated from (",[458,1005,1006],{},"resultTable",[458,1008,1009],{},"reportDetail",[458,1011,1012],{},"extras","), and the shape of that data varies by organization and exam. The PDF is the authoritative copy.",[382,1015,1016,1026],{},[385,1017,1018],{},[388,1019,1020,1023],{},[391,1021,1022],{},"Field",[391,1024,1025],{},"Meaning",[398,1027,1028,1041,1056,1074],{},[388,1029,1030,1034],{},[403,1031,1032],{},[458,1033,544],{},[403,1035,1036,1037,1040],{},"The document's id. Use it, or ",[458,1038,1039],{},"shortId",", to download.",[388,1042,1043,1047],{},[403,1044,1045],{},[458,1046,1039],{},[403,1048,1049,1050,1052,1053,531],{},"A short 10-character id of upper-case letters and digits, accepted by the download in place of ",[458,1051,544],{},". Send it exactly as returned: the match is case-sensitive, so a lower-cased copy answers ",[458,1054,1055],{},"404",[388,1057,1058,1063],{},[403,1059,1060],{},[458,1061,1062],{},"application",[403,1064,1065,1066,1068,1069,1073],{},"The application the document is for: the same ",[458,1067,544],{}," the ",[452,1070,1072],{"href":1071},"\u002Fapi\u002Fguides\u002Fapplications#read-applications","application routes"," return. Use it to tell which exam a document belongs to.",[388,1075,1076,1081],{},[403,1077,1078],{},[458,1079,1080],{},"user",[403,1082,1083],{},"On some certificates only: the organization's id for the student. Certificates are listed whether they are attached to one of the student's applications or to the student directly.",[357,1085,1086,1087,364,1090,1093],{},"The lists are paginated with ",[458,1088,1089],{},"page",[458,1091,1092],{},"limit"," (default 20, at most 100) and have no documented order.",[1095,1096,1098],"h3",{"id":1097},"refusals","Refusals",[382,1100,1101,1111],{},[385,1102,1103],{},[388,1104,1105,1108],{},[391,1106,1107],{},"Situation",[391,1109,1110],{},"Answer",[398,1112,1113,1126,1140],{},[388,1114,1115,1118],{},[403,1116,1117],{},"The student isn't yours, or doesn't exist",[403,1119,1120,766,1123],{},[458,1121,1122],{},"404 not_found",[458,1124,1125],{},"Student not found!",[388,1127,1128,1131],{},[403,1129,1130],{},"The student has never signed in to this organization",[403,1132,1133,766,1136,1139],{},[458,1134,1135],{},"409 conflict",[458,1137,1138],{},"Student has never signed in to stem, so stem holds no record for them. …"," A student who never signed in there can't have sat its exams, so for a bulk job this means \"nothing to collect\".",[388,1141,1142,1147],{},[403,1143,1144,1146],{},[458,1145,540],{}," isn't 24 hexadecimal characters",[403,1148,1149],{},[458,1150,1151],{},"400 bad_request",[370,1153,1155],{"id":1154},"download-a-file","Download a file",[357,1157,1158,364,1160,1162,1163,1165,1166,531],{},[458,1159,480],{},[458,1161,518],{}," send the file itself, not JSON. Both accept either the document's ",[458,1164,544],{}," or its ",[458,1167,1039],{},[547,1169,1171],{"className":549,"code":1170,"language":551,"meta":552,"style":552},"curl -s -D headers.txt -o gold-medal.pdf \\\n  \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fcertificate\u002Fdownload\u002FK2J8X0Q4TZ\" \\\n  -H \"Authorization: Bearer $TOKEN\"\n",[458,1172,1173,1193,1200],{"__ignoreMap":552},[556,1174,1175,1177,1179,1182,1185,1188,1191],{"class":558,"line":559},[556,1176,563],{"class":562},[556,1178,567],{"class":566},[556,1180,1181],{"class":566}," -D",[556,1183,1184],{"class":570}," headers.txt",[556,1186,1187],{"class":566}," -o",[556,1189,1190],{"class":570}," gold-medal.pdf",[556,1192,575],{"class":574},[556,1194,1195,1198],{"class":558,"line":578},[556,1196,1197],{"class":570},"  \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fcertificate\u002Fdownload\u002FK2J8X0Q4TZ\"",[556,1199,575],{"class":574},[556,1201,1202,1204,1206,1208],{"class":558,"line":621},[556,1203,581],{"class":566},[556,1205,584],{"class":570},[556,1207,588],{"class":587},[556,1209,591],{"class":570},[357,1211,1212,1213,1216],{},"A successful download answers ",[458,1214,1215],{},"200"," with these headers:",[547,1218,1222],{"className":1219,"code":1220,"language":1221,"meta":552,"style":552},"language-http shiki shiki-themes github-light-high-contrast github-dark-high-contrast","HTTP\u002F1.1 200 OK\nContent-Type: application\u002Fpdf\nContent-Length: 482113\nContent-Disposition: attachment; filename=\"Ogrenci Sukru - Gold Medal.pdf\"; filename*=UTF-8''%C3%96%C4%9Frenci%20%C5%9E%C3%BCkr%C3%BC%20-%20Gold%20Medal.pdf\nX-Request-Id: 7c1d6f0a-2b9e-4c3d-8f1a-5e6b7c8d9e0f\n","http",[458,1223,1224,1241,1252,1262,1272],{"__ignoreMap":552},[556,1225,1226,1229,1232,1235,1238],{"class":558,"line":559},[556,1227,1228],{"class":574},"HTTP",[556,1230,1231],{"class":587},"\u002F",[556,1233,1234],{"class":566},"1.1",[556,1236,1237],{"class":566}," 200",[556,1239,1240],{"class":570}," OK\n",[556,1242,1243,1246,1249],{"class":558,"line":578},[556,1244,1245],{"class":608},"Content-Type",[556,1247,1248],{"class":574},":",[556,1250,1251],{"class":570}," application\u002Fpdf\n",[556,1253,1254,1257,1259],{"class":558,"line":621},[556,1255,1256],{"class":608},"Content-Length",[556,1258,1248],{"class":574},[556,1260,1261],{"class":570}," 482113\n",[556,1263,1264,1267,1269],{"class":558,"line":634},[556,1265,1266],{"class":608},"Content-Disposition",[556,1268,1248],{"class":574},[556,1270,1271],{"class":570}," attachment; filename=\"Ogrenci Sukru - Gold Medal.pdf\"; filename*=UTF-8''%C3%96%C4%9Frenci%20%C5%9E%C3%BCkr%C3%BC%20-%20Gold%20Medal.pdf\n",[556,1273,1274,1277,1279],{"class":558,"line":643},[556,1275,1276],{"class":608},"X-Request-Id",[556,1278,1248],{"class":574},[556,1280,1281],{"class":570}," 7c1d6f0a-2b9e-4c3d-8f1a-5e6b7c8d9e0f\n",[382,1283,1284,1294],{},[385,1285,1286],{},[388,1287,1288,1291],{},[391,1289,1290],{},"Header",[391,1292,1293],{},"What to do with it",[398,1295,1296,1313,1322],{},[388,1297,1298,1302],{},[403,1299,1300],{},[458,1301,1245],{},[403,1303,1304,1305,1308,1309,1312],{},"The type the file was stored with. Usually ",[458,1306,1307],{},"application\u002Fpdf",", but it can be ",[458,1310,1311],{},"application\u002Foctet-stream",". Don't reject a file because of it.",[388,1314,1315,1319],{},[403,1316,1317],{},[458,1318,1256],{},[403,1320,1321],{},"Present when the size is known. If you receive fewer bytes, the download failed.",[388,1323,1324,1328],{},[403,1325,1326],{},[458,1327,1266],{},[403,1329,1330,1331,1334,1335,1338,1339,531],{},"The file's real name, in two forms. ",[458,1332,1333],{},"filename*"," is the exact name, UTF-8 and percent-encoded (RFC 5987); prefer it. ",[458,1336,1337],{},"filename"," is an ASCII-only fallback with accents removed, for clients that don't read ",[458,1340,1333],{},[1342,1343,1345],"callout",{"type":1344},"warn",[357,1346,1347,1348,1351,1352,1354],{},"Errors always arrive ",[361,1349,1350],{},"before"," the file, as the usual JSON error envelope with the matching status. Once the file has started, nothing more can be reported: if storage fails halfway, the API closes the connection, and you are left with a truncated file and no error response. Treat any transfer that ends early, or with fewer bytes than ",[458,1353,1256],{},", as failed, and delete what you wrote.",[1095,1356,1358],{"id":1357},"one-answer-for-every-refusal","One answer for every refusal",[382,1360,1361,1369],{},[385,1362,1363],{},[388,1364,1365,1367],{},[391,1366,1107],{},[391,1368,1110],{},[398,1370,1371,1383,1394,1405,1416],{},[388,1372,1373,1376],{},[403,1374,1375],{},"No document has this id or short id",[403,1377,1378,766,1380],{},[458,1379,1122],{},[458,1381,1382],{},"Not found!",[388,1384,1385,1388],{},[403,1386,1387],{},"The document isn't released, or is canceled",[403,1389,1390,766,1392],{},[458,1391,1122],{},[458,1393,1382],{},[388,1395,1396,1399],{},[403,1397,1398],{},"It belongs to another account's student",[403,1400,1401,766,1403],{},[458,1402,1122],{},[458,1404,1382],{},[388,1406,1407,1410],{},[403,1408,1409],{},"It has no file, or its file is missing",[403,1411,1412,766,1414],{},[458,1413,1122],{},[458,1415,1382],{},[388,1417,1418,1421],{},[403,1419,1420],{},"File storage can't be reached",[403,1422,1423,1426],{},[458,1424,1425],{},"500 internal_error",". Retry later with backoff.",[357,1428,1429,1430,1432,1433,1435],{},"The four ",[458,1431,1055],{},"s are identical on purpose, so a download never reveals whether a document exists in someone else's hands. When a download you expected to work answers ",[458,1434,1055],{},", check that you're asking the organization the document belongs to, and that it still appears in the student's list.",[1095,1437,1439],{"id":1438},"code-download-to-a-file","Code: download to a file",[547,1441,1445],{"className":1442,"code":1443,"language":1444,"meta":552,"style":552},"language-js shiki shiki-themes github-light-high-contrast github-dark-high-contrast","import { createWriteStream } from 'node:fs';\nimport { rm } from 'node:fs\u002Fpromises';\nimport path from 'node:path';\nimport { Readable } from 'node:stream';\nimport { pipeline } from 'node:stream\u002Fpromises';\n\n\u002F\u002F kind is 'certificate' or 'report'; id is an _id or a shortId.\nasync function download(organizationId, kind, id, dir) {\n  const res = await fetch(\n    `https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F${organizationId}\u002F${kind}\u002Fdownload\u002F${encodeURIComponent(id)}`,\n    { headers: { Authorization: `Bearer ${await getToken()}` } },\n  );\n  if (!res.ok) {\n    const { error } = await res.json(); \u002F\u002F errors are always JSON\n    throw Object.assign(new Error(error.message), { status: res.status, code: error.code, requestId: error.request_id });\n  }\n\n  const name = path.basename(fileName(res.headers.get('content-disposition')) ?? `${id}.pdf`);\n  const target = path.join(dir, name);\n  try {\n    await pipeline(Readable.fromWeb(res.body), createWriteStream(target));\n  } catch (err) {\n    await rm(target, { force: true }); \u002F\u002F a cut-off transfer is a failed download\n    throw err;\n  }\n  return target;\n}\n\nfunction fileName(disposition) {\n  if (!disposition) return null;\n  const exact = \u002Ffilename\\*=UTF-8''([^;]+)\u002Fi.exec(disposition);\n  if (exact) return decodeURIComponent(exact[1]);\n  const ascii = \u002Ffilename=\"([^\"]*)\"\u002Fi.exec(disposition);\n  return ascii ? ascii[1] : null;\n}\n","js",[458,1446,1447,1464,1478,1492,1506,1520,1526,1532,1568,1588,1618,1640,1645,1659,1689,1711,1716,1720,1769,1787,1796,1820,1832,1851,1859,1864,1873,1878,1883,1899,1919,1965,1986,2019,2044],{"__ignoreMap":552},[556,1448,1449,1452,1455,1458,1461],{"class":558,"line":559},[556,1450,1451],{"class":574},"import",[556,1453,1454],{"class":587}," { createWriteStream } ",[556,1456,1457],{"class":574},"from",[556,1459,1460],{"class":570}," 'node:fs'",[556,1462,1463],{"class":587},";\n",[556,1465,1466,1468,1471,1473,1476],{"class":558,"line":578},[556,1467,1451],{"class":574},[556,1469,1470],{"class":587}," { rm } ",[556,1472,1457],{"class":574},[556,1474,1475],{"class":570}," 'node:fs\u002Fpromises'",[556,1477,1463],{"class":587},[556,1479,1480,1482,1485,1487,1490],{"class":558,"line":621},[556,1481,1451],{"class":574},[556,1483,1484],{"class":587}," path ",[556,1486,1457],{"class":574},[556,1488,1489],{"class":570}," 'node:path'",[556,1491,1463],{"class":587},[556,1493,1494,1496,1499,1501,1504],{"class":558,"line":634},[556,1495,1451],{"class":574},[556,1497,1498],{"class":587}," { Readable } ",[556,1500,1457],{"class":574},[556,1502,1503],{"class":570}," 'node:stream'",[556,1505,1463],{"class":587},[556,1507,1508,1510,1513,1515,1518],{"class":558,"line":643},[556,1509,1451],{"class":574},[556,1511,1512],{"class":587}," { pipeline } ",[556,1514,1457],{"class":574},[556,1516,1517],{"class":570}," 'node:stream\u002Fpromises'",[556,1519,1463],{"class":587},[556,1521,1522],{"class":558,"line":649},[556,1523,1525],{"emptyLinePlaceholder":1524},true,"\n",[556,1527,1528],{"class":558,"line":662},[556,1529,1531],{"class":1530},"sLBg1","\u002F\u002F kind is 'certificate' or 'report'; id is an _id or a shortId.\n",[556,1533,1534,1537,1540,1544,1547,1550,1552,1555,1557,1560,1562,1565],{"class":558,"line":675},[556,1535,1536],{"class":574},"async",[556,1538,1539],{"class":574}," function",[556,1541,1543],{"class":1542},"sKwhi"," download",[556,1545,1546],{"class":587},"(",[556,1548,1549],{"class":562},"organizationId",[556,1551,766],{"class":587},[556,1553,1554],{"class":562},"kind",[556,1556,766],{"class":587},[556,1558,1559],{"class":562},"id",[556,1561,766],{"class":587},[556,1563,1564],{"class":562},"dir",[556,1566,1567],{"class":587},") {\n",[556,1569,1570,1573,1576,1579,1582,1585],{"class":558,"line":688},[556,1571,1572],{"class":574},"  const",[556,1574,1575],{"class":566}," res",[556,1577,1578],{"class":574}," =",[556,1580,1581],{"class":574}," await",[556,1583,1584],{"class":1542}," fetch",[556,1586,1587],{"class":587},"(\n",[556,1589,1590,1593,1595,1598,1600,1603,1606,1608,1610,1613,1616],{"class":558,"line":701},[556,1591,1592],{"class":570},"    `https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F${",[556,1594,1549],{"class":587},[556,1596,1597],{"class":570},"}\u002F${",[556,1599,1554],{"class":587},[556,1601,1602],{"class":570},"}\u002Fdownload\u002F${",[556,1604,1605],{"class":1542},"encodeURIComponent",[556,1607,1546],{"class":570},[556,1609,1559],{"class":587},[556,1611,1612],{"class":570},")",[556,1614,1615],{"class":570},"}`",[556,1617,618],{"class":587},[556,1619,1620,1623,1626,1629,1632,1635,1637],{"class":558,"line":713},[556,1621,1622],{"class":587},"    { headers: { Authorization: ",[556,1624,1625],{"class":570},"`Bearer ${",[556,1627,1628],{"class":574},"await",[556,1630,1631],{"class":1542}," getToken",[556,1633,1634],{"class":570},"()",[556,1636,1615],{"class":570},[556,1638,1639],{"class":587}," } },\n",[556,1641,1642],{"class":558,"line":726},[556,1643,1644],{"class":587},"  );\n",[556,1646,1647,1650,1653,1656],{"class":558,"line":737},[556,1648,1649],{"class":574},"  if",[556,1651,1652],{"class":587}," (",[556,1654,1655],{"class":574},"!",[556,1657,1658],{"class":587},"res.ok) {\n",[556,1660,1661,1664,1667,1670,1673,1676,1678,1681,1683,1686],{"class":558,"line":743},[556,1662,1663],{"class":574},"    const",[556,1665,1666],{"class":587}," { ",[556,1668,1669],{"class":566},"error",[556,1671,1672],{"class":587}," } ",[556,1674,1675],{"class":574},"=",[556,1677,1581],{"class":574},[556,1679,1680],{"class":587}," res.",[556,1682,596],{"class":1542},[556,1684,1685],{"class":587},"(); ",[556,1687,1688],{"class":1530},"\u002F\u002F errors are always JSON\n",[556,1690,1691,1694,1697,1700,1702,1705,1708],{"class":558,"line":749},[556,1692,1693],{"class":574},"    throw",[556,1695,1696],{"class":587}," Object.",[556,1698,1699],{"class":1542},"assign",[556,1701,1546],{"class":587},[556,1703,1704],{"class":574},"new",[556,1706,1707],{"class":1542}," Error",[556,1709,1710],{"class":587},"(error.message), { status: res.status, code: error.code, requestId: error.request_id });\n",[556,1712,1713],{"class":558,"line":798},[556,1714,1715],{"class":587},"  }\n",[556,1717,1718],{"class":558,"line":998},[556,1719,1525],{"emptyLinePlaceholder":1524},[556,1721,1723,1725,1728,1730,1733,1736,1738,1741,1744,1747,1749,1752,1755,1758,1761,1763,1766],{"class":558,"line":1722},18,[556,1724,1572],{"class":574},[556,1726,1727],{"class":566}," name",[556,1729,1578],{"class":574},[556,1731,1732],{"class":587}," path.",[556,1734,1735],{"class":1542},"basename",[556,1737,1546],{"class":587},[556,1739,1740],{"class":1542},"fileName",[556,1742,1743],{"class":587},"(res.headers.",[556,1745,1746],{"class":1542},"get",[556,1748,1546],{"class":587},[556,1750,1751],{"class":570},"'content-disposition'",[556,1753,1754],{"class":587},")) ",[556,1756,1757],{"class":574},"??",[556,1759,1760],{"class":570}," `${",[556,1762,1559],{"class":587},[556,1764,1765],{"class":570},"}.pdf`",[556,1767,1768],{"class":587},");\n",[556,1770,1772,1774,1777,1779,1781,1784],{"class":558,"line":1771},19,[556,1773,1572],{"class":574},[556,1775,1776],{"class":566}," target",[556,1778,1578],{"class":574},[556,1780,1732],{"class":587},[556,1782,1783],{"class":1542},"join",[556,1785,1786],{"class":587},"(dir, name);\n",[556,1788,1790,1793],{"class":558,"line":1789},20,[556,1791,1792],{"class":574},"  try",[556,1794,1795],{"class":587}," {\n",[556,1797,1799,1802,1805,1808,1811,1814,1817],{"class":558,"line":1798},21,[556,1800,1801],{"class":574},"    await",[556,1803,1804],{"class":1542}," pipeline",[556,1806,1807],{"class":587},"(Readable.",[556,1809,1810],{"class":1542},"fromWeb",[556,1812,1813],{"class":587},"(res.body), ",[556,1815,1816],{"class":1542},"createWriteStream",[556,1818,1819],{"class":587},"(target));\n",[556,1821,1823,1826,1829],{"class":558,"line":1822},22,[556,1824,1825],{"class":587},"  } ",[556,1827,1828],{"class":574},"catch",[556,1830,1831],{"class":587}," (err) {\n",[556,1833,1835,1837,1840,1843,1845,1848],{"class":558,"line":1834},23,[556,1836,1801],{"class":574},[556,1838,1839],{"class":1542}," rm",[556,1841,1842],{"class":587},"(target, { force: ",[556,1844,615],{"class":566},[556,1846,1847],{"class":587}," }); ",[556,1849,1850],{"class":1530},"\u002F\u002F a cut-off transfer is a failed download\n",[556,1852,1854,1856],{"class":558,"line":1853},24,[556,1855,1693],{"class":574},[556,1857,1858],{"class":587}," err;\n",[556,1860,1862],{"class":558,"line":1861},25,[556,1863,1715],{"class":587},[556,1865,1867,1870],{"class":558,"line":1866},26,[556,1868,1869],{"class":574},"  return",[556,1871,1872],{"class":587}," target;\n",[556,1874,1876],{"class":558,"line":1875},27,[556,1877,801],{"class":587},[556,1879,1881],{"class":558,"line":1880},28,[556,1882,1525],{"emptyLinePlaceholder":1524},[556,1884,1886,1889,1892,1894,1897],{"class":558,"line":1885},29,[556,1887,1888],{"class":574},"function",[556,1890,1891],{"class":1542}," fileName",[556,1893,1546],{"class":587},[556,1895,1896],{"class":562},"disposition",[556,1898,1567],{"class":587},[556,1900,1902,1904,1906,1908,1911,1914,1917],{"class":558,"line":1901},30,[556,1903,1649],{"class":574},[556,1905,1652],{"class":587},[556,1907,1655],{"class":574},[556,1909,1910],{"class":587},"disposition) ",[556,1912,1913],{"class":574},"return",[556,1915,1916],{"class":566}," null",[556,1918,1463],{"class":587},[556,1920,1922,1924,1927,1929,1932,1936,1939,1942,1945,1948,1951,1954,1957,1959,1962],{"class":558,"line":1921},31,[556,1923,1572],{"class":574},[556,1925,1926],{"class":566}," exact",[556,1928,1578],{"class":574},[556,1930,1931],{"class":570}," \u002Ffilename",[556,1933,1935],{"class":1934},"sJaa3","\\*",[556,1937,1938],{"class":570},"=UTF-8''(",[556,1940,1941],{"class":566},"[",[556,1943,1944],{"class":574},"^",[556,1946,1947],{"class":566},";]",[556,1949,1950],{"class":574},"+",[556,1952,1953],{"class":570},")\u002F",[556,1955,1956],{"class":574},"i",[556,1958,531],{"class":587},[556,1960,1961],{"class":1542},"exec",[556,1963,1964],{"class":587},"(disposition);\n",[556,1966,1968,1970,1973,1975,1978,1981,1983],{"class":558,"line":1967},32,[556,1969,1649],{"class":574},[556,1971,1972],{"class":587}," (exact) ",[556,1974,1913],{"class":574},[556,1976,1977],{"class":1542}," decodeURIComponent",[556,1979,1980],{"class":587},"(exact[",[556,1982,763],{"class":566},[556,1984,1985],{"class":587},"]);\n",[556,1987,1989,1991,1994,1996,1999,2001,2003,2006,2008,2011,2013,2015,2017],{"class":558,"line":1988},33,[556,1990,1572],{"class":574},[556,1992,1993],{"class":566}," ascii",[556,1995,1578],{"class":574},[556,1997,1998],{"class":570}," \u002Ffilename=\"(",[556,2000,1941],{"class":566},[556,2002,1944],{"class":574},[556,2004,2005],{"class":566},"\"]",[556,2007,530],{"class":574},[556,2009,2010],{"class":570},")\"\u002F",[556,2012,1956],{"class":574},[556,2014,531],{"class":587},[556,2016,1961],{"class":1542},[556,2018,1964],{"class":587},[556,2020,2022,2024,2027,2030,2033,2035,2038,2040,2042],{"class":558,"line":2021},34,[556,2023,1869],{"class":574},[556,2025,2026],{"class":587}," ascii ",[556,2028,2029],{"class":574},"?",[556,2031,2032],{"class":587}," ascii[",[556,2034,763],{"class":566},[556,2036,2037],{"class":587},"] ",[556,2039,1248],{"class":574},[556,2041,1916],{"class":566},[556,2043,1463],{"class":587},[556,2045,2047],{"class":558,"line":2046},35,[556,2048,801],{"class":587},[547,2050,2054],{"className":2051,"code":2052,"language":2053,"meta":552,"style":552},"language-php shiki shiki-themes github-light-high-contrast github-dark-high-contrast","\u003C?php\n\u002F\u002F $kind is 'certificate' or 'report'; $id is an _id or a shortId.\nfunction download(string $organizationId, string $kind, string $id, string $dir): string\n{\n    $tmp = tempnam($dir, 'dl');\n    $fh = fopen($tmp, 'wb');\n    $headers = [];\n\n    $ch = curl_init(\"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F{$organizationId}\u002F{$kind}\u002Fdownload\u002F\" . rawurlencode($id));\n    curl_setopt_array($ch, [\n        CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getToken()],\n        CURLOPT_FILE => $fh,\n        CURLOPT_TIMEOUT => 120,\n        CURLOPT_HEADERFUNCTION => function ($ch, $line) use (&$headers) {\n            $parts = explode(':', $line, 2);\n            if (count($parts) === 2) {\n                $headers[strtolower(trim($parts[0]))] = trim($parts[1]);\n            }\n            return strlen($line);\n        },\n    ]);\n    $ok = curl_exec($ch); \u002F\u002F false when the transfer is cut off\n    $status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);\n    curl_close($ch);\n    fclose($fh);\n\n    if (!$ok || $status !== 200) {\n        $error = json_decode((string) file_get_contents($tmp), true)['error'] ?? [];\n        unlink($tmp);\n        throw new RuntimeException(sprintf('download failed: %s %s %s',\n            $status, $error['code'] ?? 'transfer', $error['request_id'] ?? ''));\n    }\n\n    $name = fileName($headers['content-disposition'] ?? '') ?? \"{$id}.pdf\";\n    $target = $dir . DIRECTORY_SEPARATOR . basename($name);\n    rename($tmp, $target);\n    return $target;\n}\n\nfunction fileName(string $disposition): ?string\n{\n    if (preg_match(\"\u002Ffilename\\\\*=UTF-8''([^;]+)\u002Fi\", $disposition, $m)) {\n        return rawurldecode($m[1]);\n    }\n    if (preg_match('\u002Ffilename=\"([^\"]*)\"\u002Fi', $disposition, $m)) {\n        return $m[1];\n    }\n    return null;\n}\n","php",[458,2055,2056,2064,2069,2103,2107,2125,2143,2153,2157,2193,2201,2222,2232,2244,2267,2290,2311,2344,2349,2360,2365,2370,2386,2404,2412,2420,2424,2449,2487,2495,2518,2549,2553,2557,2592,2615,2624,2633,2638,2643,2662,2667,2698,2714,2719,2740,2753,2758,2767],{"__ignoreMap":552},[556,2057,2058,2061],{"class":558,"line":559},[556,2059,2060],{"class":574},"\u003C?",[556,2062,2063],{"class":566},"php\n",[556,2065,2066],{"class":558,"line":578},[556,2067,2068],{"class":1530},"\u002F\u002F $kind is 'certificate' or 'report'; $id is an _id or a shortId.\n",[556,2070,2071,2073,2075,2077,2080,2083,2085,2088,2090,2093,2095,2098,2100],{"class":558,"line":621},[556,2072,1888],{"class":574},[556,2074,1543],{"class":1542},[556,2076,1546],{"class":587},[556,2078,2079],{"class":574},"string",[556,2081,2082],{"class":587}," $organizationId, ",[556,2084,2079],{"class":574},[556,2086,2087],{"class":587}," $kind, ",[556,2089,2079],{"class":574},[556,2091,2092],{"class":587}," $id, ",[556,2094,2079],{"class":574},[556,2096,2097],{"class":587}," $dir)",[556,2099,1248],{"class":574},[556,2101,2102],{"class":574}," string\n",[556,2104,2105],{"class":558,"line":634},[556,2106,603],{"class":587},[556,2108,2109,2112,2114,2117,2120,2123],{"class":558,"line":643},[556,2110,2111],{"class":587},"    $tmp ",[556,2113,1675],{"class":574},[556,2115,2116],{"class":566}," tempnam",[556,2118,2119],{"class":587},"($dir, ",[556,2121,2122],{"class":570},"'dl'",[556,2124,1768],{"class":587},[556,2126,2127,2130,2132,2135,2138,2141],{"class":558,"line":649},[556,2128,2129],{"class":587},"    $fh ",[556,2131,1675],{"class":574},[556,2133,2134],{"class":566}," fopen",[556,2136,2137],{"class":587},"($tmp, ",[556,2139,2140],{"class":570},"'wb'",[556,2142,1768],{"class":587},[556,2144,2145,2148,2150],{"class":558,"line":662},[556,2146,2147],{"class":587},"    $headers ",[556,2149,1675],{"class":574},[556,2151,2152],{"class":587}," [];\n",[556,2154,2155],{"class":558,"line":675},[556,2156,1525],{"emptyLinePlaceholder":1524},[556,2158,2159,2162,2164,2167,2169,2172,2175,2178,2181,2184,2187,2190],{"class":558,"line":688},[556,2160,2161],{"class":587},"    $ch ",[556,2163,1675],{"class":574},[556,2165,2166],{"class":566}," curl_init",[556,2168,1546],{"class":587},[556,2170,2171],{"class":570},"\"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F{",[556,2173,2174],{"class":587},"$organizationId",[556,2176,2177],{"class":570},"}\u002F{",[556,2179,2180],{"class":587},"$kind",[556,2182,2183],{"class":570},"}\u002Fdownload\u002F\"",[556,2185,2186],{"class":574}," .",[556,2188,2189],{"class":566}," rawurlencode",[556,2191,2192],{"class":587},"($id));\n",[556,2194,2195,2198],{"class":558,"line":701},[556,2196,2197],{"class":566},"    curl_setopt_array",[556,2199,2200],{"class":587},"($ch, [\n",[556,2202,2203,2206,2209,2212,2215,2217,2219],{"class":558,"line":713},[556,2204,2205],{"class":566},"        CURLOPT_HTTPHEADER",[556,2207,2208],{"class":574}," =>",[556,2210,2211],{"class":587}," [",[556,2213,2214],{"class":570},"'Authorization: Bearer '",[556,2216,2186],{"class":574},[556,2218,1631],{"class":1542},[556,2220,2221],{"class":587},"()],\n",[556,2223,2224,2227,2229],{"class":558,"line":726},[556,2225,2226],{"class":566},"        CURLOPT_FILE",[556,2228,2208],{"class":574},[556,2230,2231],{"class":587}," $fh,\n",[556,2233,2234,2237,2239,2242],{"class":558,"line":737},[556,2235,2236],{"class":566},"        CURLOPT_TIMEOUT",[556,2238,2208],{"class":574},[556,2240,2241],{"class":566}," 120",[556,2243,618],{"class":587},[556,2245,2246,2249,2251,2253,2256,2259,2261,2264],{"class":558,"line":743},[556,2247,2248],{"class":566},"        CURLOPT_HEADERFUNCTION",[556,2250,2208],{"class":574},[556,2252,1539],{"class":574},[556,2254,2255],{"class":587}," ($ch, $line) ",[556,2257,2258],{"class":574},"use",[556,2260,1652],{"class":587},[556,2262,2263],{"class":574},"&",[556,2265,2266],{"class":587},"$headers) {\n",[556,2268,2269,2272,2274,2277,2279,2282,2285,2288],{"class":558,"line":749},[556,2270,2271],{"class":587},"            $parts ",[556,2273,1675],{"class":574},[556,2275,2276],{"class":566}," explode",[556,2278,1546],{"class":587},[556,2280,2281],{"class":570},"':'",[556,2283,2284],{"class":587},", $line, ",[556,2286,2287],{"class":566},"2",[556,2289,1768],{"class":587},[556,2291,2292,2295,2297,2300,2303,2306,2309],{"class":558,"line":798},[556,2293,2294],{"class":574},"            if",[556,2296,1652],{"class":587},[556,2298,2299],{"class":566},"count",[556,2301,2302],{"class":587},"($parts) ",[556,2304,2305],{"class":574},"===",[556,2307,2308],{"class":566}," 2",[556,2310,1567],{"class":587},[556,2312,2313,2316,2319,2321,2324,2327,2330,2333,2335,2338,2340,2342],{"class":558,"line":998},[556,2314,2315],{"class":587},"                $headers[",[556,2317,2318],{"class":566},"strtolower",[556,2320,1546],{"class":587},[556,2322,2323],{"class":566},"trim",[556,2325,2326],{"class":587},"($parts[",[556,2328,2329],{"class":566},"0",[556,2331,2332],{"class":587},"]))] ",[556,2334,1675],{"class":574},[556,2336,2337],{"class":566}," trim",[556,2339,2326],{"class":587},[556,2341,763],{"class":566},[556,2343,1985],{"class":587},[556,2345,2346],{"class":558,"line":1722},[556,2347,2348],{"class":587},"            }\n",[556,2350,2351,2354,2357],{"class":558,"line":1771},[556,2352,2353],{"class":574},"            return",[556,2355,2356],{"class":566}," strlen",[556,2358,2359],{"class":587},"($line);\n",[556,2361,2362],{"class":558,"line":1789},[556,2363,2364],{"class":587},"        },\n",[556,2366,2367],{"class":558,"line":1798},[556,2368,2369],{"class":587},"    ]);\n",[556,2371,2372,2375,2377,2380,2383],{"class":558,"line":1822},[556,2373,2374],{"class":587},"    $ok ",[556,2376,1675],{"class":574},[556,2378,2379],{"class":566}," curl_exec",[556,2381,2382],{"class":587},"($ch); ",[556,2384,2385],{"class":1530},"\u002F\u002F false when the transfer is cut off\n",[556,2387,2388,2391,2393,2396,2399,2402],{"class":558,"line":1834},[556,2389,2390],{"class":587},"    $status ",[556,2392,1675],{"class":574},[556,2394,2395],{"class":566}," curl_getinfo",[556,2397,2398],{"class":587},"($ch, ",[556,2400,2401],{"class":566},"CURLINFO_RESPONSE_CODE",[556,2403,1768],{"class":587},[556,2405,2406,2409],{"class":558,"line":1853},[556,2407,2408],{"class":566},"    curl_close",[556,2410,2411],{"class":587},"($ch);\n",[556,2413,2414,2417],{"class":558,"line":1861},[556,2415,2416],{"class":566},"    fclose",[556,2418,2419],{"class":587},"($fh);\n",[556,2421,2422],{"class":558,"line":1866},[556,2423,1525],{"emptyLinePlaceholder":1524},[556,2425,2426,2429,2431,2433,2436,2439,2442,2445,2447],{"class":558,"line":1875},[556,2427,2428],{"class":574},"    if",[556,2430,1652],{"class":587},[556,2432,1655],{"class":574},[556,2434,2435],{"class":587},"$ok ",[556,2437,2438],{"class":574},"||",[556,2440,2441],{"class":587}," $status ",[556,2443,2444],{"class":574},"!==",[556,2446,1237],{"class":566},[556,2448,1567],{"class":587},[556,2450,2451,2454,2456,2459,2462,2464,2467,2470,2473,2475,2478,2481,2483,2485],{"class":558,"line":1880},[556,2452,2453],{"class":587},"        $error ",[556,2455,1675],{"class":574},[556,2457,2458],{"class":566}," json_decode",[556,2460,2461],{"class":587},"((",[556,2463,2079],{"class":574},[556,2465,2466],{"class":587},") ",[556,2468,2469],{"class":566},"file_get_contents",[556,2471,2472],{"class":587},"($tmp), ",[556,2474,615],{"class":566},[556,2476,2477],{"class":587},")[",[556,2479,2480],{"class":570},"'error'",[556,2482,2037],{"class":587},[556,2484,1757],{"class":574},[556,2486,2152],{"class":587},[556,2488,2489,2492],{"class":558,"line":1885},[556,2490,2491],{"class":566},"        unlink",[556,2493,2494],{"class":587},"($tmp);\n",[556,2496,2497,2500,2503,2506,2508,2511,2513,2516],{"class":558,"line":1901},[556,2498,2499],{"class":574},"        throw",[556,2501,2502],{"class":574}," new",[556,2504,2505],{"class":566}," RuntimeException",[556,2507,1546],{"class":587},[556,2509,2510],{"class":566},"sprintf",[556,2512,1546],{"class":587},[556,2514,2515],{"class":570},"'download failed: %s %s %s'",[556,2517,618],{"class":587},[556,2519,2520,2523,2526,2528,2530,2533,2536,2539,2541,2543,2546],{"class":558,"line":1921},[556,2521,2522],{"class":587},"            $status, $error[",[556,2524,2525],{"class":570},"'code'",[556,2527,2037],{"class":587},[556,2529,1757],{"class":574},[556,2531,2532],{"class":570}," 'transfer'",[556,2534,2535],{"class":587},", $error[",[556,2537,2538],{"class":570},"'request_id'",[556,2540,2037],{"class":587},[556,2542,1757],{"class":574},[556,2544,2545],{"class":570}," ''",[556,2547,2548],{"class":587},"));\n",[556,2550,2551],{"class":558,"line":1967},[556,2552,740],{"class":587},[556,2554,2555],{"class":558,"line":1988},[556,2556,1525],{"emptyLinePlaceholder":1524},[556,2558,2559,2562,2564,2566,2569,2571,2573,2575,2577,2579,2581,2584,2587,2590],{"class":558,"line":2021},[556,2560,2561],{"class":587},"    $name ",[556,2563,1675],{"class":574},[556,2565,1891],{"class":1542},[556,2567,2568],{"class":587},"($headers[",[556,2570,1751],{"class":570},[556,2572,2037],{"class":587},[556,2574,1757],{"class":574},[556,2576,2545],{"class":570},[556,2578,2466],{"class":587},[556,2580,1757],{"class":574},[556,2582,2583],{"class":570}," \"{",[556,2585,2586],{"class":587},"$id",[556,2588,2589],{"class":570},"}.pdf\"",[556,2591,1463],{"class":587},[556,2593,2594,2597,2599,2602,2604,2607,2609,2612],{"class":558,"line":2046},[556,2595,2596],{"class":587},"    $target ",[556,2598,1675],{"class":574},[556,2600,2601],{"class":587}," $dir ",[556,2603,531],{"class":574},[556,2605,2606],{"class":566}," DIRECTORY_SEPARATOR",[556,2608,2186],{"class":574},[556,2610,2611],{"class":566}," basename",[556,2613,2614],{"class":587},"($name);\n",[556,2616,2618,2621],{"class":558,"line":2617},36,[556,2619,2620],{"class":566},"    rename",[556,2622,2623],{"class":587},"($tmp, $target);\n",[556,2625,2627,2630],{"class":558,"line":2626},37,[556,2628,2629],{"class":574},"    return",[556,2631,2632],{"class":587}," $target;\n",[556,2634,2636],{"class":558,"line":2635},38,[556,2637,801],{"class":587},[556,2639,2641],{"class":558,"line":2640},39,[556,2642,1525],{"emptyLinePlaceholder":1524},[556,2644,2646,2648,2650,2652,2654,2657,2659],{"class":558,"line":2645},40,[556,2647,1888],{"class":574},[556,2649,1891],{"class":1542},[556,2651,1546],{"class":587},[556,2653,2079],{"class":574},[556,2655,2656],{"class":587}," $disposition)",[556,2658,1248],{"class":574},[556,2660,2661],{"class":574}," ?string\n",[556,2663,2665],{"class":558,"line":2664},41,[556,2666,603],{"class":587},[556,2668,2670,2672,2674,2677,2679,2682,2685,2687,2690,2692,2695],{"class":558,"line":2669},42,[556,2671,2428],{"class":574},[556,2673,1652],{"class":587},[556,2675,2676],{"class":566},"preg_match",[556,2678,1546],{"class":587},[556,2680,2681],{"class":570},"\"\u002Ffilename",[556,2683,2684],{"class":1934},"\\\\",[556,2686,530],{"class":574},[556,2688,2689],{"class":570},"=UTF-8''([^;]",[556,2691,1950],{"class":574},[556,2693,2694],{"class":570},")\u002Fi\"",[556,2696,2697],{"class":587},", $disposition, $m)) {\n",[556,2699,2701,2704,2707,2710,2712],{"class":558,"line":2700},43,[556,2702,2703],{"class":574},"        return",[556,2705,2706],{"class":566}," rawurldecode",[556,2708,2709],{"class":587},"($m[",[556,2711,763],{"class":566},[556,2713,1985],{"class":587},[556,2715,2717],{"class":558,"line":2716},44,[556,2718,740],{"class":587},[556,2720,2722,2724,2726,2728,2730,2733,2735,2738],{"class":558,"line":2721},45,[556,2723,2428],{"class":574},[556,2725,1652],{"class":587},[556,2727,2676],{"class":566},[556,2729,1546],{"class":587},[556,2731,2732],{"class":570},"'\u002Ffilename=\"([^\"]",[556,2734,530],{"class":574},[556,2736,2737],{"class":570},")\"\u002Fi'",[556,2739,2697],{"class":587},[556,2741,2743,2745,2748,2750],{"class":558,"line":2742},46,[556,2744,2703],{"class":574},[556,2746,2747],{"class":587}," $m[",[556,2749,763],{"class":566},[556,2751,2752],{"class":587},"];\n",[556,2754,2756],{"class":558,"line":2755},47,[556,2757,740],{"class":587},[556,2759,2761,2763,2765],{"class":558,"line":2760},48,[556,2762,2629],{"class":574},[556,2764,1916],{"class":566},[556,2766,1463],{"class":587},[556,2768,2770],{"class":558,"line":2769},49,[556,2771,801],{"class":587},[357,2773,2774,2775,2777],{},"Both examples pass the name through ",[458,2776,1735],{},". The name comes from the organization's records, so never use it as a path without doing that.",[370,2779,2781],{"id":2780},"keeping-your-copies-in-sync","Keeping your copies in sync",[357,2783,2784],{},"A nightly job that collects every new document looks like this, for each organization you work with:",[2786,2787,2788,2802,2805,2811],"ol",{},[2789,2790,2791,2792,2797,2798,2801],"li",{},"Page through ",[452,2793,2794],{"href":196},[458,2795,2796],{},"GET \u002Fv1\u002F\u003CorganizationId>\u002Fstudent"," with ",[458,2799,2800],{},"limit=100"," to get your students who have access to the organization.",[2789,2803,2804],{},"For each student, page through their certificates and their reports.",[2789,2806,2807,2808,2810],{},"Compare each document's ",[458,2809,1039],{}," with the ones you already hold. Download the new ones, and remove your copy of any report that is no longer listed.",[2789,2812,2813],{},"Record progress (organization, page, last student) so a stopped job can resume where it left off.",[357,2815,2816],{},"For each student:",[2818,2819,2820,2825,2830],"ul",{},[2789,2821,2822,2824],{},[458,2823,1135],{}," on a list means the student never signed in to that organization. Skip them. There is nothing to collect.",[2789,2826,2827,2829],{},[458,2828,1122],{}," on a download means the document was withdrawn or isn't available to you. Skip it and check the list again next run.",[2789,2831,2832,2835,2836,2839],{},[458,2833,2834],{},"429 too_many_requests"," means slow down. Wait the number of seconds in ",[458,2837,2838],{},"Retry-After",", then continue.",[357,2841,2842,2845,2846,531],{},[361,2843,2844],{},"Budget for the rate limit."," Each API account may make 100 requests per 60 seconds to each operation. Every call to the same operation shares one budget, whichever organization or student it names. Listing certificates for 1,000 students therefore takes at least 10 minutes. Listing reports, downloading certificates and downloading reports are separate operations with budgets of their own, so you can run those in parallel. Pace each operation at about one request every 0.6 seconds, rather than bursting and waiting. See ",[452,2847,45],{"href":46},[357,2849,2850,2851,2853],{},"The ",[452,2852,109],{"href":110}," tutorial builds this job in full, with checkpointing, in Node.js and PHP.",[370,2855,2857],{"id":2856},"related","Related",[2818,2859,2860,2868,2872,2877,2884],{},[2789,2861,2862,2864,2865,2867],{},[452,2863,86],{"href":87},": the ",[458,2866,1062],{}," a document points to",[2789,2869,2870],{},[452,2871,109],{"href":110},[2789,2873,2874,2876],{},[452,2875,36],{"href":37},": core ids, organization ids and short ids",[2789,2878,2879,2881,2882],{},[452,2880,33],{"href":34},": downloads and ",[458,2883,1266],{},[2789,2885,2886,2887,766,2893,766,2899],{},"Error codes: ",[452,2888,2890],{"href":2889},"\u002Fapi\u002Ferrors#not_found",[458,2891,2892],{},"not_found",[452,2894,2896],{"href":2895},"\u002Fapi\u002Ferrors#conflict",[458,2897,2898],{},"conflict",[452,2900,2902],{"href":2901},"\u002Fapi\u002Ferrors#internal_error",[458,2903,2904],{},"internal_error",[2906,2907,2908],"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}html pre.shiki code .sJaa3, html code.shiki .sJaa3{--shiki-default:#024C1A;--shiki-default-font-weight:bold;--shiki-dark:#72F088;--shiki-dark-font-weight:bold}",{"title":552,"searchDepth":578,"depth":621,"links":2910},[2911,2912,2913,2916,2920,2921],{"id":372,"depth":578,"text":373},{"id":425,"depth":578,"text":426},{"id":534,"depth":578,"text":535,"children":2914},[2915],{"id":1097,"depth":621,"text":1098},{"id":1154,"depth":578,"text":1155,"children":2917},[2918,2919],{"id":1357,"depth":621,"text":1358},{"id":1438,"depth":621,"text":1439},{"id":2780,"depth":578,"text":2781},{"id":2856,"depth":578,"text":2857},"List a student's released certificates and result reports, download the PDFs by id or short id, and keep your copies in sync.","md",{},[2926,2927,2928,2929],"listStudentCertificates","downloadCertificate","listStudentReports","downloadReport","90",{"title":92,"description":2922},"api\u002Fguides\u002Fcertificates-and-reports","zWRWejxTkFr20Sb-bIFiL04atHRTiwS1WWxUgw5o-C0",[2935,2940,2943,2947],{"operationId":2926,"slug":2936,"method":133,"path":2937,"tag":256,"summary":263,"deprecated":134,"public":134,"permission":2938,"scope":2939,"order":2617},"list-student-certificates","\u002Fv1\u002F{organizationId}\u002Fcertificate\u002F{userId}","certificate\u002Fread:$org:$ID","organization",{"operationId":2927,"slug":2941,"method":133,"path":2942,"tag":256,"summary":260,"deprecated":134,"public":134,"permission":2938,"scope":2939,"order":2046},"download-certificate","\u002Fv1\u002F{organizationId}\u002Fcertificate\u002Fdownload\u002F{certificateId}",{"operationId":2928,"slug":2944,"method":133,"path":2945,"tag":256,"summary":269,"deprecated":134,"public":134,"permission":2946,"scope":2939,"order":2635},"list-student-reports","\u002Fv1\u002F{organizationId}\u002Freport\u002F{userId}","report\u002Fread:$org:$ID",{"operationId":2929,"slug":2948,"method":133,"path":2949,"tag":256,"summary":266,"deprecated":134,"public":134,"permission":2946,"scope":2939,"order":2626},"download-report","\u002Fv1\u002F{organizationId}\u002Freport\u002Fdownload\u002F{reportId}",1791554615223]