{"openapi":"3.1.0","info":{"title":"Wingman API","version":"1.0.0","description":"Search exam questions, build papers, mark work and import evidence-backed results into your Wingman account. No official examiner certification is implied. Imported results are attributed to their source. API keys cannot access administration, login or key management."},"servers":[{"url":"https://api.wingmanmaths.com/v1"}],"security":[{"bearerAuth":[]}],"paths":{"/me":{"get":{"operationId":"getIdentity","summary":"Check your connection","description":"Required permissions: any active key.","tags":["me"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":[],"x-openai-isConsequential":false,"parameters":[],"responses":{"200":{"description":"Check your connection","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"key":{"type":"object","properties":{"id":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","scopes"]}},"required":["user","key"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}}}},"/questions/facets":{"get":{"operationId":"questionFacets","summary":"Discover courses and topics","description":"Required permissions: questions:read.","tags":["questions"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["questions:read"],"x-openai-isConsequential":false,"parameters":[],"responses":{"200":{"description":"Discover courses and topics","content":{"application/json":{"schema":{"type":"object","description":"Course, board, module, topic and subtopic options. Use each option's value in search filters."}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}}}},"/questions":{"get":{"operationId":"searchQuestions","summary":"Search the question bank","description":"Published questions only. Use returned pins unchanged when creating a paper. Cursor pagination; random selection has no cursor.\nRequired permissions: questions:read.","tags":["questions"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["questions:read"],"x-openai-isConsequential":false,"parameters":[{"name":"q","in":"query","schema":{"type":"string","minLength":1,"maxLength":160}},{"name":"module","in":"query","schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"level","in":"query","schema":{"type":"string","enum":["as-level","a-level","international-as-level","international-a-level"]}},{"name":"subject","in":"query","schema":{"type":"string","enum":["maths","further-maths"]}},{"name":"board","in":"query","schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"year","in":"query","schema":{"type":"integer","minimum":1900,"maximum":2100}},{"name":"tag","in":"query","schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"topic","in":"query","schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"subtopic","in":"query","schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"difficulty","in":"query","schema":{"type":"integer","minimum":1,"maximum":5}},{"name":"minMarks","in":"query","schema":{"type":"integer","minimum":0,"maximum":100}},{"name":"maxMarks","in":"query","schema":{"type":"integer","minimum":0,"maximum":100}},{"name":"excludeIds","in":"query","schema":{"default":[],"maxItems":1000,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"style":"form","explode":true},{"name":"random","in":"query","schema":{"default":false,"type":"boolean"}},{"name":"favouritesOnly","in":"query","schema":{"default":false,"type":"boolean"}},{"name":"frequency","in":"query","schema":{"type":"string","enum":["frequent","occasional","rare"]}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","schema":{"default":30,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Search the question bank","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResults"}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}}}},"/questions/{questionId}/revisions/{revision}":{"get":{"operationId":"readQuestion","summary":"Read a question and mark scheme","description":"Required permissions: questions:read.","tags":["questions"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["questions:read"],"x-openai-isConsequential":false,"parameters":[{"name":"questionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"revision","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Read a question and mark scheme","content":{"application/json":{"schema":{"type":"object","description":"Pinned published question content, complete scheme, sources and diagram descriptors."}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}}}},"/questions/{questionId}/revisions/{revision}/assets/{assetId}":{"get":{"operationId":"readQuestionAsset","summary":"Download a question diagram","description":"Required permissions: questions:read.","tags":["questions"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["questions:read"],"x-openai-isConsequential":false,"parameters":[{"name":"questionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"revision","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Private file bytes. Download with the same bearer key; URLs do not grant access on their own.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}}}},"/papers":{"get":{"operationId":"listPapers","summary":"List your saved Builder papers","description":"Required permissions: papers:read.","tags":["papers"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["papers:read"],"x-openai-isConsequential":false,"parameters":[],"responses":{"200":{"description":"List your saved Builder papers","content":{"application/json":{"schema":{"type":"object","properties":{"papers":{"type":"array","items":{"$ref":"#/components/schemas/PaperSummary"}}},"required":["papers"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}}},"post":{"operationId":"createPaper","summary":"Save a paper from question pins","description":"Generate a UUID for id and reuse it with the identical body on retries. Saving does not prepare PDFs.\nRequired permissions: papers:write.","tags":["papers"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["papers:write"],"x-openai-isConsequential":true,"parameters":[],"responses":{"201":{"description":"Save a paper from question pins","content":{"application/json":{"schema":{"type":"object","properties":{"paper":{"$ref":"#/components/schemas/Paper"}},"required":["paper"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaper"}}}}}},"/papers/{id}":{"get":{"operationId":"readPaper","summary":"Read your latest paper revision","description":"Required permissions: papers:read.","tags":["papers"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["papers:read"],"x-openai-isConsequential":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Read your latest paper revision","content":{"application/json":{"schema":{"type":"object","properties":{"paper":{"$ref":"#/components/schemas/Paper"}},"required":["paper"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}}},"patch":{"operationId":"updatePaper","summary":"Save a new paper revision","description":"Send the current revision for optimistic concurrency. A stale revision returns 409.\nRequired permissions: papers:write.","tags":["papers"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["papers:write"],"x-openai-isConsequential":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Save a new paper revision","content":{"application/json":{"schema":{"type":"object","properties":{"paper":{"$ref":"#/components/schemas/Paper"}},"required":["paper"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaper"}}}}}},"/papers/{id}/revisions/{revision}":{"get":{"operationId":"readPaperRevision","summary":"Read a frozen paper revision","description":"Required permissions: papers:read.","tags":["papers"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["papers:read"],"x-openai-isConsequential":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"revision","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Read a frozen paper revision","content":{"application/json":{"schema":{"type":"object","properties":{"paper":{"$ref":"#/components/schemas/Paper"}},"required":["paper"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}}}},"/papers/{id}/revisions/{revision}/exports":{"post":{"operationId":"preparePaperExports","summary":"Prepare both printable PDFs","description":"Uses the same print renderer as Builder. May take up to 120 seconds. Safe to retry the same revision. Requires configured server PDF export service.\nRequired permissions: papers:write.","tags":["papers"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["papers:write"],"x-openai-isConsequential":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"revision","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Prepare both printable PDFs","content":{"application/json":{"schema":{"type":"object","properties":{"ready":{"const":true},"paperId":{"type":"string"},"revision":{"type":"integer"}},"required":["ready","paperId","revision"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}}}}},"/papers/{id}/revisions/{revision}/exports/{kind}":{"get":{"operationId":"downloadPaper","summary":"Download a prepared PDF","description":"Required permissions: papers:read.","tags":["papers"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["papers:read"],"x-openai-isConsequential":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"revision","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["question-paper","mark-scheme"]}}],"responses":{"200":{"description":"Private file bytes. Download with the same bearer key; URLs do not grant access on their own.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}}}},"/marking/sessions":{"get":{"operationId":"listMarkingSessions","summary":"List your uploaded papers","description":"Returns the 50 most recent papers as lightweight summaries. Read a session for full results.\nRequired permissions: marking:read.","tags":["marking"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["marking:read"],"x-openai-isConsequential":false,"parameters":[],"responses":{"200":{"description":"List your uploaded papers","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"sessions":{"type":"array","items":{"$ref":"#/components/schemas/MarkingSession"}}},"required":["enabled","sessions"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}}},"post":{"operationId":"createMarkingSession","summary":"Create an automated marking draft","description":"Required permissions: marking:submit.","tags":["marking"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["marking:submit"],"x-openai-isConsequential":true,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,128}$"},"description":"Reuse for retries of the same operation. Keys are isolated per API key. Completed imports are also immutable per session and payload."}],"responses":{"201":{"description":"Create an automated marking draft","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/MarkingSession"}},"required":["session"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}}}},"/marking/sessions/from-builder":{"post":{"operationId":"createMarkingFromBuilder","summary":"Mark a saved Builder paper","description":"Required permissions: marking:submit, papers:read.","tags":["marking"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["marking:submit","papers:read"],"x-openai-isConsequential":true,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,128}$"},"description":"Reuse for retries of the same operation. Keys are isolated per API key. Completed imports are also immutable per session and payload."}],"responses":{"201":{"description":"Mark a saved Builder paper","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/MarkingSession"}},"required":["session"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuilderMarking"}}}}}},"/marking/sessions/{id}":{"get":{"operationId":"readMarkingSession","summary":"Read scans, results and feedback","description":"Required permissions: marking:read.","tags":["marking"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["marking:read"],"x-openai-isConsequential":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Read scans, results and feedback","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/MarkingSession"}},"required":["session"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}}}},"/marking/sessions/{id}/assets":{"post":{"operationId":"uploadMarkingAsset","summary":"Upload a scan or mark scheme","description":"Required permissions: marking:submit.","tags":["marking"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["marking:submit"],"x-openai-isConsequential":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["work","scheme"]}},{"name":"name","in":"query","required":true,"schema":{"type":"string","maxLength":180}}],"responses":{"201":{"description":"Upload a scan or mark scheme","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"required":["asset"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/pdf":{"schema":{"type":"string","format":"binary","description":"Raw bytes, not multipart or base64. At most 25 MiB and 80 pages. Images are single-page."}},"image/png":{"schema":{"type":"string","format":"binary","description":"Raw bytes, not multipart or base64. At most 25 MiB and 80 pages. Images are single-page."}},"image/jpeg":{"schema":{"type":"string","format":"binary","description":"Raw bytes, not multipart or base64. At most 25 MiB and 80 pages. Images are single-page."}},"image/webp":{"schema":{"type":"string","format":"binary","description":"Raw bytes, not multipart or base64. At most 25 MiB and 80 pages. Images are single-page."}}}}}},"/marking/sessions/{id}/start":{"post":{"operationId":"startMarking","summary":"Index and mark a complete paper","description":"Upload work and a scheme first. Starts asynchronous indexing and marking; poll the session every 5 seconds until terminal states.\nRequired permissions: marking:submit.","tags":["marking"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["marking:submit"],"x-openai-isConsequential":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,128}$"},"description":"Reuse for retries of the same operation. Keys are isolated per API key. Completed imports are also immutable per session and payload."}],"responses":{"202":{"description":"Index and mark a complete paper","content":{"application/json":{"schema":{"type":"object","properties":{"indexing":{"type":"object"}},"required":["indexing"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}}}},"/marking/sessions/{id}/questions":{"post":{"operationId":"markQuestion","summary":"Mark selected question pages","description":"Required permissions: marking:submit.","tags":["marking"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["marking:submit"],"x-openai-isConsequential":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,128}$"},"description":"Reuse for retries of the same operation. Keys are isolated per API key. Completed imports are also immutable per session and payload."}],"responses":{"202":{"description":"Mark selected question pages","content":{"application/json":{"schema":{"type":"object","properties":{"question":{"$ref":"#/components/schemas/MarkingQuestion"}},"required":["question"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkQuestion"}}}}}},"/marking/assets/{id}":{"get":{"operationId":"downloadMarkingAsset","summary":"Download one of your private scans","description":"Required permissions: marking:read.","tags":["marking"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["marking:read"],"x-openai-isConsequential":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Private file bytes. Download with the same bearer key; URLs do not grant access on their own.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}}}},"/marking/questions/{id}":{"patch":{"operationId":"reviewMarking","summary":"Review individual mark decisions","description":"Required permissions: marking:review.","tags":["marking"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["marking:review"],"x-openai-isConsequential":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Review individual mark decisions","content":{"application/json":{"schema":{"type":"object","properties":{"question":{"$ref":"#/components/schemas/MarkingQuestion"}},"required":["question"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}}}},"/marking/questions/{id}/annotations":{"patch":{"operationId":"annotateMarking","summary":"Save marks and comments on scans","description":"Required permissions: marking:review.","tags":["marking"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["marking:review"],"x-openai-isConsequential":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Save marks and comments on scans","content":{"application/json":{"schema":{"type":"object","properties":{"question":{"$ref":"#/components/schemas/MarkingQuestion"}},"required":["question"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotations"}}}}}},"/marking/imports":{"post":{"operationId":"createImport","summary":"Create an external marking draft","description":"Required permissions: marking:import.","tags":["marking"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["marking:import"],"x-openai-isConsequential":true,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,128}$"},"description":"Reuse for retries of the same operation. Keys are isolated per API key. Completed imports are also immutable per session and payload."}],"responses":{"201":{"description":"Create an external marking draft","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/MarkingSession"}},"required":["session"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}}}},"/marking/imports/{id}/assets":{"post":{"operationId":"uploadImportAsset","summary":"Upload source pages for an import","description":"Required permissions: marking:import.","tags":["marking"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["marking:import"],"x-openai-isConsequential":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["work","scheme"]}},{"name":"name","in":"query","required":true,"schema":{"type":"string","maxLength":180}}],"responses":{"201":{"description":"Upload source pages for an import","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"required":["asset"]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/pdf":{"schema":{"type":"string","format":"binary","description":"Raw bytes, not multipart or base64. At most 25 MiB and 80 pages. Images are single-page."}},"image/png":{"schema":{"type":"string","format":"binary","description":"Raw bytes, not multipart or base64. At most 25 MiB and 80 pages. Images are single-page."}},"image/jpeg":{"schema":{"type":"string","format":"binary","description":"Raw bytes, not multipart or base64. At most 25 MiB and 80 pages. Images are single-page."}},"image/webp":{"schema":{"type":"string","format":"binary","description":"Raw bytes, not multipart or base64. At most 25 MiB and 80 pages. Images are single-page."}}}}}},"/marking/imports/{id}/validate":{"post":{"operationId":"validateImport","summary":"Check an external marking submission","description":"Validates without saving any results. Returns server-calculated scores and review flags; reports field-level errors with 422.\nRequired permissions: marking:import.","tags":["marking"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["marking:import"],"x-openai-isConsequential":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Check an external marking submission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportValidation"}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkingImport"}}}}}},"/marking/imports/{id}/complete":{"post":{"operationId":"completeImport","summary":"Save externally marked work to your account","description":"Validates again and saves every question atomically. An identical submission can be replayed; changed submissions conflict. External provenance remains visible.\nRequired permissions: marking:import.","tags":["marking"],"security":[{"bearerAuth":[]}],"x-wingman-scopes":["marking:import"],"x-openai-isConsequential":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,128}$"},"description":"Reuse for retries of the same operation. Keys are isolated per API key. Completed imports are also immutable per session and payload."}],"responses":{"201":{"description":"Save externally marked work to your account","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ImportValidation"},{"type":"object","properties":{"session":{"$ref":"#/components/schemas/MarkingSession"},"source":{"type":"object"}},"required":["session","source"]}]}}}},"400":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"401":{"description":"Missing, revoked, expired or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"403":{"description":"Missing permission or restricted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"404":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"409":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"413":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"415":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"422":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}},"429":{"description":"Rate or service capacity limit. Honour Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkingImport"}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Wingman API key"}},"schemas":{"CreatePaper":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":80},"questions":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contentRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"schemeVersionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"schemeSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"catalogueRevision":{"type":"object","properties":{"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revisionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["resourceId","revisionId","revision"],"additionalProperties":false}},"required":["questionId","contentRevision","contentSha256","schemeVersionId","schemeSha256","catalogueRevision"],"additionalProperties":false}},"writingSpace":{"type":"string","enum":["smart","none","standard","extra","pages:1","pages:2","pages:3","pages:4","pages:5","pages:6","pages:7","pages:8","pages:9","pages:10"]},"gradeGuide":{"default":false,"type":"boolean"}},"required":["id","title","questions","writingSpace"],"additionalProperties":false},"UpdatePaper":{"type":"object","properties":{"revision":{"type":"integer","minimum":1,"maximum":2147483646},"title":{"type":"string","minLength":1,"maxLength":80},"questions":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contentRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"schemeVersionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"schemeSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"catalogueRevision":{"type":"object","properties":{"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revisionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["resourceId","revisionId","revision"],"additionalProperties":false}},"required":["questionId","contentRevision","contentSha256","schemeVersionId","schemeSha256","catalogueRevision"],"additionalProperties":false}},"writingSpace":{"type":"string","enum":["smart","none","standard","extra","pages:1","pages:2","pages:3","pages:4","pages:5","pages:6","pages:7","pages:8","pages:9","pages:10"]},"gradeGuide":{"default":false,"type":"boolean"}},"required":["revision","title","questions","writingSpace"],"additionalProperties":false},"Empty":{"type":"object","properties":{},"additionalProperties":false},"Session":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100}},"required":["title"],"additionalProperties":false},"BuilderMarking":{"type":"object","properties":{"paperId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647}},"required":["paperId","revision"],"additionalProperties":false},"MarkQuestion":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":40},"workAssetIds":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"schemeAssetIds":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"pageSelections":{"type":"object","propertyNames":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"additionalProperties":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"integer","minimum":1,"maximum":80}}}},"required":["label","workAssetIds","schemeAssetIds"],"additionalProperties":false},"Review":{"type":"object","properties":{"overrides":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":120},"additionalProperties":{"type":"string","enum":["awarded","withheld"]}},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["overrides","revision"],"additionalProperties":false},"Annotations":{"type":"object","properties":{"revision":{"type":"integer","minimum":0,"maximum":2147483646},"annotations":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"assetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"page":{"type":"integer","minimum":1,"maximum":80},"box":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","exclusiveMinimum":0,"maximum":1},"height":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false},"kind":{"type":"string","enum":["mark","comment"]},"criterionId":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"code":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"decision":{"anyOf":[{"type":"string","enum":["awarded","withheld"]},{"type":"null"}]},"comment":{"type":"string","maxLength":2000}},"required":["id","assetId","page","box","kind","criterionId","code","decision","comment"],"additionalProperties":false}},"completed":{"type":"boolean"}},"required":["revision","annotations"],"additionalProperties":false},"MarkingImport":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"wingman-marking-import-v1"},"coordinateSystem":{"type":"string","const":"normalized-top-left"},"pageBasis":{"type":"string","const":"displayed-page"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["human","ai"]},"name":{"type":"string","minLength":1,"maxLength":100},"model":{"type":"string","minLength":1,"maxLength":100},"markedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["kind","name","markedAt"],"additionalProperties":false},"coverage":{"type":"object","properties":{"questionCount":{"type":"integer","minimum":1,"maximum":24},"totalMarks":{"type":"integer","minimum":1,"maximum":2400}},"required":["questionCount","totalMarks"],"additionalProperties":false},"questions":{"minItems":1,"maxItems":24,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":40},"workAssetIds":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"schemeAssetIds":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"pageSelections":{"type":"object","propertyNames":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"additionalProperties":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"integer","minimum":1,"maximum":80}}},"rubric":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"wingman-rubric-v1"},"questionLabel":{"type":"string","minLength":1,"maxLength":200},"parts":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"label":{"type":"string","minLength":1,"maxLength":200},"maxMarks":{"type":"integer","minimum":1,"maximum":100}},"required":["id","label","maxMarks"],"additionalProperties":false}},"criteria":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"partId":{"type":"string","minLength":1,"maxLength":120},"code":{"type":"string","minLength":1,"maxLength":40},"requirement":{"type":"string","minLength":1,"maxLength":3000},"conditions":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":3000}},"conditionMode":{"type":"string","enum":["all","any"]},"dependsOn":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"maxMarks":{"type":"number","const":1},"sourcePageIds":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}}},"required":["id","partId","code","requirement","conditions","conditionMode","dependsOn","maxMarks","sourcePageIds"],"additionalProperties":false}},"sourcePageIds":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"issues":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":3000},"sourcePageIds":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}}},"required":["message","sourcePageIds"],"additionalProperties":false}}},"required":["schemaVersion","questionLabel","parts","criteria","sourcePageIds","issues"],"additionalProperties":false},"grade":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"wingman-grade-v1"},"criteria":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"criterionId":{"type":"string","minLength":1,"maxLength":120},"decision":{"type":"string","enum":["awarded","withheld","uncertain"]},"reason":{"type":"string","minLength":1,"maxLength":3000},"evidence":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"pageId":{"type":"string","minLength":1,"maxLength":120},"quote":{"type":"string","minLength":1,"maxLength":3000},"box":{"anyOf":[{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0,"maximum":1},"height":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false},{"type":"null"}]}},"required":["pageId","quote","box"],"additionalProperties":false}},"conditionChecks":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"conditionIndex":{"type":"integer","minimum":0,"maximum":19},"decision":{"type":"string","enum":["met","not_met","uncertain"]},"evidence":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"pageId":{"type":"string","minLength":1,"maxLength":120},"quote":{"type":"string","minLength":1,"maxLength":3000},"box":{"anyOf":[{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0,"maximum":1},"height":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false},{"type":"null"}]}},"required":["pageId","quote","box"],"additionalProperties":false}}},"required":["conditionIndex","decision","evidence"],"additionalProperties":false}}},"required":["criterionId","decision","reason","evidence","conditionChecks"],"additionalProperties":false}},"issues":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":3000},"criterionIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}}},"required":["message","criterionIds"],"additionalProperties":false}}},"required":["schemaVersion","criteria","issues"],"additionalProperties":false}},"required":["label","workAssetIds","schemeAssetIds","pageSelections","rubric","grade"],"additionalProperties":false}}},"required":["schemaVersion","coordinateSystem","pageBasis","source","coverage","questions"],"additionalProperties":false},"SearchQuery":{"type":"object","properties":{"q":{"type":"string","minLength":1,"maxLength":160},"module":{"type":"string","minLength":1,"maxLength":120},"level":{"type":"string","enum":["as-level","a-level","international-as-level","international-a-level"]},"subject":{"type":"string","enum":["maths","further-maths"]},"board":{"type":"string","minLength":1,"maxLength":120},"year":{"type":"integer","minimum":1900,"maximum":2100},"tag":{"type":"string","minLength":1,"maxLength":120},"topic":{"type":"string","minLength":1,"maxLength":120},"subtopic":{"type":"string","minLength":1,"maxLength":120},"difficulty":{"type":"integer","minimum":1,"maximum":5},"minMarks":{"type":"integer","minimum":0,"maximum":100},"maxMarks":{"type":"integer","minimum":0,"maximum":100},"excludeIds":{"default":[],"maxItems":1000,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"random":{"default":false,"type":"boolean"},"favouritesOnly":{"default":false,"type":"boolean"},"frequency":{"type":"string","enum":["frequent","occasional","rare"]},"cursor":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false},"QuestionPin":{"type":"object","properties":{"questionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contentRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"schemeVersionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"schemeSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"catalogueRevision":{"type":"object","properties":{"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revisionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["resourceId","revisionId","revision"],"additionalProperties":false}},"required":["questionId","contentRevision","contentSha256","schemeVersionId","schemeSha256","catalogueRevision"],"additionalProperties":false},"PaperDefinition":{"type":"object","properties":{"definitionVersion":{"type":"string","const":"wingman-builder-structured-saved-v1"},"dataSource":{"type":"string","const":"published"},"request":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":80},"questions":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contentRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"schemeVersionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"schemeSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"catalogueRevision":{"type":"object","properties":{"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revisionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["resourceId","revisionId","revision"],"additionalProperties":false}},"required":["questionId","contentRevision","contentSha256","schemeVersionId","schemeSha256","catalogueRevision"],"additionalProperties":false}},"writingSpace":{"type":"string","enum":["smart","none","standard","extra","pages:1","pages:2","pages:3","pages:4","pages:5","pages:6","pages:7","pages:8","pages:9","pages:10"]},"gradeGuide":{"default":false,"type":"boolean"}},"required":["title","questions","writingSpace"],"additionalProperties":false},"requestSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"input":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"wingman-structured-paper-v1"},"paperId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":1,"maxLength":160},"profile":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"version":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"rendererVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"mathEngineVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"fontSetSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"stylesheetSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"page":{"type":"string","const":"A4"}},"required":["id","version","rendererVersion","mathEngineVersion","fontSetSha256","stylesheetSha256","page"],"additionalProperties":false},"questions":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"occurrenceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"pin":{"type":"object","properties":{"questionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contentRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"schemeVersionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"schemeSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"catalogueRevision":{"anyOf":[{"type":"object","properties":{"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revisionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["resourceId","revisionId","revision"],"additionalProperties":false},{"type":"null"}]}},"required":["questionId","contentRevision","contentSha256","schemeVersionId","schemeSha256","catalogueRevision"],"additionalProperties":false},"displayedNumber":{"type":"integer","minimum":1,"maximum":100}},"required":["occurrenceId","pin","displayedNumber"],"additionalProperties":false}},"writing":{"type":"object","properties":{"mode":{"type":"string","enum":["smart","none","standard","extra","pages:1","pages:2","pages:3","pages:4","pages:5","pages:6","pages:7","pages:8","pages:9","pages:10"]},"policyVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"linesPerMark":{"type":"number","minimum":0,"maximum":10},"linesPerLeafPart":{"type":"integer","minimum":0,"maximum":20},"minimumLines":{"type":"integer","minimum":0,"maximum":320},"lineSpacingMm":{"type":"number","minimum":2,"maximum":15}},"required":["mode","policyVersion","linesPerMark","linesPerLeafPart","minimumLines","lineSpacingMm"],"additionalProperties":false},"duration":{"type":"object","properties":{"minutes":{"type":"integer","minimum":1,"maximum":12500},"kind":{"type":"string","const":"estimate"}},"required":["minutes","kind"],"additionalProperties":false},"gradeBoundaries":{"anyOf":[{"type":"object","properties":{"label":{"type":"string","const":"Practice estimate"},"policyVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"referenceVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"thresholds":{"type":"object","properties":{"A*":{"type":"integer","minimum":0,"maximum":9007199254740991},"A":{"type":"integer","minimum":0,"maximum":9007199254740991},"B":{"type":"integer","minimum":0,"maximum":9007199254740991},"C":{"type":"integer","minimum":0,"maximum":9007199254740991},"D":{"type":"integer","minimum":0,"maximum":9007199254740991},"E":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["A*","A","B","C","D","E"],"additionalProperties":false}},"required":["label","policyVersion","referenceVersion","thresholds"],"additionalProperties":false},{"type":"null"}]}},"required":["schemaVersion","paperId","revision","title","profile","questions","writing","duration","gradeBoundaries"],"additionalProperties":false},"inputSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"questionCount":{"type":"integer","minimum":1,"maximum":50},"totalMarks":{"type":"integer","minimum":1,"maximum":5000},"estimatedMinutes":{"type":"integer","minimum":1,"maximum":12500},"questionPaper":{"anyOf":[{"type":"object","properties":{"artifact":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byteLength":{"type":"integer","minimum":5,"maximum":33554432},"mediaType":{"type":"string","const":"application/pdf"}},"required":["assetId","sha256","byteLength","mediaType"],"additionalProperties":false},"layout":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"wingman-paper-layout-v1"},"paperId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"paperRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"inputSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"profile":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"version":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"rendererVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"mathEngineVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"fontSetSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"stylesheetSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"page":{"type":"string","const":"A4"}},"required":["id","version","rendererVersion","mathEngineVersion","fontSetSha256","stylesheetSha256","page"],"additionalProperties":false},"document":{"type":"string","enum":["question-paper","mark-scheme"]},"coordinateSystem":{"type":"string","const":"top-left-mm"},"pageCount":{"type":"integer","minimum":1,"maximum":1000},"totalMarks":{"type":"integer","minimum":1,"maximum":10000},"pages":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"widthMm":{"type":"number","const":210},"heightMm":{"type":"number","const":297}},"required":["page","widthMm","heightMm"],"additionalProperties":false}},"regions":{"maxItems":30000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"page":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"box":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":210},"y":{"type":"number","minimum":0,"maximum":297},"width":{"type":"number","exclusiveMinimum":0,"maximum":210},"height":{"type":"number","exclusiveMinimum":0,"maximum":297}},"required":["x","y","width","height"],"additionalProperties":false},"role":{"type":"string","enum":["question","part","block","figure","allocation","printed-award","answer"]},"occurrenceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"questionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"blockId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"allocationId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"printedAwardId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"answerKind":{"type":"string","enum":["writing-space","table-response"]},"answerCell":{"type":"object","properties":{"rowId":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"columnId":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"}},"required":["rowId","columnId"],"additionalProperties":false},"writingLines":{"type":"integer","minimum":0,"maximum":2000},"fragment":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","page","box","role","occurrenceId","questionId","partId","blockId","allocationId","fragment"],"additionalProperties":false}}},"required":["schemaVersion","paperId","paperRevision","inputSha256","profile","document","coordinateSystem","pageCount","totalMarks","pages","regions"],"additionalProperties":false},"layoutSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["artifact","layout","layoutSha256"],"additionalProperties":false},{"type":"null"}]},"markScheme":{"anyOf":[{"type":"object","properties":{"artifact":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byteLength":{"type":"integer","minimum":5,"maximum":33554432},"mediaType":{"type":"string","const":"application/pdf"}},"required":["assetId","sha256","byteLength","mediaType"],"additionalProperties":false},"layout":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"wingman-paper-layout-v1"},"paperId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"paperRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"inputSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"profile":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"version":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"rendererVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"mathEngineVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"fontSetSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"stylesheetSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"page":{"type":"string","const":"A4"}},"required":["id","version","rendererVersion","mathEngineVersion","fontSetSha256","stylesheetSha256","page"],"additionalProperties":false},"document":{"type":"string","enum":["question-paper","mark-scheme"]},"coordinateSystem":{"type":"string","const":"top-left-mm"},"pageCount":{"type":"integer","minimum":1,"maximum":1000},"totalMarks":{"type":"integer","minimum":1,"maximum":10000},"pages":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"widthMm":{"type":"number","const":210},"heightMm":{"type":"number","const":297}},"required":["page","widthMm","heightMm"],"additionalProperties":false}},"regions":{"maxItems":30000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"page":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"box":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":210},"y":{"type":"number","minimum":0,"maximum":297},"width":{"type":"number","exclusiveMinimum":0,"maximum":210},"height":{"type":"number","exclusiveMinimum":0,"maximum":297}},"required":["x","y","width","height"],"additionalProperties":false},"role":{"type":"string","enum":["question","part","block","figure","allocation","printed-award","answer"]},"occurrenceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"questionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"blockId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"allocationId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"printedAwardId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"answerKind":{"type":"string","enum":["writing-space","table-response"]},"answerCell":{"type":"object","properties":{"rowId":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"columnId":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"}},"required":["rowId","columnId"],"additionalProperties":false},"writingLines":{"type":"integer","minimum":0,"maximum":2000},"fragment":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","page","box","role","occurrenceId","questionId","partId","blockId","allocationId","fragment"],"additionalProperties":false}}},"required":["schemaVersion","paperId","paperRevision","inputSha256","profile","document","coordinateSystem","pageCount","totalMarks","pages","regions"],"additionalProperties":false},"layoutSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["artifact","layout","layoutSha256"],"additionalProperties":false},{"type":"null"}]}},"required":["definitionVersion","dataSource","request","requestSha256","input","inputSha256","questionCount","totalMarks","estimatedMinutes","questionPaper","markScheme"],"additionalProperties":false},"Rubric":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"wingman-rubric-v1"},"questionLabel":{"type":"string","minLength":1,"maxLength":200},"parts":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"label":{"type":"string","minLength":1,"maxLength":200},"maxMarks":{"type":"integer","minimum":1,"maximum":100}},"required":["id","label","maxMarks"],"additionalProperties":false}},"criteria":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"partId":{"type":"string","minLength":1,"maxLength":120},"code":{"type":"string","minLength":1,"maxLength":40},"requirement":{"type":"string","minLength":1,"maxLength":3000},"conditions":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":3000}},"conditionMode":{"type":"string","enum":["all","any"]},"dependsOn":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"maxMarks":{"type":"number","const":1},"sourcePageIds":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}}},"required":["id","partId","code","requirement","conditions","conditionMode","dependsOn","maxMarks","sourcePageIds"],"additionalProperties":false}},"sourcePageIds":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"issues":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":3000},"sourcePageIds":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}}},"required":["message","sourcePageIds"],"additionalProperties":false}}},"required":["schemaVersion","questionLabel","parts","criteria","sourcePageIds","issues"],"additionalProperties":false},"Grade":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"wingman-grade-v1"},"criteria":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"criterionId":{"type":"string","minLength":1,"maxLength":120},"decision":{"type":"string","enum":["awarded","withheld","uncertain"]},"reason":{"type":"string","minLength":1,"maxLength":3000},"evidence":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"pageId":{"type":"string","minLength":1,"maxLength":120},"quote":{"type":"string","minLength":1,"maxLength":3000},"box":{"anyOf":[{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0,"maximum":1},"height":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false},{"type":"null"}]}},"required":["pageId","quote","box"],"additionalProperties":false}},"conditionChecks":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"conditionIndex":{"type":"integer","minimum":0,"maximum":19},"decision":{"type":"string","enum":["met","not_met","uncertain"]},"evidence":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"pageId":{"type":"string","minLength":1,"maxLength":120},"quote":{"type":"string","minLength":1,"maxLength":3000},"box":{"anyOf":[{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0,"maximum":1},"height":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false},{"type":"null"}]}},"required":["pageId","quote","box"],"additionalProperties":false}}},"required":["conditionIndex","decision","evidence"],"additionalProperties":false}}},"required":["criterionId","decision","reason","evidence","conditionChecks"],"additionalProperties":false}},"issues":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":3000},"criterionIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}}},"required":["message","criterionIds"],"additionalProperties":false}}},"required":["schemaVersion","criteria","issues"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"requiredScopes":{"type":"array","items":{"enum":["questions:read","papers:read","papers:write","marking:read","marking:submit","marking:import","marking:review"]}}},"required":["code","message"]},"requestId":{"type":"string","format":"uuid"}},"required":["error","requestId"]},"Asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sessionId":{"type":"string","format":"uuid"},"name":{"type":"string"},"mimeType":{"enum":["application/pdf","image/png","image/jpeg","image/webp"]},"kind":{"enum":["work","scheme"]},"size":{"type":"integer"},"pageCount":{"type":"integer"}},"required":["id","sessionId","name","mimeType","kind","size","pageCount"]},"Evaluation":{"type":"object","properties":{"schemaVersion":{"const":"wingman-evaluation-v1"},"questionLabel":{"type":"string"},"awardedMarks":{"type":"integer"},"possibleMarks":{"type":"integer"},"maxMarks":{"type":"integer"},"needsReview":{"type":"boolean"},"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"awardedMarks":{"type":"integer"},"possibleMarks":{"type":"integer"},"maxMarks":{"type":"integer"},"needsReview":{"type":"boolean"}},"required":["id","label","awardedMarks","possibleMarks","maxMarks","needsReview"]}},"criteria":{"type":"array","items":{"type":"object","properties":{"criterionId":{"type":"string"},"code":{"type":"string"},"decision":{"enum":["awarded","withheld","uncertain"]},"reason":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"pageId":{"type":"string"},"quote":{"type":"string"},"box":{"type":["object","null"],"properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}}}},"required":["pageId","quote","box"]}}},"required":["criterionId","code","decision","reason","evidence"]}},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"criterionIds":{"type":"array","items":{"type":"string"}}},"required":["code","message","criterionIds"]}}},"required":["schemaVersion","questionLabel","awardedMarks","possibleMarks","maxMarks","needsReview","parts","criteria","issues"]},"MarkingQuestion":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"label":{"type":"string"},"status":{"enum":["draft","queued","preparing","marking","completed","needs_review","failed","cancelled"]},"workAssetIds":{"type":"array","items":{"type":"string"}},"schemeAssetIds":{"type":"array","items":{"type":"string"}},"pageSelections":{"type":"object","additionalProperties":{"type":"array","items":{"type":"integer"}}},"rubric":{"anyOf":[{"$ref":"#/components/schemas/Rubric"},{"type":"null"}]},"result":{"anyOf":[{"$ref":"#/components/schemas/Evaluation"},{"type":"null"}]},"errorCode":{"type":["string","null"]},"expectedMaxMarks":{"type":["integer","null"]},"review":{"type":["object","null"]},"annotationReview":{"type":["object","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sessionId","label","status","workAssetIds","schemeAssetIds","pageSelections","rubric","result","errorCode","expectedMaxMarks","review","annotationReview","createdAt","updatedAt"]},"MarkingSession":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/MarkingQuestion"}},"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}},"indexing":{"type":["object","null"]},"preparationPending":{"type":"boolean"}},"required":["id","title","createdAt","questions","assets"]},"Paper":{"type":"object","properties":{"definitionVersion":{"type":"string","const":"wingman-builder-structured-saved-v1"},"dataSource":{"type":"string","const":"published"},"request":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":80},"questions":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contentRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"schemeVersionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"schemeSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"catalogueRevision":{"type":"object","properties":{"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revisionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["resourceId","revisionId","revision"],"additionalProperties":false}},"required":["questionId","contentRevision","contentSha256","schemeVersionId","schemeSha256","catalogueRevision"],"additionalProperties":false}},"writingSpace":{"type":"string","enum":["smart","none","standard","extra","pages:1","pages:2","pages:3","pages:4","pages:5","pages:6","pages:7","pages:8","pages:9","pages:10"]},"gradeGuide":{"default":false,"type":"boolean"}},"required":["title","questions","writingSpace"],"additionalProperties":false},"requestSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"input":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"wingman-structured-paper-v1"},"paperId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":1,"maxLength":160},"profile":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"version":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"rendererVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"mathEngineVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"fontSetSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"stylesheetSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"page":{"type":"string","const":"A4"}},"required":["id","version","rendererVersion","mathEngineVersion","fontSetSha256","stylesheetSha256","page"],"additionalProperties":false},"questions":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"occurrenceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"pin":{"type":"object","properties":{"questionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contentRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"schemeVersionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"schemeSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"catalogueRevision":{"anyOf":[{"type":"object","properties":{"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revisionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["resourceId","revisionId","revision"],"additionalProperties":false},{"type":"null"}]}},"required":["questionId","contentRevision","contentSha256","schemeVersionId","schemeSha256","catalogueRevision"],"additionalProperties":false},"displayedNumber":{"type":"integer","minimum":1,"maximum":100}},"required":["occurrenceId","pin","displayedNumber"],"additionalProperties":false}},"writing":{"type":"object","properties":{"mode":{"type":"string","enum":["smart","none","standard","extra","pages:1","pages:2","pages:3","pages:4","pages:5","pages:6","pages:7","pages:8","pages:9","pages:10"]},"policyVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"linesPerMark":{"type":"number","minimum":0,"maximum":10},"linesPerLeafPart":{"type":"integer","minimum":0,"maximum":20},"minimumLines":{"type":"integer","minimum":0,"maximum":320},"lineSpacingMm":{"type":"number","minimum":2,"maximum":15}},"required":["mode","policyVersion","linesPerMark","linesPerLeafPart","minimumLines","lineSpacingMm"],"additionalProperties":false},"duration":{"type":"object","properties":{"minutes":{"type":"integer","minimum":1,"maximum":12500},"kind":{"type":"string","const":"estimate"}},"required":["minutes","kind"],"additionalProperties":false},"gradeBoundaries":{"anyOf":[{"type":"object","properties":{"label":{"type":"string","const":"Practice estimate"},"policyVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"referenceVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"thresholds":{"type":"object","properties":{"A*":{"type":"integer","minimum":0,"maximum":9007199254740991},"A":{"type":"integer","minimum":0,"maximum":9007199254740991},"B":{"type":"integer","minimum":0,"maximum":9007199254740991},"C":{"type":"integer","minimum":0,"maximum":9007199254740991},"D":{"type":"integer","minimum":0,"maximum":9007199254740991},"E":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["A*","A","B","C","D","E"],"additionalProperties":false}},"required":["label","policyVersion","referenceVersion","thresholds"],"additionalProperties":false},{"type":"null"}]}},"required":["schemaVersion","paperId","revision","title","profile","questions","writing","duration","gradeBoundaries"],"additionalProperties":false},"inputSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"questionCount":{"type":"integer","minimum":1,"maximum":50},"totalMarks":{"type":"integer","minimum":1,"maximum":5000},"estimatedMinutes":{"type":"integer","minimum":1,"maximum":12500},"questionPaper":{"anyOf":[{"type":"object","properties":{"artifact":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byteLength":{"type":"integer","minimum":5,"maximum":33554432},"mediaType":{"type":"string","const":"application/pdf"}},"required":["assetId","sha256","byteLength","mediaType"],"additionalProperties":false},"layout":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"wingman-paper-layout-v1"},"paperId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"paperRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"inputSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"profile":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"version":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"rendererVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"mathEngineVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"fontSetSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"stylesheetSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"page":{"type":"string","const":"A4"}},"required":["id","version","rendererVersion","mathEngineVersion","fontSetSha256","stylesheetSha256","page"],"additionalProperties":false},"document":{"type":"string","enum":["question-paper","mark-scheme"]},"coordinateSystem":{"type":"string","const":"top-left-mm"},"pageCount":{"type":"integer","minimum":1,"maximum":1000},"totalMarks":{"type":"integer","minimum":1,"maximum":10000},"pages":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"widthMm":{"type":"number","const":210},"heightMm":{"type":"number","const":297}},"required":["page","widthMm","heightMm"],"additionalProperties":false}},"regions":{"maxItems":30000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"page":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"box":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":210},"y":{"type":"number","minimum":0,"maximum":297},"width":{"type":"number","exclusiveMinimum":0,"maximum":210},"height":{"type":"number","exclusiveMinimum":0,"maximum":297}},"required":["x","y","width","height"],"additionalProperties":false},"role":{"type":"string","enum":["question","part","block","figure","allocation","printed-award","answer"]},"occurrenceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"questionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"blockId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"allocationId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"printedAwardId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"answerKind":{"type":"string","enum":["writing-space","table-response"]},"answerCell":{"type":"object","properties":{"rowId":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"columnId":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"}},"required":["rowId","columnId"],"additionalProperties":false},"writingLines":{"type":"integer","minimum":0,"maximum":2000},"fragment":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","page","box","role","occurrenceId","questionId","partId","blockId","allocationId","fragment"],"additionalProperties":false}}},"required":["schemaVersion","paperId","paperRevision","inputSha256","profile","document","coordinateSystem","pageCount","totalMarks","pages","regions"],"additionalProperties":false},"layoutSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["artifact","layout","layoutSha256"],"additionalProperties":false},{"type":"null"}]},"markScheme":{"anyOf":[{"type":"object","properties":{"artifact":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byteLength":{"type":"integer","minimum":5,"maximum":33554432},"mediaType":{"type":"string","const":"application/pdf"}},"required":["assetId","sha256","byteLength","mediaType"],"additionalProperties":false},"layout":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"wingman-paper-layout-v1"},"paperId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"paperRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"inputSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"profile":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"version":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"rendererVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"mathEngineVersion":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"fontSetSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"stylesheetSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"page":{"type":"string","const":"A4"}},"required":["id","version","rendererVersion","mathEngineVersion","fontSetSha256","stylesheetSha256","page"],"additionalProperties":false},"document":{"type":"string","enum":["question-paper","mark-scheme"]},"coordinateSystem":{"type":"string","const":"top-left-mm"},"pageCount":{"type":"integer","minimum":1,"maximum":1000},"totalMarks":{"type":"integer","minimum":1,"maximum":10000},"pages":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"widthMm":{"type":"number","const":210},"heightMm":{"type":"number","const":297}},"required":["page","widthMm","heightMm"],"additionalProperties":false}},"regions":{"maxItems":30000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"page":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"box":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":210},"y":{"type":"number","minimum":0,"maximum":297},"width":{"type":"number","exclusiveMinimum":0,"maximum":210},"height":{"type":"number","exclusiveMinimum":0,"maximum":297}},"required":["x","y","width","height"],"additionalProperties":false},"role":{"type":"string","enum":["question","part","block","figure","allocation","printed-award","answer"]},"occurrenceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"questionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"blockId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"allocationId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"printedAwardId":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},{"type":"null"}]},"answerKind":{"type":"string","enum":["writing-space","table-response"]},"answerCell":{"type":"object","properties":{"rowId":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"},"columnId":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$"}},"required":["rowId","columnId"],"additionalProperties":false},"writingLines":{"type":"integer","minimum":0,"maximum":2000},"fragment":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","page","box","role","occurrenceId","questionId","partId","blockId","allocationId","fragment"],"additionalProperties":false}}},"required":["schemaVersion","paperId","paperRevision","inputSha256","profile","document","coordinateSystem","pageCount","totalMarks","pages","regions"],"additionalProperties":false},"layoutSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["artifact","layout","layoutSha256"],"additionalProperties":false},{"type":"null"}]},"id":{"type":"string"},"title":{"type":"string"},"revision":{"type":"integer"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["definitionVersion","dataSource","request","requestSha256","input","inputSha256","questionCount","totalMarks","estimatedMinutes","questionPaper","markScheme","id","title","revision","createdAt","updatedAt"],"additionalProperties":false},"PaperSummary":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"revision":{"type":"integer"},"questionCount":{"type":"integer"},"totalMarks":{"type":"integer"},"estimatedMinutes":{"type":"integer"},"writingSpace":{"type":"string"},"gradeGuide":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","revision","questionCount","totalMarks","estimatedMinutes","writingSpace","gradeGuide","createdAt","updatedAt"]},"SearchResults":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pin":{"$ref":"#/components/schemas/QuestionPin"},"source":{"type":"object"},"presentation":{"type":["object","null"]},"question":{"type":"object","properties":{"questionId":{"type":"string"},"label":{"type":"string"},"maxMarks":{"type":"integer"},"tags":{"type":"array","items":{"type":"object"}},"difficulty":{"type":["object","null"]}},"required":["questionId","label","maxMarks","tags","difficulty"]},"eligibleModuleProfiles":{"type":"array","items":{"type":"object"}}},"required":["pin","source","presentation","question","eligibleModuleProfiles"]}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]},"ImportValidation":{"type":"object","properties":{"valid":{"const":true},"questions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"awardedMarks":{"type":"integer"},"possibleMarks":{"type":"integer"},"maxMarks":{"type":"integer"},"needsReview":{"type":"boolean"},"issues":{"type":"array","items":{"type":"object"}}},"required":["label","awardedMarks","possibleMarks","maxMarks","needsReview","issues"]}},"totalMarks":{"type":"integer"},"awardedMarks":{"type":"integer"},"possibleMarks":{"type":"integer"},"needsReview":{"type":"boolean"}},"required":["valid","questions","totalMarks","awardedMarks","possibleMarks","needsReview"]}}},"x-wingman-limits":{"key":{"minute":120,"day":10000,"writes":20},"account":{"minute":300,"day":20000,"writes":40}},"externalDocs":{"url":"https://api.wingmanmaths.com/docs"}}