Update an employee
const url = 'https://api.usepayloom.com/api/v1/employees/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"jurisdiction":"GH","full_name":"example","title":"example","first_name":"example","middle_name":"example","last_name":"example","suffix":"example","classification":"employee","denomination_currency":"example","payment_currency":"example","staff_id":"example","start_date":"2026-04-15","end_date":"2026-04-15","birthdate":"2026-04-15","phone":"example","department_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","position_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","location_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","hod_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","tax_profile":{},"household_composition":{},"bank_details":{},"statutory_ids":{"ghana_card_pin":"GHA-573620486-0"},"compensation":[{"component_code":"basic","amount_cents":1,"effective_from":"2026-04-15","proratable":true}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.usepayloom.com/api/v1/employees/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "jurisdiction": "GH", "full_name": "example", "title": "example", "first_name": "example", "middle_name": "example", "last_name": "example", "suffix": "example", "classification": "employee", "denomination_currency": "example", "payment_currency": "example", "staff_id": "example", "start_date": "2026-04-15", "end_date": "2026-04-15", "birthdate": "2026-04-15", "phone": "example", "department_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "position_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "location_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "hod_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "tax_profile": {}, "household_composition": {}, "bank_details": {}, "statutory_ids": { "ghana_card_pin": "GHA-573620486-0" }, "compensation": [ { "component_code": "basic", "amount_cents": 1, "effective_from": "2026-04-15", "proratable": true } ] }'Omitted fields are left untouched. jurisdiction and
denomination_currency cannot be changed — mid-history changes to either
are a migration, not an edit.
Compensation entries CLOSE AND APPEND: a new entry closes the currently
open row for that component at its effective_from and adds a new one.
The prior amount is never rewritten, so payslips already priced against it
still reproduce exactly. effective_from must be after the open row’s.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”A client-generated unique string (a UUID works). Retrying with the same key and body replays the original response instead of acting twice.
Request Bodyrequired
Section titled “Request Bodyrequired”Statutory inputs (tax_profile, household_composition), statutory
identifiers (statutory_ids) and payment details (bank_details) may be
WRITTEN but are never read back — see the Employee schema.
object
Required on create; immutable afterwards.
Example
GHA whole name, split server-side into the parts below. Convenience only: when any part is sent alongside it, the parts win and this is ignored.
Required on create; a name must have both parts.
Required on create; a name must have both parts.
Required on create; immutable afterwards.
Defaults to the denomination currency.
Drives age-banded contributions (e.g. Singapore CPF).
Normalized to E.164 server-side; the submitted format is not trusted.
object
object
object
Statutory personal identifiers keyed by the jurisdiction’s catalog (e.g. ghana_card_pin, kra_pin, nin, rsa_pin, nric_fin). Values are normalized and format-checked server-side; the entry that is the person’s tax identifier feeds the statutory filings. A key the jurisdiction does not define is stored untouched.
object
Example
{ "ghana_card_pin": "GHA-573620486-0"}object
Example
basicMinor units of the employee’s denomination currency.
Required when changing existing compensation; must be after the open row’s start.
Responses
Section titled “Responses”OK
Statutory inputs (tax profile, household composition, birthdate) and PII (tax identifier, phone, bank details) are deliberately not exposed.
object
Your own identifier for this person.
Derived from first_name, middle_name, last_name and suffix. The name printed on payslips and carried in bank payment files; the honorific is not included.
Honorific (Mr
Null only on a legacy one-word name.
Jr., III, PhD … Part of the legal name.
Example
{ "object": "employee", "classification": "employee", "jurisdiction": "GH"}Missing, invalid, revoked or expired key.
object
object
object
Example
{ "error": { "code": "missing_token" }}The key is valid but lacks the required scope.
object
object
object
Example
{ "error": { "code": "missing_token" }}No such resource in this organization.
object
object
object
Example
{ "error": { "code": "missing_token" }}A request with this Idempotency-Key is still in progress.
object
object
object
Example
{ "error": { "code": "missing_token" }}Headers
Section titled “Headers”Validation failed, or the Idempotency-Key was reused for a different
request (idempotency_key_reuse).
object
object
object
Example
{ "error": { "code": "missing_token" }}