{"openapi":"3.1.0","info":{"title":"Jadiroon Public API","version":"1.0.0"},"servers":[{"url":"/"}],"paths":{"/api/v1/org-units":{"get":{"summary":"List org units (Organizational Structure)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"type":{"type":"string","enum":["ENTITY","SECTOR","AGENCY","BRANCH","GENERAL_ADMIN","ADMIN","SECTION","UNIT"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"function":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"headName":{"anyOf":[{"type":"string"},{"type":"null"}]},"headRole":{"anyOf":[{"type":"string"},{"type":"null"}]},"headcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ssoCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"sortOrder":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","parentId","function","headName","headRole","headcount","ssoCode","status","sortOrder","externalRefs","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an org unit","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.act"],"x-deployment-level":"denied","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"type":{"type":"string","enum":["ENTITY","SECTOR","AGENCY","BRANCH","GENERAL_ADMIN","ADMIN","SECTION","UNIT"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"function":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"headName":{"anyOf":[{"type":"string"},{"type":"null"}]},"headRole":{"anyOf":[{"type":"string"},{"type":"null"}]},"headcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ssoCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"sortOrder":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","parentId","function","headName","headRole","headcount","ssoCode","status","sortOrder","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","enum":["ENTITY","SECTOR","AGENCY","BRANCH","GENERAL_ADMIN","ADMIN","SECTION","UNIT"]},"parent":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"function":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"additionalProperties":false},"headName":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"headRole":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"headcount":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"name":{"type":"object","properties":{"ar":{"type":"string","minLength":1,"maxLength":300},"en":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"required":["ar"],"additionalProperties":false}},"required":["type","name"],"additionalProperties":false}}}}}},"/api/v1/org-units/{id}":{"get":{"summary":"Get an org unit","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.view"],"x-deployment-level":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"type":{"type":"string","enum":["ENTITY","SECTOR","AGENCY","BRANCH","GENERAL_ADMIN","ADMIN","SECTION","UNIT"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"function":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"headName":{"anyOf":[{"type":"string"},{"type":"null"}]},"headRole":{"anyOf":[{"type":"string"},{"type":"null"}]},"headcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ssoCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"sortOrder":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","parentId","function","headName","headRole","headcount","ssoCode","status","sortOrder","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update an org unit (omitted fields unchanged; re-parenting rejects cycles)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"type":{"type":"string","enum":["ENTITY","SECTOR","AGENCY","BRANCH","GENERAL_ADMIN","ADMIN","SECTION","UNIT"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"function":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"headName":{"anyOf":[{"type":"string"},{"type":"null"}]},"headRole":{"anyOf":[{"type":"string"},{"type":"null"}]},"headcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ssoCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"sortOrder":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","parentId","function","headName","headRole","headcount","ssoCode","status","sortOrder","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","enum":["ENTITY","SECTOR","AGENCY","BRANCH","GENERAL_ADMIN","ADMIN","SECTION","UNIT"]},"parent":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"function":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"additionalProperties":false},"headName":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"headRole":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"headcount":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"name":{"type":"object","properties":{"ar":{"type":"string","minLength":1,"maxLength":300},"en":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"additionalProperties":false}},"additionalProperties":false}}}}},"delete":{"summary":"Delete a leaf org unit (409 has_children); its positions become unplaced","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/org-units/by-external/{system}/{externalId}":{"put":{"summary":"Upsert an org unit by external id (201 created, 200 updated)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.act"],"x-deployment-level":"denied","parameters":[{"name":"system","in":"path","required":true,"schema":{"type":"string"}},{"name":"externalId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"type":{"type":"string","enum":["ENTITY","SECTOR","AGENCY","BRANCH","GENERAL_ADMIN","ADMIN","SECTION","UNIT"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"function":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"headName":{"anyOf":[{"type":"string"},{"type":"null"}]},"headRole":{"anyOf":[{"type":"string"},{"type":"null"}]},"headcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ssoCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"sortOrder":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","parentId","function","headName","headRole","headcount","ssoCode","status","sortOrder","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"201":{"description":"Created (no unit was linked to this external id)","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"type":{"type":"string","enum":["ENTITY","SECTOR","AGENCY","BRANCH","GENERAL_ADMIN","ADMIN","SECTION","UNIT"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"function":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"headName":{"anyOf":[{"type":"string"},{"type":"null"}]},"headRole":{"anyOf":[{"type":"string"},{"type":"null"}]},"headcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ssoCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"sortOrder":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","parentId","function","headName","headRole","headcount","ssoCode","status","sortOrder","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","enum":["ENTITY","SECTOR","AGENCY","BRANCH","GENERAL_ADMIN","ADMIN","SECTION","UNIT"]},"parent":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"function":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"additionalProperties":false},"headName":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"headRole":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"headcount":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"name":{"type":"object","properties":{"ar":{"type":"string","minLength":1,"maxLength":300},"en":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"additionalProperties":false}},"additionalProperties":false}}}}}},"/api/v1/pay-scales":{"get":{"summary":"List pay scales with their grades and steps","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.functional.salary"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"kind":{"type":"string","enum":["GENERAL","HEALTH","EDUCATION","MILITARY","CUSTOM"]},"builtIn":{"type":"boolean"},"period":{"type":"string","enum":["MONTHLY","ANNUAL"]},"currency":{"type":"string"},"stepModel":{"type":"string","enum":["COMPUTED","EXPLICIT"]},"active":{"type":"boolean"},"grades":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"baseMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"increment":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stepCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"steps":{"type":"array","items":{"type":"object","properties":{"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"baseAmount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["number","baseAmount"],"additionalProperties":false}}},"required":["id","rank","code","name","baseMin","increment","stepCount","steps"],"additionalProperties":false}},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","kind","builtIn","period","currency","stepModel","active","grades","externalRefs","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/job-descriptions":{"get":{"summary":"List the workspace's job descriptions (pay fields null without structure.functional.salary)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.functional.view","recruitment.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"purpose":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"subSectorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobFamilyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceJobFamilyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mandate":{"anyOf":[{"type":"string","enum":["REGULATORY","EXECUTIVE","INTERNAL"]},{"type":"null"}]},"jobType":{"type":"string","enum":["MANAGERIAL","SUPERVISORY","SPECIALIST","SUPPORT"]},"workLocation":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"qualifications":{"type":"object","properties":{"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"experienceField":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"string"},{"type":"null"}]},"certifications":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["education","specialization","experienceField","yearsExperience","certifications"],"additionalProperties":false},"desiredHeadcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"saudiPriority":{"type":"string","enum":["NONE","PREFER","ONLY"]},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"salaryMin":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Annual band minimum of the default pay grade (SAR), read-only; null without structure.functional.salary"},"salaryMax":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Annual band maximum of the default pay grade (SAR), read-only; null without structure.functional.salary"},"skills":{"type":"object","properties":{"technical":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"requiredLevel":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","slug","name","requiredLevel"],"additionalProperties":false}},"general":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"requiredLevel":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","slug","name","requiredLevel"],"additionalProperties":false}}},"required":["technical","general"],"additionalProperties":false},"sscoCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","purpose","subSectorId","jobFamilyId","workspaceJobFamilyId","mandate","jobType","workLocation","qualifications","desiredHeadcount","saudiPriority","payScaleId","payGradeId","salaryMin","salaryMax","skills","sscoCode","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a job description (pay fields need structure.functional.salary)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.functional.act"],"x-deployment-level":"denied","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"purpose":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"subSectorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobFamilyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceJobFamilyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mandate":{"anyOf":[{"type":"string","enum":["REGULATORY","EXECUTIVE","INTERNAL"]},{"type":"null"}]},"jobType":{"type":"string","enum":["MANAGERIAL","SUPERVISORY","SPECIALIST","SUPPORT"]},"workLocation":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"qualifications":{"type":"object","properties":{"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"experienceField":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"string"},{"type":"null"}]},"certifications":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["education","specialization","experienceField","yearsExperience","certifications"],"additionalProperties":false},"desiredHeadcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"saudiPriority":{"type":"string","enum":["NONE","PREFER","ONLY"]},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"salaryMin":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Annual band minimum of the default pay grade (SAR), read-only; null without structure.functional.salary"},"salaryMax":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Annual band maximum of the default pay grade (SAR), read-only; null without structure.functional.salary"},"skills":{"type":"object","properties":{"technical":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"requiredLevel":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","slug","name","requiredLevel"],"additionalProperties":false}},"general":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"requiredLevel":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","slug","name","requiredLevel"],"additionalProperties":false}}},"required":["technical","general"],"additionalProperties":false},"sscoCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","purpose","subSectorId","jobFamilyId","workspaceJobFamilyId","mandate","jobType","workLocation","qualifications","desiredHeadcount","saudiPriority","payScaleId","payGradeId","salaryMin","salaryMax","skills","sscoCode","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"object","properties":{"ar":{"type":"string","minLength":1,"maxLength":300},"en":{"type":"string","minLength":1,"maxLength":300}},"required":["ar","en"],"additionalProperties":false},"purpose":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"additionalProperties":false},"subSectorId":{"type":"string","minLength":1},"jobFamilyId":{"type":"string","minLength":1},"mandate":{"type":"string","enum":["REGULATORY","EXECUTIVE","INTERNAL"]},"jobType":{"type":"string","enum":["MANAGERIAL","SUPERVISORY","SPECIALIST","SUPPORT"]},"workLocation":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"additionalProperties":false},"qualifications":{"type":"object","properties":{"education":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"experienceField":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"certifications":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"additionalProperties":false},"desiredHeadcount":{"type":"integer","minimum":1,"maximum":9007199254740991},"saudiPriority":{"type":"string","enum":["NONE","PREFER","ONLY"]},"payScale":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"payGrade":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"skills":{"type":"object","properties":{"technical":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"requiredLevel":{"type":"integer","minimum":1,"maximum":5}},"required":["id"],"additionalProperties":false}},"general":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"requiredLevel":{"type":"integer","minimum":1,"maximum":3}},"required":["id"],"additionalProperties":false}}},"additionalProperties":false},"externalRef":{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}},"required":["name","subSectorId","jobFamilyId"],"additionalProperties":false}}}}}},"/api/v1/job-descriptions/{id}":{"get":{"summary":"Get a job description","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.functional.view","recruitment.view"],"x-deployment-level":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"purpose":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"subSectorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobFamilyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceJobFamilyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mandate":{"anyOf":[{"type":"string","enum":["REGULATORY","EXECUTIVE","INTERNAL"]},{"type":"null"}]},"jobType":{"type":"string","enum":["MANAGERIAL","SUPERVISORY","SPECIALIST","SUPPORT"]},"workLocation":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"qualifications":{"type":"object","properties":{"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"experienceField":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"string"},{"type":"null"}]},"certifications":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["education","specialization","experienceField","yearsExperience","certifications"],"additionalProperties":false},"desiredHeadcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"saudiPriority":{"type":"string","enum":["NONE","PREFER","ONLY"]},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"salaryMin":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Annual band minimum of the default pay grade (SAR), read-only; null without structure.functional.salary"},"salaryMax":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Annual band maximum of the default pay grade (SAR), read-only; null without structure.functional.salary"},"skills":{"type":"object","properties":{"technical":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"requiredLevel":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","slug","name","requiredLevel"],"additionalProperties":false}},"general":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"requiredLevel":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","slug","name","requiredLevel"],"additionalProperties":false}}},"required":["technical","general"],"additionalProperties":false},"sscoCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","purpose","subSectorId","jobFamilyId","workspaceJobFamilyId","mandate","jobType","workLocation","qualifications","desiredHeadcount","saudiPriority","payScaleId","payGradeId","salaryMin","salaryMax","skills","sscoCode","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a job description (omitted fields and skill arrays unchanged; a sent array replaces skills within the family instance's set; 409 ssco_managed)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.functional.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"purpose":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"subSectorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobFamilyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceJobFamilyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mandate":{"anyOf":[{"type":"string","enum":["REGULATORY","EXECUTIVE","INTERNAL"]},{"type":"null"}]},"jobType":{"type":"string","enum":["MANAGERIAL","SUPERVISORY","SPECIALIST","SUPPORT"]},"workLocation":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"qualifications":{"type":"object","properties":{"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"experienceField":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"string"},{"type":"null"}]},"certifications":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["education","specialization","experienceField","yearsExperience","certifications"],"additionalProperties":false},"desiredHeadcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"saudiPriority":{"type":"string","enum":["NONE","PREFER","ONLY"]},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"salaryMin":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Annual band minimum of the default pay grade (SAR), read-only; null without structure.functional.salary"},"salaryMax":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Annual band maximum of the default pay grade (SAR), read-only; null without structure.functional.salary"},"skills":{"type":"object","properties":{"technical":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"requiredLevel":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","slug","name","requiredLevel"],"additionalProperties":false}},"general":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"requiredLevel":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","slug","name","requiredLevel"],"additionalProperties":false}}},"required":["technical","general"],"additionalProperties":false},"sscoCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","purpose","subSectorId","jobFamilyId","workspaceJobFamilyId","mandate","jobType","workLocation","qualifications","desiredHeadcount","saudiPriority","payScaleId","payGradeId","salaryMin","salaryMax","skills","sscoCode","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"object","properties":{"ar":{"type":"string","minLength":1,"maxLength":300},"en":{"type":"string","minLength":1,"maxLength":300}},"additionalProperties":false},"purpose":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"additionalProperties":false},"subSectorId":{"type":"string","minLength":1},"jobFamilyId":{"type":"string","minLength":1},"mandate":{"type":"string","enum":["REGULATORY","EXECUTIVE","INTERNAL"]},"jobType":{"type":"string","enum":["MANAGERIAL","SUPERVISORY","SPECIALIST","SUPPORT"]},"workLocation":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"additionalProperties":false},"qualifications":{"type":"object","properties":{"education":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"experienceField":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"certifications":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"additionalProperties":false},"desiredHeadcount":{"type":"integer","minimum":1,"maximum":9007199254740991},"saudiPriority":{"type":"string","enum":["NONE","PREFER","ONLY"]},"payScale":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"payGrade":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"skills":{"type":"object","properties":{"technical":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"requiredLevel":{"type":"integer","minimum":1,"maximum":5}},"required":["id"],"additionalProperties":false}},"general":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"requiredLevel":{"type":"integer","minimum":1,"maximum":3}},"required":["id"],"additionalProperties":false}}},"additionalProperties":false},"externalRef":{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}},"additionalProperties":false}}}}}},"/api/v1/job-descriptions/{id}/archive":{"post":{"summary":"Archive a job description (closes hiring on its open positions)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.functional.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"purpose":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"subSectorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobFamilyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceJobFamilyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mandate":{"anyOf":[{"type":"string","enum":["REGULATORY","EXECUTIVE","INTERNAL"]},{"type":"null"}]},"jobType":{"type":"string","enum":["MANAGERIAL","SUPERVISORY","SPECIALIST","SUPPORT"]},"workLocation":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"qualifications":{"type":"object","properties":{"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"experienceField":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"string"},{"type":"null"}]},"certifications":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["education","specialization","experienceField","yearsExperience","certifications"],"additionalProperties":false},"desiredHeadcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"saudiPriority":{"type":"string","enum":["NONE","PREFER","ONLY"]},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"salaryMin":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Annual band minimum of the default pay grade (SAR), read-only; null without structure.functional.salary"},"salaryMax":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Annual band maximum of the default pay grade (SAR), read-only; null without structure.functional.salary"},"skills":{"type":"object","properties":{"technical":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"requiredLevel":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","slug","name","requiredLevel"],"additionalProperties":false}},"general":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"requiredLevel":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","slug","name","requiredLevel"],"additionalProperties":false}}},"required":["technical","general"],"additionalProperties":false},"sscoCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","purpose","subSectorId","jobFamilyId","workspaceJobFamilyId","mandate","jobType","workLocation","qualifications","desiredHeadcount","saudiPriority","payScaleId","payGradeId","salaryMin","salaryMax","skills","sscoCode","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/job-descriptions/{id}/unarchive":{"post":{"summary":"Restore an archived job description","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.functional.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"purpose":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"subSectorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobFamilyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceJobFamilyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mandate":{"anyOf":[{"type":"string","enum":["REGULATORY","EXECUTIVE","INTERNAL"]},{"type":"null"}]},"jobType":{"type":"string","enum":["MANAGERIAL","SUPERVISORY","SPECIALIST","SUPPORT"]},"workLocation":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"qualifications":{"type":"object","properties":{"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"experienceField":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"string"},{"type":"null"}]},"certifications":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["education","specialization","experienceField","yearsExperience","certifications"],"additionalProperties":false},"desiredHeadcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"saudiPriority":{"type":"string","enum":["NONE","PREFER","ONLY"]},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"salaryMin":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Annual band minimum of the default pay grade (SAR), read-only; null without structure.functional.salary"},"salaryMax":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Annual band maximum of the default pay grade (SAR), read-only; null without structure.functional.salary"},"skills":{"type":"object","properties":{"technical":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"requiredLevel":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","slug","name","requiredLevel"],"additionalProperties":false}},"general":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"requiredLevel":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","slug","name","requiredLevel"],"additionalProperties":false}}},"required":["technical","general"],"additionalProperties":false},"sscoCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","purpose","subSectorId","jobFamilyId","workspaceJobFamilyId","mandate","jobType","workLocation","qualifications","desiredHeadcount","saudiPriority","payScaleId","payGradeId","salaryMin","salaryMax","skills","sscoCode","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/positions":{"get":{"summary":"List positions (pay fields null without structure.functional.salary)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"jobDescriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"orgUnitId":{"anyOf":[{"type":"string"},{"type":"null"}]},"capacity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"measurementMode":{"type":"string","enum":["SPECIALIZED","ROUTINE"]},"hiringStatus":{"type":"string","enum":["CLOSED","OPEN"]},"hiringPathway":{"anyOf":[{"type":"string","enum":["INTERNAL_ONLY","INTERNAL_FIRST","EXTERNAL"]},{"type":"null"}]},"hiringOpenedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"posting":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payStepNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"null without structure.functional.salary"},"baseSalary":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Computed base pay at the step, in payPeriod units (SAR); null without structure.functional.salary"},"payPeriod":{"anyOf":[{"type":"string","enum":["MONTHLY","ANNUAL"]},{"type":"null"}],"description":"null without structure.functional.salary"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","jobDescriptionId","orgUnitId","capacity","measurementMode","hiringStatus","hiringPathway","hiringOpenedAt","externalAt","posting","payScaleId","payGradeId","payStepNumber","baseSalary","payPeriod","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a position (pay fields need structure.functional.salary)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.act"],"x-deployment-level":"denied","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"jobDescriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"orgUnitId":{"anyOf":[{"type":"string"},{"type":"null"}]},"capacity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"measurementMode":{"type":"string","enum":["SPECIALIZED","ROUTINE"]},"hiringStatus":{"type":"string","enum":["CLOSED","OPEN"]},"hiringPathway":{"anyOf":[{"type":"string","enum":["INTERNAL_ONLY","INTERNAL_FIRST","EXTERNAL"]},{"type":"null"}]},"hiringOpenedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"posting":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payStepNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"null without structure.functional.salary"},"baseSalary":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Computed base pay at the step, in payPeriod units (SAR); null without structure.functional.salary"},"payPeriod":{"anyOf":[{"type":"string","enum":["MONTHLY","ANNUAL"]},{"type":"null"}],"description":"null without structure.functional.salary"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","jobDescriptionId","orgUnitId","capacity","measurementMode","hiringStatus","hiringPathway","hiringOpenedAt","externalAt","posting","payScaleId","payGradeId","payStepNumber","baseSalary","payPeriod","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"additionalProperties":false},"jobDescription":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},"orgUnit":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"capacity":{"type":"integer","minimum":1,"maximum":9007199254740991},"payScale":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"payGrade":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"payStepNumber":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]}},"required":["jobDescription"],"additionalProperties":false}}}}}},"/api/v1/positions/{id}":{"get":{"summary":"Get a position","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.view"],"x-deployment-level":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"jobDescriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"orgUnitId":{"anyOf":[{"type":"string"},{"type":"null"}]},"capacity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"measurementMode":{"type":"string","enum":["SPECIALIZED","ROUTINE"]},"hiringStatus":{"type":"string","enum":["CLOSED","OPEN"]},"hiringPathway":{"anyOf":[{"type":"string","enum":["INTERNAL_ONLY","INTERNAL_FIRST","EXTERNAL"]},{"type":"null"}]},"hiringOpenedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"posting":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payStepNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"null without structure.functional.salary"},"baseSalary":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Computed base pay at the step, in payPeriod units (SAR); null without structure.functional.salary"},"payPeriod":{"anyOf":[{"type":"string","enum":["MONTHLY","ANNUAL"]},{"type":"null"}],"description":"null without structure.functional.salary"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","jobDescriptionId","orgUnitId","capacity","measurementMode","hiringStatus","hiringPathway","hiringOpenedAt","externalAt","posting","payScaleId","payGradeId","payStepNumber","baseSalary","payPeriod","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a position (omitted fields unchanged; hiring state is read-only)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"jobDescriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"orgUnitId":{"anyOf":[{"type":"string"},{"type":"null"}]},"capacity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"measurementMode":{"type":"string","enum":["SPECIALIZED","ROUTINE"]},"hiringStatus":{"type":"string","enum":["CLOSED","OPEN"]},"hiringPathway":{"anyOf":[{"type":"string","enum":["INTERNAL_ONLY","INTERNAL_FIRST","EXTERNAL"]},{"type":"null"}]},"hiringOpenedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"posting":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payStepNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"null without structure.functional.salary"},"baseSalary":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Computed base pay at the step, in payPeriod units (SAR); null without structure.functional.salary"},"payPeriod":{"anyOf":[{"type":"string","enum":["MONTHLY","ANNUAL"]},{"type":"null"}],"description":"null without structure.functional.salary"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","jobDescriptionId","orgUnitId","capacity","measurementMode","hiringStatus","hiringPathway","hiringOpenedAt","externalAt","posting","payScaleId","payGradeId","payStepNumber","baseSalary","payPeriod","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"additionalProperties":false},"jobDescription":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},"orgUnit":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"capacity":{"type":"integer","minimum":1,"maximum":9007199254740991},"payScale":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"payGrade":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"payStepNumber":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]}},"additionalProperties":false}}}}},"delete":{"summary":"Delete a position (409 has_people, 409 has_openings)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/positions/{id}/archive":{"post":{"summary":"Archive a position (closes its hiring and open openings)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"jobDescriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"orgUnitId":{"anyOf":[{"type":"string"},{"type":"null"}]},"capacity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"measurementMode":{"type":"string","enum":["SPECIALIZED","ROUTINE"]},"hiringStatus":{"type":"string","enum":["CLOSED","OPEN"]},"hiringPathway":{"anyOf":[{"type":"string","enum":["INTERNAL_ONLY","INTERNAL_FIRST","EXTERNAL"]},{"type":"null"}]},"hiringOpenedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"posting":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payStepNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"null without structure.functional.salary"},"baseSalary":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Computed base pay at the step, in payPeriod units (SAR); null without structure.functional.salary"},"payPeriod":{"anyOf":[{"type":"string","enum":["MONTHLY","ANNUAL"]},{"type":"null"}],"description":"null without structure.functional.salary"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","jobDescriptionId","orgUnitId","capacity","measurementMode","hiringStatus","hiringPathway","hiringOpenedAt","externalAt","posting","payScaleId","payGradeId","payStepNumber","baseSalary","payPeriod","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/positions/by-external/{system}/{externalId}":{"put":{"summary":"Upsert a position by external id (201 created, 200 updated)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.act"],"x-deployment-level":"denied","parameters":[{"name":"system","in":"path","required":true,"schema":{"type":"string"}},{"name":"externalId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"jobDescriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"orgUnitId":{"anyOf":[{"type":"string"},{"type":"null"}]},"capacity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"measurementMode":{"type":"string","enum":["SPECIALIZED","ROUTINE"]},"hiringStatus":{"type":"string","enum":["CLOSED","OPEN"]},"hiringPathway":{"anyOf":[{"type":"string","enum":["INTERNAL_ONLY","INTERNAL_FIRST","EXTERNAL"]},{"type":"null"}]},"hiringOpenedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"posting":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payStepNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"null without structure.functional.salary"},"baseSalary":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Computed base pay at the step, in payPeriod units (SAR); null without structure.functional.salary"},"payPeriod":{"anyOf":[{"type":"string","enum":["MONTHLY","ANNUAL"]},{"type":"null"}],"description":"null without structure.functional.salary"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","jobDescriptionId","orgUnitId","capacity","measurementMode","hiringStatus","hiringPathway","hiringOpenedAt","externalAt","posting","payScaleId","payGradeId","payStepNumber","baseSalary","payPeriod","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"201":{"description":"Created (no position was linked to this external id)","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"jobDescriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"orgUnitId":{"anyOf":[{"type":"string"},{"type":"null"}]},"capacity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"measurementMode":{"type":"string","enum":["SPECIALIZED","ROUTINE"]},"hiringStatus":{"type":"string","enum":["CLOSED","OPEN"]},"hiringPathway":{"anyOf":[{"type":"string","enum":["INTERNAL_ONLY","INTERNAL_FIRST","EXTERNAL"]},{"type":"null"}]},"hiringOpenedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"posting":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payStepNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"null without structure.functional.salary"},"baseSalary":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Computed base pay at the step, in payPeriod units (SAR); null without structure.functional.salary"},"payPeriod":{"anyOf":[{"type":"string","enum":["MONTHLY","ANNUAL"]},{"type":"null"}],"description":"null without structure.functional.salary"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","jobDescriptionId","orgUnitId","capacity","measurementMode","hiringStatus","hiringPathway","hiringOpenedAt","externalAt","posting","payScaleId","payGradeId","payStepNumber","baseSalary","payPeriod","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"additionalProperties":false},"jobDescription":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},"orgUnit":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"capacity":{"type":"integer","minimum":1,"maximum":9007199254740991},"payScale":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"payGrade":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"payStepNumber":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]}},"additionalProperties":false}}}}}},"/api/v1/sectors":{"get":{"summary":"List the workspace's sectors (its operating sector and the sectors it owns)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.functional.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only, and required for them: the workspace whose view to read. Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","name","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/sub-sectors":{"get":{"summary":"List the sub-sectors selected in the workspace's Functional Structure","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.functional.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only, and required for them: the workspace whose view to read. Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"sectorId":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"sortOrder":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","sectorId","name","sortOrder","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/job-families":{"get":{"summary":"List the job families the workspace uses, with its instances (mandate, sub-sectors, skills)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.functional.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only, and required for them: the workspace whose view to read. Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"instances":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"mandate":{"type":"string","enum":["REGULATORY","EXECUTIVE","INTERNAL"]},"subSectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sortOrder":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","sortOrder"],"additionalProperties":false}},"skills":{"type":"object","properties":{"technical":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false}},"required":["id","slug","name"],"additionalProperties":false}},"general":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false}},"required":["id","slug","name"],"additionalProperties":false}}},"required":["technical","general"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","mandate","subSectors","skills","createdAt","updatedAt"],"additionalProperties":false}},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","name","archivedAt","instances","externalRefs","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/job-families/{jobFamilyId}":{"get":{"summary":"Get a job family the workspace uses","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.functional.view"],"x-deployment-level":"read","parameters":[{"name":"jobFamilyId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only, and required for them: the workspace whose view to read. Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"instances":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"mandate":{"type":"string","enum":["REGULATORY","EXECUTIVE","INTERNAL"]},"subSectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sortOrder":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","sortOrder"],"additionalProperties":false}},"skills":{"type":"object","properties":{"technical":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false}},"required":["id","slug","name"],"additionalProperties":false}},"general":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false}},"required":["id","slug","name"],"additionalProperties":false}}},"required":["technical","general"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","mandate","subSectors","skills","createdAt","updatedAt"],"additionalProperties":false}},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","name","archivedAt","instances","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/employees":{"get":{"summary":"List employees (current and former)","tags":["employee-file"],"security":[{"bearer":[]}],"x-permission":["people.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"status":{"type":"string","enum":["EMPLOYEE","FORMER_EMPLOYEE"]},"employeeNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"managerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentPositionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"managementLevel":{"anyOf":[{"type":"string","enum":["SENIOR_MANAGEMENT","INDIVIDUAL_CONTRIBUTOR"]},{"type":"null"}]},"govExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"civilServiceExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"entityExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone","nationality","nationalId","gender","birthDate","yearsExperience","specialization","education","archivedAt","externalRefs","createdAt","updatedAt","status","employeeNumber","startDate","managerId","currentPositionId","managementLevel","govExperienceYears","civilServiceExperienceYears","entityExperienceYears"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an employee","tags":["employee-file"],"security":[{"bearer":[]}],"x-permission":["people.act"],"x-deployment-level":"denied","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"status":{"type":"string","enum":["EMPLOYEE","FORMER_EMPLOYEE"]},"employeeNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"managerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentPositionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"managementLevel":{"anyOf":[{"type":"string","enum":["SENIOR_MANAGEMENT","INDIVIDUAL_CONTRIBUTOR"]},{"type":"null"}]},"govExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"civilServiceExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"entityExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone","nationality","nationalId","gender","birthDate","yearsExperience","specialization","education","archivedAt","externalRefs","createdAt","updatedAt","status","employeeNumber","startDate","managerId","currentPositionId","managementLevel","govExperienceYears","civilServiceExperienceYears","entityExperienceYears"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":200},"lastName":{"type":"string","minLength":1,"maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"education":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"status":{"type":"string","enum":["EMPLOYEE","FORMER_EMPLOYEE"]},"employeeNumber":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"manager":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"currentPosition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"managementLevel":{"anyOf":[{"type":"string","enum":["SENIOR_MANAGEMENT","INDIVIDUAL_CONTRIBUTOR"]},{"type":"null"}]},"govExperienceYears":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"civilServiceExperienceYears":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"entityExperienceYears":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]}},"required":["firstName","lastName"],"additionalProperties":false}}}}}},"/api/v1/employees/{id}":{"get":{"summary":"Get an employee","tags":["employee-file"],"security":[{"bearer":[]}],"x-permission":["people.view"],"x-deployment-level":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"status":{"type":"string","enum":["EMPLOYEE","FORMER_EMPLOYEE"]},"employeeNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"managerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentPositionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"managementLevel":{"anyOf":[{"type":"string","enum":["SENIOR_MANAGEMENT","INDIVIDUAL_CONTRIBUTOR"]},{"type":"null"}]},"govExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"civilServiceExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"entityExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone","nationality","nationalId","gender","birthDate","yearsExperience","specialization","education","archivedAt","externalRefs","createdAt","updatedAt","status","employeeNumber","startDate","managerId","currentPositionId","managementLevel","govExperienceYears","civilServiceExperienceYears","entityExperienceYears"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update an employee (omitted fields unchanged)","tags":["employee-file"],"security":[{"bearer":[]}],"x-permission":["people.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"status":{"type":"string","enum":["EMPLOYEE","FORMER_EMPLOYEE"]},"employeeNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"managerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentPositionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"managementLevel":{"anyOf":[{"type":"string","enum":["SENIOR_MANAGEMENT","INDIVIDUAL_CONTRIBUTOR"]},{"type":"null"}]},"govExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"civilServiceExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"entityExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone","nationality","nationalId","gender","birthDate","yearsExperience","specialization","education","archivedAt","externalRefs","createdAt","updatedAt","status","employeeNumber","startDate","managerId","currentPositionId","managementLevel","govExperienceYears","civilServiceExperienceYears","entityExperienceYears"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":200},"lastName":{"type":"string","minLength":1,"maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"education":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"status":{"type":"string","enum":["EMPLOYEE","FORMER_EMPLOYEE"]},"employeeNumber":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"manager":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"currentPosition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"managementLevel":{"anyOf":[{"type":"string","enum":["SENIOR_MANAGEMENT","INDIVIDUAL_CONTRIBUTOR"]},{"type":"null"}]},"govExperienceYears":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"civilServiceExperienceYears":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"entityExperienceYears":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]}},"additionalProperties":false}}}}},"delete":{"summary":"Offboard an employee (status becomes FORMER_EMPLOYEE; the record stays)","tags":["employee-file"],"security":[{"bearer":[]}],"x-permission":["people.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"status":{"type":"string","enum":["EMPLOYEE","FORMER_EMPLOYEE"]},"employeeNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"managerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentPositionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"managementLevel":{"anyOf":[{"type":"string","enum":["SENIOR_MANAGEMENT","INDIVIDUAL_CONTRIBUTOR"]},{"type":"null"}]},"govExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"civilServiceExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"entityExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone","nationality","nationalId","gender","birthDate","yearsExperience","specialization","education","archivedAt","externalRefs","createdAt","updatedAt","status","employeeNumber","startDate","managerId","currentPositionId","managementLevel","govExperienceYears","civilServiceExperienceYears","entityExperienceYears"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/employees/{id}/archive":{"post":{"summary":"Archive an employee","tags":["employee-file"],"security":[{"bearer":[]}],"x-permission":["people.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"status":{"type":"string","enum":["EMPLOYEE","FORMER_EMPLOYEE"]},"employeeNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"managerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentPositionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"managementLevel":{"anyOf":[{"type":"string","enum":["SENIOR_MANAGEMENT","INDIVIDUAL_CONTRIBUTOR"]},{"type":"null"}]},"govExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"civilServiceExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"entityExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone","nationality","nationalId","gender","birthDate","yearsExperience","specialization","education","archivedAt","externalRefs","createdAt","updatedAt","status","employeeNumber","startDate","managerId","currentPositionId","managementLevel","govExperienceYears","civilServiceExperienceYears","entityExperienceYears"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/employees/by-external/{system}/{externalId}":{"put":{"summary":"Upsert an employee by external id (201 created, 200 updated)","tags":["employee-file"],"security":[{"bearer":[]}],"x-permission":["people.act"],"x-deployment-level":"denied","parameters":[{"name":"system","in":"path","required":true,"schema":{"type":"string"}},{"name":"externalId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"status":{"type":"string","enum":["EMPLOYEE","FORMER_EMPLOYEE"]},"employeeNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"managerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentPositionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"managementLevel":{"anyOf":[{"type":"string","enum":["SENIOR_MANAGEMENT","INDIVIDUAL_CONTRIBUTOR"]},{"type":"null"}]},"govExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"civilServiceExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"entityExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone","nationality","nationalId","gender","birthDate","yearsExperience","specialization","education","archivedAt","externalRefs","createdAt","updatedAt","status","employeeNumber","startDate","managerId","currentPositionId","managementLevel","govExperienceYears","civilServiceExperienceYears","entityExperienceYears"],"additionalProperties":false}}}},"201":{"description":"Created (no employee was linked to this external id)","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"status":{"type":"string","enum":["EMPLOYEE","FORMER_EMPLOYEE"]},"employeeNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"managerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentPositionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"managementLevel":{"anyOf":[{"type":"string","enum":["SENIOR_MANAGEMENT","INDIVIDUAL_CONTRIBUTOR"]},{"type":"null"}]},"govExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"civilServiceExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"entityExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone","nationality","nationalId","gender","birthDate","yearsExperience","specialization","education","archivedAt","externalRefs","createdAt","updatedAt","status","employeeNumber","startDate","managerId","currentPositionId","managementLevel","govExperienceYears","civilServiceExperienceYears","entityExperienceYears"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":200},"lastName":{"type":"string","minLength":1,"maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"education":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"status":{"type":"string","enum":["EMPLOYEE","FORMER_EMPLOYEE"]},"employeeNumber":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"manager":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"currentPosition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"managementLevel":{"anyOf":[{"type":"string","enum":["SENIOR_MANAGEMENT","INDIVIDUAL_CONTRIBUTOR"]},{"type":"null"}]},"govExperienceYears":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"civilServiceExperienceYears":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"entityExperienceYears":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]}},"additionalProperties":false}}}}}},"/api/v1/candidates":{"get":{"summary":"List candidates (contact fields masked without recruitment.candidate.contact)","tags":["registration"],"security":[{"bearer":[]}],"x-permission":["recruitment.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"linkedinUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"portfolioUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasCv":{"type":"boolean"}},"required":["id","firstName","lastName","email","phone","nationality","nationalId","gender","birthDate","yearsExperience","specialization","education","archivedAt","externalRefs","createdAt","updatedAt","linkedinUrl","portfolioUrl","hasCv"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a candidate (email/phone/nationalId need recruitment.candidate.contact)","tags":["registration"],"security":[{"bearer":[]}],"x-permission":["recruitment.act"],"x-deployment-level":"denied","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"linkedinUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"portfolioUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasCv":{"type":"boolean"}},"required":["id","firstName","lastName","email","phone","nationality","nationalId","gender","birthDate","yearsExperience","specialization","education","archivedAt","externalRefs","createdAt","updatedAt","linkedinUrl","portfolioUrl","hasCv"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":200},"lastName":{"type":"string","minLength":1,"maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"education":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"linkedinUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"portfolioUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]}},"required":["firstName","lastName"],"additionalProperties":false}}}}}},"/api/v1/candidates/{id}":{"get":{"summary":"Get a candidate","tags":["registration"],"security":[{"bearer":[]}],"x-permission":["recruitment.view"],"x-deployment-level":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"linkedinUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"portfolioUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasCv":{"type":"boolean"}},"required":["id","firstName","lastName","email","phone","nationality","nationalId","gender","birthDate","yearsExperience","specialization","education","archivedAt","externalRefs","createdAt","updatedAt","linkedinUrl","portfolioUrl","hasCv"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a candidate's profile (contact fields need recruitment.candidate.contact)","tags":["registration"],"security":[{"bearer":[]}],"x-permission":["recruitment.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"linkedinUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"portfolioUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasCv":{"type":"boolean"}},"required":["id","firstName","lastName","email","phone","nationality","nationalId","gender","birthDate","yearsExperience","specialization","education","archivedAt","externalRefs","createdAt","updatedAt","linkedinUrl","portfolioUrl","hasCv"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":200},"lastName":{"type":"string","minLength":1,"maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"education":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"linkedinUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"portfolioUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]}},"additionalProperties":false}}}}}},"/api/v1/candidates/{id}/cv":{"get":{"summary":"Download a candidate's CV (streamed; 404 when none; also needs recruitment.candidate.contact)","tags":["registration"],"security":[{"bearer":[]}],"x-permission":["recruitment.view"],"x-deployment-level":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","description":"The CV file"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/openings":{"get":{"summary":"List openings (hiring rounds on seats)","tags":["openings"],"security":[{"bearer":[]}],"x-permission":["recruitment.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string"}},{"name":"positionId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["OPEN","FILLED","CLOSED"]}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"positionId":{"type":"string"},"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"status":{"type":"string","enum":["OPEN","FILLED","CLOSED"]},"hiringPathway":{"anyOf":[{"type":"string","enum":["INTERNAL_ONLY","INTERNAL_FIRST","EXTERNAL"]},{"type":"null"}]},"externalAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"type":"string"},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","positionId","title","status","hiringPathway","externalAt","openedAt","closedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Open a position for hiring (409 already_open when it has an OPEN opening)","tags":["openings"],"security":[{"bearer":[]}],"x-permission":["recruitment.hiring.open"],"x-deployment-level":"denied","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"positionId":{"type":"string"},"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"status":{"type":"string","enum":["OPEN","FILLED","CLOSED"]},"hiringPathway":{"anyOf":[{"type":"string","enum":["INTERNAL_ONLY","INTERNAL_FIRST","EXTERNAL"]},{"type":"null"}]},"externalAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"type":"string"},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","positionId","title","status","hiringPathway","externalAt","openedAt","closedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"position":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},"hiringPathway":{"type":"string","enum":["INTERNAL_ONLY","INTERNAL_FIRST","EXTERNAL"]},"posting":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"additionalProperties":false}},"required":["position"],"additionalProperties":false}}}}}},"/api/v1/openings/{id}":{"get":{"summary":"Get an opening","tags":["openings"],"security":[{"bearer":[]}],"x-permission":["recruitment.view"],"x-deployment-level":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"positionId":{"type":"string"},"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"status":{"type":"string","enum":["OPEN","FILLED","CLOSED"]},"hiringPathway":{"anyOf":[{"type":"string","enum":["INTERNAL_ONLY","INTERNAL_FIRST","EXTERNAL"]},{"type":"null"}]},"externalAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"type":"string"},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","positionId","title","status","hiringPathway","externalAt","openedAt","closedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/openings/{id}/close":{"post":{"summary":"Close an opening (closes hiring on its position; no change when it is not OPEN)","tags":["openings"],"security":[{"bearer":[]}],"x-permission":["recruitment.hiring.open"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"positionId":{"type":"string"},"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"status":{"type":"string","enum":["OPEN","FILLED","CLOSED"]},"hiringPathway":{"anyOf":[{"type":"string","enum":["INTERNAL_ONLY","INTERNAL_FIRST","EXTERNAL"]},{"type":"null"}]},"externalAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"type":"string"},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","positionId","title","status","hiringPathway","externalAt","openedAt","closedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/applications":{"get":{"summary":"List applications (candidate contact masked without recruitment.candidate.contact)","tags":["hiring"],"security":[{"bearer":[]}],"x-permission":["recruitment.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string"}},{"name":"openingId","in":"query","required":false,"schema":{"type":"string"}},{"name":"candidateId","in":"query","required":false,"schema":{"type":"string"}},{"name":"stage","in":"query","required":false,"schema":{"type":"string","enum":["APPLIED","SCREENED","ASSESSMENT","INTERVIEWING","OFFERED","HIRED","REJECTED"]}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"openingId":{"type":"string"},"positionId":{"type":"string"},"personId":{"type":"string"},"candidate":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone"],"additionalProperties":false},"stage":{"type":"string","enum":["APPLIED","SCREENED","ASSESSMENT","INTERVIEWING","OFFERED","HIRED","REJECTED"]},"screening":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","DONE","FAILED","QUOTA_EXCEEDED"]},"score":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["status","score"],"additionalProperties":false},"rejectionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasOffer":{"type":"boolean"},"appliedAt":{"type":"string"},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","openingId","positionId","personId","candidate","stage","screening","rejectionReason","hasOffer","appliedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Add a candidate to an opening (409 already_applied)","tags":["hiring"],"security":[{"bearer":[]}],"x-permission":["recruitment.act"],"x-deployment-level":"denied","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"openingId":{"type":"string"},"positionId":{"type":"string"},"personId":{"type":"string"},"candidate":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone"],"additionalProperties":false},"stage":{"type":"string","enum":["APPLIED","SCREENED","ASSESSMENT","INTERVIEWING","OFFERED","HIRED","REJECTED"]},"screening":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","DONE","FAILED","QUOTA_EXCEEDED"]},"score":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["status","score"],"additionalProperties":false},"rejectionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasOffer":{"type":"boolean"},"appliedAt":{"type":"string"},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","openingId","positionId","personId","candidate","stage","screening","rejectionReason","hasOffer","appliedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"openingId":{"type":"string","minLength":1},"candidate":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]}},"required":["openingId","candidate"],"additionalProperties":false}}}}}},"/api/v1/applications/{id}":{"get":{"summary":"Get an application","tags":["hiring"],"security":[{"bearer":[]}],"x-permission":["recruitment.view"],"x-deployment-level":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"openingId":{"type":"string"},"positionId":{"type":"string"},"personId":{"type":"string"},"candidate":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone"],"additionalProperties":false},"stage":{"type":"string","enum":["APPLIED","SCREENED","ASSESSMENT","INTERVIEWING","OFFERED","HIRED","REJECTED"]},"screening":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","DONE","FAILED","QUOTA_EXCEEDED"]},"score":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["status","score"],"additionalProperties":false},"rejectionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasOffer":{"type":"boolean"},"appliedAt":{"type":"string"},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","openingId","positionId","personId","candidate","stage","screening","rejectionReason","hasOffer","appliedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/applications/{id}/stage":{"post":{"summary":"Move an application to a stage (OFFERED needs recruitment.offer.issue)","tags":["hiring"],"security":[{"bearer":[]}],"x-permission":["recruitment.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"openingId":{"type":"string"},"positionId":{"type":"string"},"personId":{"type":"string"},"candidate":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone"],"additionalProperties":false},"stage":{"type":"string","enum":["APPLIED","SCREENED","ASSESSMENT","INTERVIEWING","OFFERED","HIRED","REJECTED"]},"screening":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","DONE","FAILED","QUOTA_EXCEEDED"]},"score":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["status","score"],"additionalProperties":false},"rejectionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasOffer":{"type":"boolean"},"appliedAt":{"type":"string"},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","openingId","positionId","personId","candidate","stage","screening","rejectionReason","hasOffer","appliedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"stage":{"type":"string","enum":["APPLIED","SCREENED","INTERVIEWING","OFFERED"]}},"required":["stage"],"additionalProperties":false}}}}}},"/api/v1/applications/{id}/reject":{"post":{"summary":"Reject an application, with an optional reason","tags":["hiring"],"security":[{"bearer":[]}],"x-permission":["recruitment.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"openingId":{"type":"string"},"positionId":{"type":"string"},"personId":{"type":"string"},"candidate":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone"],"additionalProperties":false},"stage":{"type":"string","enum":["APPLIED","SCREENED","ASSESSMENT","INTERVIEWING","OFFERED","HIRED","REJECTED"]},"screening":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","DONE","FAILED","QUOTA_EXCEEDED"]},"score":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["status","score"],"additionalProperties":false},"rejectionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasOffer":{"type":"boolean"},"appliedAt":{"type":"string"},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","openingId","positionId","personId","candidate","stage","screening","rejectionReason","hasOffer","appliedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","enum":["not-shortlisted","not-saudi-saudization-restricted","withdrew","over-qualified","under-qualified","failed-interview","other"]},"note":{"type":"string","maxLength":1000}},"additionalProperties":false}}}}}},"/api/v1/applications/{id}/hire":{"post":{"summary":"Hire the candidate (needs recruitment.hire and recruitment.candidate.contact); the person becomes an employee","tags":["hiring"],"security":[{"bearer":[]}],"x-permission":["recruitment.hire"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"openingId":{"type":"string"},"positionId":{"type":"string"},"personId":{"type":"string"},"candidate":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone"],"additionalProperties":false},"stage":{"type":"string","enum":["APPLIED","SCREENED","ASSESSMENT","INTERVIEWING","OFFERED","HIRED","REJECTED"]},"screening":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","DONE","FAILED","QUOTA_EXCEEDED"]},"score":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["status","score"],"additionalProperties":false},"rejectionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasOffer":{"type":"boolean"},"appliedAt":{"type":"string"},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","openingId","positionId","personId","candidate","stage","screening","rejectionReason","hasOffer","appliedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"startDate":{"type":"string"},"manager":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]}},"additionalProperties":false}}}}}},"/api/v1/offers":{"get":{"summary":"List offers (applications with an issued offer letter)","tags":["hiring"],"security":[{"bearer":[]}],"x-permission":["recruitment.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"openingId":{"type":"string"},"positionId":{"type":"string"},"personId":{"type":"string"},"templateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"issuedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasFile":{"type":"boolean"},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","applicationId","openingId","positionId","personId","templateId","issuedAt","hasFile","externalRefs","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/offers/{id}":{"get":{"summary":"Get an offer","tags":["hiring"],"security":[{"bearer":[]}],"x-permission":["recruitment.view"],"x-deployment-level":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"openingId":{"type":"string"},"positionId":{"type":"string"},"personId":{"type":"string"},"templateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"issuedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasFile":{"type":"boolean"},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","applicationId","openingId","positionId","personId","templateId","issuedAt","hasFile","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/offers/{id}/file":{"get":{"summary":"Download the offer letter (streamed; 404 when none; also needs recruitment.candidate.contact)","tags":["hiring"],"security":[{"bearer":[]}],"x-permission":["recruitment.view"],"x-deployment-level":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","description":"The offer letter file"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/interviews":{"get":{"summary":"List interviews (person contact masked without recruitment.candidate.contact)","tags":["hiring"],"security":[{"bearer":[]}],"x-permission":["recruitment.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string"}},{"name":"applicationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"personId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["OFFERED","CONFIRMED","COMPLETED","CANCELLED"]}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["OFFERED","CONFIRMED","COMPLETED","CANCELLED"]},"applicationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"personId":{"anyOf":[{"type":"string"},{"type":"null"}]},"person":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone"],"additionalProperties":false},{"type":"null"}]},"offeredSlots":{"type":"array","items":{"type":"string"}},"selectedSlot":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"interviewerIds":{"type":"array","items":{"type":"string"}},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"meetingProvider":{"anyOf":[{"type":"string"},{"type":"null"}]},"reproposalRequestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"authorUserId":{"type":"string"},"rating":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"body":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","authorUserId","rating","body","createdAt"],"additionalProperties":false}},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","applicationId","personId","person","offeredSlots","selectedSlot","durationMinutes","interviewerIds","location","meetingProvider","reproposalRequestedAt","notes","externalRefs","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Offer interview slots for an application (emails the candidate and the panel)","tags":["hiring"],"security":[{"bearer":[]}],"x-permission":["recruitment.act"],"x-deployment-level":"denied","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["OFFERED","CONFIRMED","COMPLETED","CANCELLED"]},"applicationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"personId":{"anyOf":[{"type":"string"},{"type":"null"}]},"person":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone"],"additionalProperties":false},{"type":"null"}]},"offeredSlots":{"type":"array","items":{"type":"string"}},"selectedSlot":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"interviewerIds":{"type":"array","items":{"type":"string"}},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"meetingProvider":{"anyOf":[{"type":"string"},{"type":"null"}]},"reproposalRequestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"authorUserId":{"type":"string"},"rating":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"body":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","authorUserId","rating","body","createdAt"],"additionalProperties":false}},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","applicationId","personId","person","offeredSlots","selectedSlot","durationMinutes","interviewerIds","location","meetingProvider","reproposalRequestedAt","notes","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"applicationId":{"type":"string","minLength":1},"personId":{"type":"string","minLength":1},"offeredSlots":{"minItems":2,"maxItems":20,"type":"array","items":{"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)))$"}},"durationMinutes":{"type":"integer","minimum":15,"maximum":480},"interviewerIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"location":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["offeredSlots","interviewerIds"],"additionalProperties":false}}}}}},"/api/v1/interviews/{id}":{"get":{"summary":"Get an interview","tags":["hiring"],"security":[{"bearer":[]}],"x-permission":["recruitment.view"],"x-deployment-level":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["OFFERED","CONFIRMED","COMPLETED","CANCELLED"]},"applicationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"personId":{"anyOf":[{"type":"string"},{"type":"null"}]},"person":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone"],"additionalProperties":false},{"type":"null"}]},"offeredSlots":{"type":"array","items":{"type":"string"}},"selectedSlot":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"interviewerIds":{"type":"array","items":{"type":"string"}},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"meetingProvider":{"anyOf":[{"type":"string"},{"type":"null"}]},"reproposalRequestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"authorUserId":{"type":"string"},"rating":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"body":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","authorUserId","rating","body","createdAt"],"additionalProperties":false}},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","applicationId","personId","person","offeredSlots","selectedSlot","durationMinutes","interviewerIds","location","meetingProvider","reproposalRequestedAt","notes","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Propose new times (while OFFERED) or cancel ({ status: CANCELLED })","tags":["hiring"],"security":[{"bearer":[]}],"x-permission":["recruitment.act"],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["OFFERED","CONFIRMED","COMPLETED","CANCELLED"]},"applicationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"personId":{"anyOf":[{"type":"string"},{"type":"null"}]},"person":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone"],"additionalProperties":false},{"type":"null"}]},"offeredSlots":{"type":"array","items":{"type":"string"}},"selectedSlot":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"interviewerIds":{"type":"array","items":{"type":"string"}},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"meetingProvider":{"anyOf":[{"type":"string"},{"type":"null"}]},"reproposalRequestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"authorUserId":{"type":"string"},"rating":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"body":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","authorUserId","rating","body","createdAt"],"additionalProperties":false}},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","applicationId","personId","person","offeredSlots","selectedSlot","durationMinutes","interviewerIds","location","meetingProvider","reproposalRequestedAt","notes","externalRefs","createdAt","updatedAt"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","const":"CANCELLED"},"offeredSlots":{"minItems":2,"maxItems":20,"type":"array","items":{"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)))$"}},"durationMinutes":{"type":"integer","minimum":15,"maximum":480},"interviewerIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"location":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"additionalProperties":false}}}}}},"/api/v1/users":{"get":{"summary":"List staff users (read-only)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["users.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"roleId","in":"query","required":false,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"role":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"isWorkspaceAdmin":{"type":"boolean"}},"required":["id","name","isWorkspaceAdmin"],"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["active","disabled"]},"disabledAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"locale":{"type":"string"},"personId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","fullName","email","role","status","disabledAt","locale","personId","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/roles":{"get":{"summary":"List workspace roles with their permission keys (read-only)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["users.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"systemKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"isWorkspaceAdmin":{"type":"boolean"},"dataScope":{"type":"string","enum":["WORKSPACE","REPORTING_LINE"]},"permissions":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","systemKey","isWorkspaceAdmin","dataScope","permissions","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/audit-events":{"get":{"summary":"Audit feed for SIEM, oldest first (updatedSince filters on occurredAt; contact values in changes masked without recruitment.candidate.contact; pay changes and gradeCode dropped without structure.functional.salary)","tags":["platform"],"security":[{"bearer":[]}],"x-permission":["audit.view"],"x-deployment-level":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","integration","system"]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","id","name"],"additionalProperties":false},"target":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","id","label"],"additionalProperties":false},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"ipAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurredAt":{"type":"string"}},"required":["id","workspaceId","action","actor","target","metadata","ipAddress","userAgent","occurredAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/employees/bulk":{"post":{"summary":"Bulk upsert employees by external id: 1-1,000 rows, processed async (Idempotency-Key required)","tags":["employee-file"],"security":[{"bearer":[]}],"x-permission":["people.act"],"x-deployment-level":"denied","responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"jobId":{"type":"string"},"statusUrl":{"type":"string"}},"required":["jobId","statusUrl"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"rows":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":200},"lastName":{"type":"string","minLength":1,"maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"education":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"status":{"type":"string","enum":["EMPLOYEE","FORMER_EMPLOYEE"]},"employeeNumber":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"manager":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"currentPosition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"managementLevel":{"anyOf":[{"type":"string","enum":["SENIOR_MANAGEMENT","INDIVIDUAL_CONTRIBUTOR"]},{"type":"null"}]},"govExperienceYears":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"civilServiceExperienceYears":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"entityExperienceYears":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"system":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["system","externalId"],"additionalProperties":false}}},"required":["rows"],"additionalProperties":false}}}}}},"/api/v1/candidates/bulk":{"post":{"summary":"Bulk upsert candidates (optional https cvUrl; email/phone/nationalId need recruitment.candidate.contact) by external id: 1-1,000 rows, processed async (Idempotency-Key required)","tags":["registration"],"security":[{"bearer":[]}],"x-permission":["recruitment.act"],"x-deployment-level":"denied","responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"jobId":{"type":"string"},"statusUrl":{"type":"string"}},"required":["jobId","statusUrl"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"rows":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":200},"lastName":{"type":"string","minLength":1,"maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":0,"maximum":80},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"education":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"linkedinUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"portfolioUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"system":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128},"cvUrl":{"type":"string","maxLength":2000,"format":"uri"}},"required":["system","externalId"],"additionalProperties":false}}},"required":["rows"],"additionalProperties":false}}}}}},"/api/v1/org-units/bulk":{"post":{"summary":"Bulk upsert org units by external id: 1-1,000 rows, processed async (Idempotency-Key required)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.act"],"x-deployment-level":"denied","responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"jobId":{"type":"string"},"statusUrl":{"type":"string"}},"required":["jobId","statusUrl"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"rows":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["ENTITY","SECTOR","AGENCY","BRANCH","GENERAL_ADMIN","ADMIN","SECTION","UNIT"]},"parent":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"function":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"additionalProperties":false},"headName":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"headRole":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"headcount":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"name":{"type":"object","properties":{"ar":{"type":"string","minLength":1,"maxLength":300},"en":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"additionalProperties":false},"system":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["system","externalId"],"additionalProperties":false}}},"required":["rows"],"additionalProperties":false}}}}}},"/api/v1/positions/bulk":{"post":{"summary":"Bulk upsert positions by external id: 1-1,000 rows, processed async (Idempotency-Key required)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":["structure.org.act"],"x-deployment-level":"denied","responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"jobId":{"type":"string"},"statusUrl":{"type":"string"}},"required":["jobId","statusUrl"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"rows":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"additionalProperties":false},"jobDescription":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},"orgUnit":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"capacity":{"type":"integer","minimum":1,"maximum":9007199254740991},"payScale":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"externalSystem":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalSystem","externalId"],"additionalProperties":false}]},{"type":"null"}]},"payGrade":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"payStepNumber":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"system":{"type":"string","minLength":1,"maxLength":64},"externalId":{"type":"string","minLength":1,"maxLength":128}},"required":["system","externalId"],"additionalProperties":false}}},"required":["rows"],"additionalProperties":false}}}}}},"/api/v1/bulk-jobs/{id}":{"get":{"summary":"Get a bulk job: status, counts and per-row results (only the integration that posted it)","tags":["setup"],"security":[{"bearer":[]}],"x-permission":[],"x-deployment-level":"denied","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["created","updated","failed"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"resource":{"type":"string","enum":["employee","org_unit","position","candidate"]},"status":{"type":"string","enum":["QUEUED","RUNNING","DONE","FAILED"]},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"processed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"succeeded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["created","updated","failed"]},"id":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["index","status"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","resource","status","total","processed","succeeded","failed","createdAt","startedAt","finishedAt","results","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/deleted":{"get":{"summary":"Deletion feed: tombstones for hard-deleted rows (kept 180 days), only for resources the key can read","tags":["platform"],"security":[{"bearer":[]}],"x-permission":[],"x-deployment-level":"read","parameters":[{"name":"since","in":"query","required":false,"schema":{"type":"string"}},{"name":"resource","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"workspaceId","in":"query","required":false,"description":"Deployment-level keys only: narrow to one active workspace (every object carries `workspaceId` for these keys). Ignored for workspace keys.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"resource":{"type":"string"},"id":{"type":"string"},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"deletedAt":{"type":"string"}},"required":["resource","id","externalRefs","deletedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/ping":{"get":{"summary":"Check a key: returns the integration the key belongs to (any valid key, no permission)","tags":["platform"],"security":[{"bearer":[]}],"x-permission":[],"x-deployment-level":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":true},"actor":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"integration"},"integrationId":{"type":"string"},"name":{"type":"string"},"keyPrefix":{"type":"string"}},"required":["kind","integrationId","name","keyPrefix"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"platform"},"platformIntegrationId":{"type":"string"},"name":{"type":"string"},"keyPrefix":{"type":"string"}},"required":["kind","platformIntegrationId","name","keyPrefix"],"additionalProperties":false}]},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's workspace; null for a deployment-level key."}},"required":["ok","actor","workspaceId"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"schemas":{"employee":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"status":{"type":"string","enum":["EMPLOYEE","FORMER_EMPLOYEE"]},"employeeNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"managerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentPositionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"managementLevel":{"anyOf":[{"type":"string","enum":["SENIOR_MANAGEMENT","INDIVIDUAL_CONTRIBUTOR"]},{"type":"null"}]},"govExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"civilServiceExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"entityExperienceYears":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone","nationality","nationalId","gender","birthDate","yearsExperience","specialization","education","archivedAt","externalRefs","createdAt","updatedAt","status","employeeNumber","startDate","managerId","currentPositionId","managementLevel","govExperienceYears","civilServiceExperienceYears","entityExperienceYears"],"additionalProperties":false},"candidate":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}]},"nationalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE"]},{"type":"null"}]},"birthDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"linkedinUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"portfolioUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasCv":{"type":"boolean"}},"required":["id","firstName","lastName","email","phone","nationality","nationalId","gender","birthDate","yearsExperience","specialization","education","archivedAt","externalRefs","createdAt","updatedAt","linkedinUrl","portfolioUrl","hasCv"],"additionalProperties":false},"position":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"jobDescriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"orgUnitId":{"anyOf":[{"type":"string"},{"type":"null"}]},"capacity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"measurementMode":{"type":"string","enum":["SPECIALIZED","ROUTINE"]},"hiringStatus":{"type":"string","enum":["CLOSED","OPEN"]},"hiringPathway":{"anyOf":[{"type":"string","enum":["INTERNAL_ONLY","INTERNAL_FIRST","EXTERNAL"]},{"type":"null"}]},"hiringOpenedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"posting":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payStepNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"null without structure.functional.salary"},"baseSalary":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Computed base pay at the step, in payPeriod units (SAR); null without structure.functional.salary"},"payPeriod":{"anyOf":[{"type":"string","enum":["MONTHLY","ANNUAL"]},{"type":"null"}],"description":"null without structure.functional.salary"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","jobDescriptionId","orgUnitId","capacity","measurementMode","hiringStatus","hiringPathway","hiringOpenedAt","externalAt","posting","payScaleId","payGradeId","payStepNumber","baseSalary","payPeriod","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false},"org_unit":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"type":{"type":"string","enum":["ENTITY","SECTOR","AGENCY","BRANCH","GENERAL_ADMIN","ADMIN","SECTION","UNIT"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"function":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"headName":{"anyOf":[{"type":"string"},{"type":"null"}]},"headRole":{"anyOf":[{"type":"string"},{"type":"null"}]},"headcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ssoCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"sortOrder":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","parentId","function","headName","headRole","headcount","ssoCode","status","sortOrder","externalRefs","createdAt","updatedAt"],"additionalProperties":false},"job_description":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"purpose":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"subSectorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobFamilyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceJobFamilyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mandate":{"anyOf":[{"type":"string","enum":["REGULATORY","EXECUTIVE","INTERNAL"]},{"type":"null"}]},"jobType":{"type":"string","enum":["MANAGERIAL","SUPERVISORY","SPECIALIST","SUPPORT"]},"workLocation":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"qualifications":{"type":"object","properties":{"education":{"anyOf":[{"type":"string"},{"type":"null"}]},"specialization":{"anyOf":[{"type":"string"},{"type":"null"}]},"experienceField":{"anyOf":[{"type":"string"},{"type":"null"}]},"yearsExperience":{"anyOf":[{"type":"string"},{"type":"null"}]},"certifications":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["education","specialization","experienceField","yearsExperience","certifications"],"additionalProperties":false},"desiredHeadcount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"saudiPriority":{"type":"string","enum":["NONE","PREFER","ONLY"]},"payScaleId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"payGradeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"null without structure.functional.salary"},"salaryMin":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Annual band minimum of the default pay grade (SAR), read-only; null without structure.functional.salary"},"salaryMax":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Annual band maximum of the default pay grade (SAR), read-only; null without structure.functional.salary"},"skills":{"type":"object","properties":{"technical":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"requiredLevel":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","slug","name","requiredLevel"],"additionalProperties":false}},"general":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"requiredLevel":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","slug","name","requiredLevel"],"additionalProperties":false}}},"required":["technical","general"],"additionalProperties":false},"sscoCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","purpose","subSectorId","jobFamilyId","workspaceJobFamilyId","mandate","jobType","workLocation","qualifications","desiredHeadcount","saudiPriority","payScaleId","payGradeId","salaryMin","salaryMax","skills","sscoCode","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false},"job_family":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"instances":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"mandate":{"type":"string","enum":["REGULATORY","EXECUTIVE","INTERNAL"]},"subSectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sortOrder":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","sortOrder"],"additionalProperties":false}},"skills":{"type":"object","properties":{"technical":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false}},"required":["id","slug","name"],"additionalProperties":false}},"general":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false}},"required":["id","slug","name"],"additionalProperties":false}}},"required":["technical","general"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","mandate","subSectors","skills","createdAt","updatedAt"],"additionalProperties":false}},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","name","archivedAt","instances","externalRefs","createdAt","updatedAt"],"additionalProperties":false},"sector":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","name","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false},"sub_sector":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"sectorId":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"sortOrder":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","sectorId","name","sortOrder","archivedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false},"pay_scale":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"kind":{"type":"string","enum":["GENERAL","HEALTH","EDUCATION","MILITARY","CUSTOM"]},"builtIn":{"type":"boolean"},"period":{"type":"string","enum":["MONTHLY","ANNUAL"]},"currency":{"type":"string"},"stepModel":{"type":"string","enum":["COMPUTED","EXPLICIT"]},"active":{"type":"boolean"},"grades":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"baseMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"increment":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stepCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"steps":{"type":"array","items":{"type":"object","properties":{"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"baseAmount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["number","baseAmount"],"additionalProperties":false}}},"required":["id","rank","code","name","baseMin","increment","stepCount","steps"],"additionalProperties":false}},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","kind","builtIn","period","currency","stepModel","active","grades","externalRefs","createdAt","updatedAt"],"additionalProperties":false},"opening":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"positionId":{"type":"string"},"title":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"status":{"type":"string","enum":["OPEN","FILLED","CLOSED"]},"hiringPathway":{"anyOf":[{"type":"string","enum":["INTERNAL_ONLY","INTERNAL_FIRST","EXTERNAL"]},{"type":"null"}]},"externalAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"type":"string"},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","positionId","title","status","hiringPathway","externalAt","openedAt","closedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false},"application":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"openingId":{"type":"string"},"positionId":{"type":"string"},"personId":{"type":"string"},"candidate":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone"],"additionalProperties":false},"stage":{"type":"string","enum":["APPLIED","SCREENED","ASSESSMENT","INTERVIEWING","OFFERED","HIRED","REJECTED"]},"screening":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","DONE","FAILED","QUOTA_EXCEEDED"]},"score":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["status","score"],"additionalProperties":false},"rejectionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasOffer":{"type":"boolean"},"appliedAt":{"type":"string"},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","openingId","positionId","personId","candidate","stage","screening","rejectionReason","hasOffer","appliedAt","externalRefs","createdAt","updatedAt"],"additionalProperties":false},"interview":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["OFFERED","CONFIRMED","COMPLETED","CANCELLED"]},"applicationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"personId":{"anyOf":[{"type":"string"},{"type":"null"}]},"person":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","phone"],"additionalProperties":false},{"type":"null"}]},"offeredSlots":{"type":"array","items":{"type":"string"}},"selectedSlot":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"interviewerIds":{"type":"array","items":{"type":"string"}},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"meetingProvider":{"anyOf":[{"type":"string"},{"type":"null"}]},"reproposalRequestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"authorUserId":{"type":"string"},"rating":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"body":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","authorUserId","rating","body","createdAt"],"additionalProperties":false}},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","applicationId","personId","person","offeredSlots","selectedSlot","durationMinutes","interviewerIds","location","meetingProvider","reproposalRequestedAt","notes","externalRefs","createdAt","updatedAt"],"additionalProperties":false},"offer":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"openingId":{"type":"string"},"positionId":{"type":"string"},"personId":{"type":"string"},"templateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"issuedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasFile":{"type":"boolean"},"externalRefs":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"externalId":{"type":"string"}},"required":["system","externalId"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","applicationId","openingId","positionId","personId","templateId","issuedAt","hasFile","externalRefs","createdAt","updatedAt"],"additionalProperties":false},"user":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"role":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"isWorkspaceAdmin":{"type":"boolean"}},"required":["id","name","isWorkspaceAdmin"],"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["active","disabled"]},"disabledAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"locale":{"type":"string"},"personId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","fullName","email","role","status","disabledAt","locale","personId","createdAt","updatedAt"],"additionalProperties":false},"role":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ar":{"anyOf":[{"type":"string"},{"type":"null"}]},"en":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ar","en"],"additionalProperties":false},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"systemKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"isWorkspaceAdmin":{"type":"boolean"},"dataScope":{"type":"string","enum":["WORKSPACE","REPORTING_LINE"]},"permissions":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","systemKey","isWorkspaceAdmin","dataScope","permissions","createdAt","updatedAt"],"additionalProperties":false},"audit_event":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","integration","system"]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","id","name"],"additionalProperties":false},"target":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","id","label"],"additionalProperties":false},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"ipAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurredAt":{"type":"string"}},"required":["id","workspaceId","action","actor","target","metadata","ipAddress","userAgent","occurredAt"],"additionalProperties":false},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","validation_failed","conflict","has_people","has_openings","has_children","unresolved_reference","ssco_managed","idempotency_conflict","rate_limited","too_many_jobs","workspace_inactive","webhook_egress_not_configured","forbidden_host","internal"]},"message":{"type":"string"},"details":{}}}}},"List":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{}},"nextCursor":{"type":["string","null"]}}}}}}