{"openapi":"3.0.3","info":{"title":"Paie API (beta)","version":"1","description":"Read your payroll data, and tell Paie what happened, from your own systems. v1 never breaks: fields, values and routes are only added. Ignore fields you don't know, and read a value you don't know as \"other\".\n\nEvery request sends `Authorization: Bearer paie_live_…`, a key an owner made in Settings, under API keys. Each key can do only what it was allowed, for the companies it was given.\n\nEvery answer carries `X-Request-Id`. Answers within a limit carry `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds); a refusal for the limit adds `Retry-After`. The day resets at midnight in Jamaica.\n\nEvery change sends an `Idempotency-Key` header. A retry with the same key answers what the first call answered and changes nothing; the answer adds `Idempotent-Replayed: true`.\n\nMoney is exact decimal text with its currency, never a float. A calendar day is YYYY-MM-DD with no time zone. Lists answer `{ data, nextCursor }`.\n\nEvery refusal is `{ \"error\": { \"code\", \"message\", \"requestId\" } }`. Switch on `code`; `message` is safe to show."},"servers":[{"url":"https://api.paieday.com","description":"Production"}],"tags":[{"name":"Companies and payrolls","description":"Names, TRN (masked), schedules, next pay date"},{"name":"Employees","description":"Read: details, job, pay rate. Change: add people, update details, change pay from a date"},{"name":"Pay runs and payslips","description":"Run totals and every payslip line"},{"name":"Hours and one-off payments","description":"Add to a run that's still open, from a time clock or POS"},{"name":"Leave","description":"Read leave taken. Add: vacation, sick, unpaid or other leave from an HR system"},{"name":"Leaving","description":"Tell Paie someone is leaving: last day and reason. HR finishes final pay in Paie"},{"name":"Statutory totals","description":"Each month's S01 figures"}],"security":[{"apiKey":[]}],"paths":{"/v1/companies":{"get":{"operationId":"listCompanies","tags":["Companies and payrolls"],"summary":"List companies","description":"The companies this key reaches, in id order.","x-key-needs":"Companies and payrolls: Read","parameters":[{"name":"limit","in":"query","required":false,"description":"How many to answer, 1 to 100. 50 when left out.","schema":{"default":50,"description":"How many to answer, 1 to 100. 50 when left out.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` of the page before.","schema":{"description":"The `nextCursor` of the page before.","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyList"}}}},"400":{"description":"bad_request: The request isn't right: the message says which part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/companies/{companyId}":{"get":{"operationId":"getCompany","tags":["Companies and payrolls"],"summary":"Get a company","description":"One company: its name, TRN (masked), NIS number, currency and address.","x-key-needs":"Companies and payrolls: Read","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/companies/{companyId}/payrolls":{"get":{"operationId":"listPayrolls","tags":["Companies and payrolls"],"summary":"List payrolls","description":"A company's payrolls: how often each pays, its status, its next pay date and how many people are on it.","x-key-needs":"Companies and payrolls: Read","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"limit","in":"query","required":false,"description":"How many to answer, 1 to 100. 50 when left out.","schema":{"default":50,"description":"How many to answer, 1 to 100. 50 when left out.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` of the page before.","schema":{"description":"The `nextCursor` of the page before.","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayrollList"}}}},"400":{"description":"bad_request: The request isn't right: the message says which part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payrolls/{payrollId}":{"get":{"operationId":"getPayroll","tags":["Companies and payrolls"],"summary":"Get a payroll","description":"One payroll, with its next pay date.","x-key-needs":"Companies and payrolls: Read","parameters":[{"name":"payrollId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payroll"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/companies/{companyId}/employees":{"get":{"operationId":"listEmployees","tags":["Employees"],"summary":"List employees","description":"A company's people. Filter by status or by payroll. Never bank details or a TRN.","x-key-needs":"Employees: Read","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"limit","in":"query","required":false,"description":"How many to answer, 1 to 100. 50 when left out.","schema":{"default":50,"description":"How many to answer, 1 to 100. 50 when left out.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` of the page before.","schema":{"description":"The `nextCursor` of the page before.","type":"string","maxLength":200}},{"name":"status","in":"query","required":false,"description":"Only people with this status.","schema":{"description":"Only people with this status.","type":"string","x-extensible-enum":["active","on_leave","suspended","terminated"]}},{"name":"payrollId","in":"query","required":false,"description":"Only people on this payroll.","schema":{"description":"Only people on this payroll.","type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeList"}}}},"400":{"description":"bad_request: The request isn't right: the message says which part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"addEmployee","tags":["Employees"],"summary":"Add an employee","description":"Adds someone new, checked as Add employee checks them, and puts them on a payroll and its open run when you name one. Bank details are added in Paie.","x-key-needs":"Employees: Read and change","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you make for this change, like a UUID, up to 255 characters. Send the same key when you retry it: Paie answers what it answered the first time, for 24 hours, and does nothing again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewHireRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employee"}}}},"400":{"description":"bad_request: The request isn't right: the message says which part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_mismatch: This Idempotency-Key was sent before with a different request. Use a new key for a new request. in_progress: A call with this Idempotency-Key is still running. Try again in a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/employees/{employeeId}":{"get":{"operationId":"getEmployee","tags":["Employees"],"summary":"Get an employee","description":"One person: name, job title, department, pay, the dates they were hired and left, and their payrolls.","x-key-needs":"Employees: Read","parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employee"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateEmployee","tags":["Employees"],"summary":"Update an employee","description":"Changes someone's details, as editing their record does: names, contact details, address, job title and department. Pay has its own call, and bank details stay in Paie.","x-key-needs":"Employees: Read and change","parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you make for this change, like a UUID, up to 255 characters. Send the same key when you retry it: Paie answers what it answered the first time, for 24 hours, and does nothing again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailsRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employee"}}}},"400":{"description":"bad_request: The request isn't right: the message says which part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_mismatch: This Idempotency-Key was sent before with a different request. Use a new key for a new request. in_progress: A call with this Idempotency-Key is still running. Try again in a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payrolls/{payrollId}/runs":{"get":{"operationId":"listRuns","tags":["Pay runs and payslips"],"summary":"List pay runs","description":"A payroll's pay runs, newest first, each with its totals. Filter by the year paid or by status.","x-key-needs":"Pay runs and payslips: Read","parameters":[{"name":"payrollId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"limit","in":"query","required":false,"description":"How many to answer, 1 to 100. 50 when left out.","schema":{"default":50,"description":"How many to answer, 1 to 100. 50 when left out.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` of the page before.","schema":{"description":"The `nextCursor` of the page before.","type":"string","maxLength":200}},{"name":"year","in":"query","required":false,"description":"Only runs paid in this year.","schema":{"description":"Only runs paid in this year.","type":"integer","minimum":2000,"maximum":2100}},{"name":"status","in":"query","required":false,"description":"Only runs with this status.","schema":{"description":"Only runs with this status.","type":"string","x-extensible-enum":["entry","calculated","finalized","closed"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunList"}}}},"400":{"description":"bad_request: The request isn't right: the message says which part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/runs/{runId}":{"get":{"operationId":"getRun","tags":["Pay runs and payslips"],"summary":"Get a pay run","description":"One pay run: its period, pay date, status and totals. Only finalized and closed runs are paid; an open run's figures can still change.","x-key-needs":"Pay runs and payslips: Read","parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/runs/{runId}/payslips":{"get":{"operationId":"listPayslips","tags":["Pay runs and payslips"],"summary":"List payslips","description":"Every payslip in a run, in id order, each with its lines.","x-key-needs":"Pay runs and payslips: Read","parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"limit","in":"query","required":false,"description":"How many to answer, 1 to 100. 50 when left out.","schema":{"default":50,"description":"How many to answer, 1 to 100. 50 when left out.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` of the page before.","schema":{"description":"The `nextCursor` of the page before.","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayslipList"}}}},"400":{"description":"bad_request: The request isn't right: the message says which part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payslips/{payslipId}":{"get":{"operationId":"getPayslip","tags":["Pay runs and payslips"],"summary":"Get a payslip","description":"One person's pay in one run: every line, the deductions, net pay and the employer's contributions.","x-key-needs":"Pay runs and payslips: Read","parameters":[{"name":"payslipId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payslip"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/employees/{employeeId}/leave":{"get":{"operationId":"listLeave","tags":["Leave"],"summary":"List leave","description":"Leave someone took, newest first: the type, the dates, the days and whether it was paid.","x-key-needs":"Leave: Read","parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"limit","in":"query","required":false,"description":"How many to answer, 1 to 100. 50 when left out.","schema":{"default":50,"description":"How many to answer, 1 to 100. 50 when left out.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` of the page before.","schema":{"description":"The `nextCursor` of the page before.","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveList"}}}},"400":{"description":"bad_request: The request isn't right: the message says which part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"addLeave","tags":["Leave"],"summary":"Record leave","description":"Adds leave someone took, checked as Add leave checks it. Leave on days a paid run already covered is put right with a correction in the next run.","x-key-needs":"Leave: Read and add","parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you make for this change, like a UUID, up to 255 characters. Send the same key when you retry it: Paie answers what it answered the first time, for 24 hours, and does nothing again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Leave"}}}},"400":{"description":"bad_request: The request isn't right: the message says which part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_mismatch: This Idempotency-Key was sent before with a different request. Use a new key for a new request. in_progress: A call with this Idempotency-Key is still running. Try again in a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/runs/{runId}/hours":{"post":{"operationId":"addHours","tags":["Hours and one-off payments"],"summary":"Add hours","description":"Sets the hours people worked in a run that is still open, as if typed in Enter hours. Paie splits each week into basic and overtime itself. A calculated run is worked out again for the people sent.","x-key-needs":"Hours and one-off payments: Add to open runs","parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you make for this change, like a UUID, up to 255 characters. Send the same key when you retry it: Paie answers what it answered the first time, for 24 hours, and does nothing again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HoursRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunHours"}}}},"400":{"description":"bad_request: The request isn't right: the message says which part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"run_not_open: The run is paid or closed, so it can't change. Send to the next open run. idempotency_mismatch: This Idempotency-Key was sent before with a different request. Use a new key for a new request. in_progress: A call with this Idempotency-Key is still running. Try again in a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/runs/{runId}/payments":{"post":{"operationId":"addPayments","tags":["Hours and one-off payments"],"summary":"Add one-off payments","description":"Sets what each person is paid on an open special run, such as a bonus or commission run, as typing the amounts on the run does. A regular run is refused: open a special run in Paie for one-off pay.","x-key-needs":"Hours and one-off payments: Add to open runs","parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you make for this change, like a UUID, up to 255 characters. Send the same key when you retry it: Paie answers what it answered the first time, for 24 hours, and does nothing again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentsRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunPayments"}}}},"400":{"description":"bad_request: The request isn't right: the message says which part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"run_not_open: The run is paid or closed, so it can't change. Send to the next open run. idempotency_mismatch: This Idempotency-Key was sent before with a different request. Use a new key for a new request. in_progress: A call with this Idempotency-Key is still running. Try again in a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/employees/{employeeId}/leaving":{"post":{"operationId":"addLeaving","tags":["Leaving"],"summary":"Tell Paie someone is leaving","description":"Marks someone as leaving on their last day, as Mark as left does without final pay. Their runs after it drop them, and HR finishes their final pay, severance, vacation owed and P45 in Paie.","x-key-needs":"Leaving: Tell Paie","parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you make for this change, like a UUID, up to 255 characters. Send the same key when you retry it: Paie answers what it answered the first time, for 24 hours, and does nothing again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeavingRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employee"}}}},"400":{"description":"bad_request: The request isn't right: the message says which part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_mismatch: This Idempotency-Key was sent before with a different request. Use a new key for a new request. in_progress: A call with this Idempotency-Key is still running. Try again in a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/employees/{employeeId}/pay-changes":{"post":{"operationId":"addPayChange","tags":["Employees"],"summary":"Change pay from a date","description":"Sets a new salary or hourly rate from a date, as Change pay does. Paie pays each run by the days on each side of the date.","x-key-needs":"Employees: Read and change","parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"Idempotency-Key","in":"header","required":true,"description":"A key you make for this change, like a UUID, up to 255 characters. Send the same key when you retry it: Paie answers what it answered the first time, for 24 hours, and does nothing again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayChangeRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayChange"}}}},"400":{"description":"bad_request: The request isn't right: the message says which part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"run_not_open: The run is paid or closed, so it can't change. Send to the next open run. idempotency_mismatch: This Idempotency-Key was sent before with a different request. Use a new key for a new request. in_progress: A call with this Idempotency-Key is still running. Try again in a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/companies/{companyId}/statutory/{month}":{"get":{"operationId":"getStatutoryMonth","tags":["Statutory totals"],"summary":"Get a month's S01 figures","description":"A month's S01 figures, struck from the company's paid runs by pay date, and whether the S01 was marked filed.","x-key-needs":"Statutory totals: Read","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"month","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"YYYY-MM."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatutoryMonth"}}}},"401":{"description":"unauthorized: No key, a key Paie doesn't know, or one that was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: The key can't do this (its areas), or the workspace isn't in the API beta. plan_required: The workspace's plan has no API, or, for a change, none that changes things (Scale).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: Not there, or not a company this key reaches. The two read the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"server_error: Something went wrong at Paie. Send support the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key: paie_live_ and 32 letters and digits."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","x-extensible-enum":["bad_request","unauthorized","forbidden","plan_required","not_found","run_not_open","idempotency_mismatch","in_progress","rate_limited","server_error"]},"message":{"type":"string","description":"Plain words, safe to show."},"requestId":{"type":"string","description":"The same as the X-Request-Id header. Send it to Paie support to find this call."}},"required":["code","message","requestId"]}},"required":["error"],"description":"Every refusal, in one shape."},"Address":{"type":"object","properties":{"line1":{"nullable":true,"type":"string"},"line2":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"region":{"nullable":true,"type":"string"},"postalCode":{"nullable":true,"type":"string"},"country":{"nullable":true,"description":"ISO 3166: \"JM\".","type":"string","minLength":2,"maxLength":2}},"required":["line1","line2","city","region","postalCode","country"]},"Company":{"type":"object","properties":{"id":{"type":"string","description":"Starts \"cmp_\". The same for the company for life."},"name":{"type":"string"},"trn":{"nullable":true,"description":"Its TRN with all but the last three digits hidden: \"•••-•••-789\".","type":"string"},"nisNumber":{"nullable":true,"description":"Its NIS employer number.","type":"string"},"currency":{"type":"string","minLength":3,"maxLength":3,"description":"What it pays in: \"JMD\"."},"address":{"$ref":"#/components/schemas/Address"}},"required":["id","name","trn","nisNumber","currency","address"],"description":"A company the key can reach."},"CompanyList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Company"}},"nextCursor":{"nullable":true,"description":"Send as `cursor` for the next page. Null on the last.","type":"string"}},"required":["data","nextCursor"]},"Money":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"Exact, as text: \"184250.00\". Never a float."},"currency":{"type":"string","minLength":3,"maxLength":3,"description":"\"JMD\" or \"USD\"."}},"required":["amount","currency"],"description":"An amount of money."},"Payroll":{"type":"object","properties":{"id":{"type":"string","description":"Starts \"pyr_\"."},"companyId":{"type":"string"},"name":{"type":"string"},"frequency":{"type":"string","x-extensible-enum":["weekly","fortnightly","semi-monthly","monthly"]},"status":{"type":"string","x-extensible-enum":["active","paused","archived"],"description":"Paused and archived payrolls don't run."},"nextPayDate":{"nullable":true,"description":"The open run's pay date, or the next one the schedule gives. Null for a payroll not set up or not running.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"employees":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many people are on it."}},"required":["id","companyId","name","frequency","status","nextPayDate","employees"],"description":"A payroll: a group of people paid on one schedule."},"PayrollList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Payroll"}},"nextCursor":{"nullable":true,"description":"Send as `cursor` for the next page. Null on the last.","type":"string"}},"required":["data","nextCursor"]},"Employee":{"type":"object","properties":{"id":{"type":"string","description":"Starts \"emp_\"."},"companyId":{"type":"string"},"number":{"nullable":true,"description":"The employer's own number.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"firstName":{"type":"string"},"middleInitial":{"nullable":true,"type":"string"},"lastName":{"type":"string"},"status":{"type":"string","x-extensible-enum":["active","on_leave","suspended","terminated"]},"statusSince":{"nullable":true,"description":"When the status took effect.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"jobTitle":{"type":"string"},"department":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Starts \"dep_\"."},"name":{"type":"string"}},"required":["id","name"]},"hiredOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"leftOn":{"nullable":true,"description":"Their last day, once they've left.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"payrollIds":{"type":"array","items":{"type":"string"},"description":"The payrolls they're on."},"pay":{"type":"object","properties":{"salaried":{"type":"boolean"},"currency":{"type":"string","minLength":3,"maxLength":3,"description":"What they're paid in."},"perPeriod":{"nullable":true,"description":"Basic pay a period, if salaried.","allOf":[{"$ref":"#/components/schemas/Money"}]},"perHour":{"nullable":true,"description":"Pay an hour, if paid by the hour.","allOf":[{"$ref":"#/components/schemas/Money"}]}},"required":["salaried","currency","perPeriod","perHour"]},"email":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"}},"required":["id","companyId","number","firstName","middleInitial","lastName","status","statusSince","jobTitle","department","hiredOn","leftOn","payrollIds","pay","email","phone"],"description":"A person the company employs. Never bank details or their TRN."},"EmployeeList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Employee"}},"nextCursor":{"nullable":true,"description":"Send as `cursor` for the next page. Null on the last.","type":"string"}},"required":["data","nextCursor"]},"Run":{"type":"object","properties":{"id":{"type":"string","description":"Starts \"run_\"."},"payrollId":{"type":"string"},"kind":{"type":"string","x-extensible-enum":["scheduled","off_cycle"]},"name":{"nullable":true,"description":"A special run's own name.","type":"string"},"status":{"type":"string","x-extensible-enum":["entry","calculated","finalized","closed"],"description":"entry and calculated are still open, and their figures can change. finalized and closed are paid."},"periodStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"periodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"payDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"finalizedAt":{"nullable":true,"description":"ISO 8601, when it was paid.","type":"string"},"totals":{"type":"object","properties":{"employees":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"grossPay":{"$ref":"#/components/schemas/Money"},"employeeDeductions":{"$ref":"#/components/schemas/Money"},"netPay":{"$ref":"#/components/schemas/Money"},"takeHomePay":{"$ref":"#/components/schemas/Money"},"employerContributions":{"$ref":"#/components/schemas/Money"}},"required":["employees","grossPay","employeeDeductions","netPay","takeHomePay","employerContributions"]}},"required":["id","payrollId","kind","name","status","periodStart","periodEnd","payDate","finalizedAt","totals"],"description":"A pay run: one period of a payroll, and what it paid."},"RunList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Run"}},"nextCursor":{"nullable":true,"description":"Send as `cursor` for the next page. Null on the last.","type":"string"}},"required":["data","nextCursor"]},"PayslipLine":{"type":"object","properties":{"kind":{"type":"string","x-extensible-enum":["basic","payment","allowance","pension","esop","voluntary","correction"]},"name":{"type":"string"},"amount":{"$ref":"#/components/schemas/Money"},"units":{"nullable":true,"description":"Hours or units, when the line is worked out from them.","type":"number"},"rate":{"nullable":true,"description":"The rate a unit, with units.","allOf":[{"$ref":"#/components/schemas/Money"}]},"taxable":{"type":"boolean"},"nonCash":{"type":"boolean","description":"A benefit in kind: taxed, but not paid as money."}},"required":["kind","name","amount","units","rate","taxable","nonCash"]},"Payslip":{"type":"object","properties":{"id":{"type":"string","description":"Starts \"pay_\"."},"runId":{"type":"string"},"employeeId":{"type":"string"},"payDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"periodStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"periodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"finalPay":{"type":"boolean","description":"Their last pay, on leaving."},"payCurrency":{"type":"string","minLength":3,"maxLength":3},"exchangeRate":{"nullable":true,"description":"J$ to the US dollar used, for pay in USD. Amounts are J$.","type":"string"},"grossPay":{"$ref":"#/components/schemas/Money"},"nonCashBenefits":{"$ref":"#/components/schemas/Money"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/PayslipLine"}},"deductions":{"type":"object","properties":{"incomeTax":{"$ref":"#/components/schemas/Money"},"nis":{"$ref":"#/components/schemas/Money"},"nht":{"$ref":"#/components/schemas/Money"},"educationTax":{"$ref":"#/components/schemas/Money"},"pension":{"$ref":"#/components/schemas/Money"},"voluntary":{"$ref":"#/components/schemas/Money"},"total":{"$ref":"#/components/schemas/Money"}},"required":["incomeTax","nis","nht","educationTax","pension","voluntary","total"]},"netPay":{"$ref":"#/components/schemas/Money"},"takeHomePay":{"$ref":"#/components/schemas/Money"},"employer":{"type":"object","properties":{"nis":{"$ref":"#/components/schemas/Money"},"nht":{"$ref":"#/components/schemas/Money"},"educationTax":{"$ref":"#/components/schemas/Money"},"heart":{"$ref":"#/components/schemas/Money"},"pension":{"$ref":"#/components/schemas/Money"}},"required":["nis","nht","educationTax","heart","pension"]}},"required":["id","runId","employeeId","payDate","periodStart","periodEnd","finalPay","payCurrency","exchangeRate","grossPay","nonCashBenefits","lines","deductions","netPay","takeHomePay","employer"],"description":"One person's pay in one run, with every line."},"PayslipList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Payslip"}},"nextCursor":{"nullable":true,"description":"Send as `cursor` for the next page. Null on the last.","type":"string"}},"required":["data","nextCursor"]},"Leave":{"type":"object","properties":{"id":{"type":"string","description":"Starts \"lve_\"."},"employeeId":{"type":"string"},"type":{"type":"string","x-extensible-enum":["vacation","sick","maternity","unpaid","other_paid","suspension"]},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"endsOn":{"nullable":true,"description":"The last day. Null while it goes on.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"days":{"nullable":true,"description":"Days taken, as entered: \"2.5\". Null when not entered.","type":"string"},"paid":{"type":"boolean"}},"required":["id","employeeId","type","startsOn","endsOn","days","paid"],"description":"Leave someone took."},"LeaveList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Leave"}},"nextCursor":{"nullable":true,"description":"Send as `cursor` for the next page. Null on the last.","type":"string"}},"required":["data","nextCursor"]},"HoursRequest":{"type":"object","properties":{"hours":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1,"maxLength":64,"description":"Starts \"emp_\"."},"worked":{"maxItems":62,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day of the stretch."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day. The same as `from` for one day."},"hours":{"type":"number","minimum":0,"maximum":100000,"description":"Hours worked in the stretch, to two decimals: 7.5."}},"required":["from","to","hours"]},"description":"Every stretch they worked in the run: one day each, or a week at a time. An empty list clears their hours."}},"required":["employeeId","worked"]},"description":"Up to 500 people in one call."}},"required":["hours"],"description":"The hours each person worked in a run. What you send replaces the hours typed for them."},"RunHours":{"type":"object","properties":{"runId":{"type":"string"},"status":{"type":"string","x-extensible-enum":["entry","calculated"],"description":"The run is still open. A calculated run was worked out again."},"hours":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string"},"worked":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day of the stretch."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day. The same as `from` for one day."},"hours":{"type":"number","minimum":0,"maximum":100000,"description":"Hours worked in the stretch, to two decimals: 7.5."}},"required":["from","to","hours"]}},"total":{"type":"number","description":"The hours in every stretch, added up."}},"required":["employeeId","worked","total"]}}},"required":["runId","status","hours"],"description":"The hours now on the run for each person sent, as Paie keeps them."},"PaymentsRequest":{"type":"object","properties":{"payments":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1,"maxLength":64,"description":"Starts \"emp_\"."},"amount":{"nullable":true,"description":"What they're paid on the run, in their pay currency. Null clears it, which leaves them without a payslip on this run.","type":"string","pattern":"^\\d{1,12}\\.\\d{2}$"}},"required":["employeeId","amount"]},"description":"Up to 500 people in one call."}},"required":["payments"],"description":"What each person is paid on a special run. What you send replaces what was typed for them."},"RunPayments":{"type":"object","properties":{"runId":{"type":"string"},"status":{"type":"string","x-extensible-enum":["entry","calculated"],"description":"The run is still open. A calculated run was worked out again."},"payItem":{"type":"string","description":"The run's own pay item: \"Bonus\"."},"payments":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string"},"amount":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Money"}]}},"required":["employeeId","amount"]}}},"required":["runId","status","payItem","payments"],"description":"What each person sent is now paid on the run."},"NewHireRequest":{"type":"object","properties":{"payrollId":{"description":"Starts \"pyr_\". The payroll they join, and its open run. Left out, they join none yet.","type":"string","minLength":1,"maxLength":64},"firstName":{"type":"string","minLength":1,"maxLength":100},"middleInitial":{"type":"string","maxLength":5},"lastName":{"type":"string","minLength":1,"maxLength":100},"trn":{"type":"string","minLength":1,"maxLength":20,"description":"Their TRN. Kept, and never answered in full."},"nisNumber":{"type":"string","maxLength":20},"birthday":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"gender":{"default":"unspecified","type":"string","x-extensible-enum":["male","female","unspecified"]},"maritalStatus":{"type":"string","x-extensible-enum":["single","married","common_law","divorced","widowed","separated"]},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":30},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"region":{"type":"string","maxLength":100},"postalCode":{"type":"string","maxLength":20},"country":{"type":"string","minLength":2,"maxLength":2,"description":"ISO 3166: \"JM\"."}}},"jobTitle":{"type":"string","minLength":1,"maxLength":200},"departmentId":{"description":"Starts \"dep_\".","type":"string","minLength":1,"maxLength":64},"category":{"default":"regular","type":"string","x-extensible-enum":["regular","casual","holiday_worker","part_time","pensioner","director","personal_services"]},"hiredOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"probationEndsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"pay":{"type":"object","properties":{"salaried":{"type":"boolean"},"currency":{"default":"JMD","type":"string","x-extensible-enum":["JMD","USD"]},"perPeriod":{"description":"Basic pay a period, if salaried.","type":"string","pattern":"^\\d{1,12}\\.\\d{2}$"},"perHour":{"description":"Pay an hour, if paid by the hour.","type":"string","pattern":"^\\d{1,12}\\.\\d{2}$"},"standardHours":{"description":"Their hours a period. Needed for pay by the hour.","type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":744}},"required":["salaried"]},"paymentMethod":{"default":"lodgement","type":"string","x-extensible-enum":["cash","cheque","lodgement"]},"residency":{"default":"resident","type":"string","x-extensible-enum":["resident","non_resident"]}},"required":["firstName","lastName","trn","birthday","jobTitle","hiredOn","pay"],"description":"Someone new at the company. Bank details are added in Paie, never here."},"DetailsRequest":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"middleInitial":{"nullable":true,"type":"string","maxLength":5},"lastName":{"type":"string","minLength":1,"maxLength":100},"nisNumber":{"nullable":true,"type":"string","maxLength":20},"maritalStatus":{"type":"string","x-extensible-enum":["single","married","common_law","divorced","widowed","separated"]},"email":{"nullable":true,"type":"string","maxLength":254},"phone":{"nullable":true,"type":"string","maxLength":30},"address":{"description":"Only the lines sent change. Null clears a line.","type":"object","properties":{"line1":{"nullable":true,"type":"string","maxLength":200},"line2":{"nullable":true,"type":"string","maxLength":200},"city":{"nullable":true,"type":"string","maxLength":100},"region":{"nullable":true,"type":"string","maxLength":100},"postalCode":{"nullable":true,"type":"string","maxLength":20},"country":{"nullable":true,"description":"ISO 3166: \"JM\".","type":"string","minLength":2,"maxLength":2}}},"jobTitle":{"type":"string","minLength":1,"maxLength":200},"departmentId":{"description":"Starts \"dep_\". Null takes them out of their department.","nullable":true,"type":"string","minLength":1,"maxLength":64},"probationEndsOn":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."}},"description":"Only the fields sent change; null clears one. Pay changes from a date with its own call.","example":{"jobTitle":"Head baker","phone":null,"address":{"line1":"2 Duke Street"}}},"LeavingRequest":{"type":"object","properties":{"lastDay":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Their last day at work."},"reason":{"type":"string","x-extensible-enum":["resigned","dismissed","redundant","retired","contract_ended","died"]},"separation":{"default":"permanent","description":"temporary for someone expected back, such as a season.","type":"string","x-extensible-enum":["permanent","temporary"]},"representativeName":{"description":"Who their P45 goes to. Needed when the reason is died.","type":"string","maxLength":200},"note":{"type":"string","maxLength":1000}},"required":["lastDay","reason"],"description":"That someone is leaving: their last day and why. Final pay, severance, vacation owed and the P45 are finished in Paie.","example":{"lastDay":"2026-11-27","reason":"resigned"}},"PayChangeRequest":{"type":"object","properties":{"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day paid at the new pay."},"perPeriod":{"description":"Their new basic pay a period, for someone on a salary.","type":"string","pattern":"^\\d{1,12}\\.\\d{2}$"},"perHour":{"description":"Their new pay an hour, for someone paid by the hour.","type":"string","pattern":"^\\d{1,12}\\.\\d{2}$"},"standardHours":{"description":"Their standard hours a period. Left out, they stay as they are.","type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":744}},"required":["startsOn"],"description":"A new salary or hourly rate, from a date. Send `perPeriod` or `perHour`, the one they are paid by."},"PayChange":{"type":"object","properties":{"employeeId":{"type":"string"},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"salaried":{"type":"boolean"},"perPeriod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Money"}]},"perHour":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Money"}]},"standardHours":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["employeeId","startsOn","salaried","perPeriod","perHour","standardHours"],"description":"The pay they get from `startsOn`."},"LeaveRequest":{"type":"object","properties":{"type":{"type":"string","x-extensible-enum":["vacation","sick","maternity","unpaid","other_paid"]},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD."},"endsOn":{"default":null,"description":"The last day. Null for sick, maternity or unpaid leave still going on.","nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"days":{"default":null,"description":"Working days taken, in whole or half days: 2.5. Needed with `endsOn`.","nullable":true,"type":"number"},"note":{"default":null,"nullable":true,"type":"string","maxLength":500}},"required":["type","startsOn"],"description":"Leave someone took or will take."},"StatutoryMonth":{"type":"object","properties":{"companyId":{"type":"string"},"month":{"type":"string","description":"YYYY-MM: the income tax month, by pay date."},"grossEmoluments":{"$ref":"#/components/schemas/Money"},"incomeTax":{"$ref":"#/components/schemas/Money"},"nis":{"type":"object","properties":{"employee":{"$ref":"#/components/schemas/Money"},"employer":{"$ref":"#/components/schemas/Money"}},"required":["employee","employer"]},"nht":{"type":"object","properties":{"employee":{"$ref":"#/components/schemas/Money"},"employer":{"$ref":"#/components/schemas/Money"}},"required":["employee","employer"]},"educationTax":{"type":"object","properties":{"employee":{"$ref":"#/components/schemas/Money"},"employer":{"$ref":"#/components/schemas/Money"}},"required":["employee","employer"]},"heart":{"$ref":"#/components/schemas/Money"},"total":{"description":"What the S01 remits.","allOf":[{"$ref":"#/components/schemas/Money"}]},"employees":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"contributors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Those who paid NIS or NHT this month."},"filed":{"nullable":true,"description":"When the S01 was marked filed, if it was.","type":"object","properties":{"at":{"type":"string"},"reference":{"nullable":true,"type":"string"}},"required":["at","reference"]}},"required":["companyId","month","grossEmoluments","incomeTax","nis","nht","educationTax","heart","total","employees","contributors","filed"],"description":"A month's S01 figures, from the company's paid runs."}}}}