PeoplesHR Connector API

Exchange HR data between PeoplesHR and external systems over REST (and GraphQL).

  • Version 1.0.0
  • REST and GraphQL
  • 34 endpoints

Overview

The API covers six areas. Each can be read (outbound) and sent (inbound); an integration may use any subset of areas, directions and fields.

AreaReadSendInbound rows are
Employee InformationGET /api/employee_informationPOST /api/employee_information_stagingValidated and applied to PeoplesHR
Dependant DetailsGET /api/dependant_detailsPOST /api/dependant_details_stagingValidated and applied to PeoplesHR
Employee Bank InformationGET /api/employee_bank_informationPOST /api/employee_bank_information_stagingValidated and applied to PeoplesHR
Absence / Leave InformationGET /api/absence_leave_informationPOST /api/leave_application_staging
POST /api/leave_balance_staging
Copied as sent to a dump table
Attendance InformationGET /api/attendance_informationPOST /api/attendance_stagingCopied as sent to a dump table
Payroll InformationGET /api/payroll_informationPOST /api/payroll_stagingCopied as sent to a dump table

Base URL

All paths in this reference are relative to the base URL of your PeoplesHR API gateway. Set it once in your shell:

export BASE_URL="https://<your-gateway-host>/<path>"

REST endpoints live under /api/ and GraphQL at /graphql.

Authentication

Authentication is provided by your PeoplesHR API gateway. The gateway authenticates every caller and decides which areas and directions each integration may use; payroll access is granted separately. The gateway's credential format is environment-specific: ask your PeoplesHR administrator, and add the header it requires to every command, for example -H "<header>: <value>". The examples below show only the headers the API itself needs.

Request and response format

  • Bodies are JSON (Content-Type: application/json). Field names are lower snake case, exactly as listed.
  • Dates are YYYY-MM-DD; timestamps are UTC. Attendance and leave durations and clock times are HH:mm text

(for example 8.5 hours is 08:30; 100.25 hours is 100:15).

  • Lookup values (gender, designation, relationship, account type, ...) are names, not internal codes.
  • Every REST response wraps rows in value, also when one row is returned:
{
  "value": [
    "<row>",
    "<row>"
  ],
  "nextLink": "<URL of the next page; absent on the last page>"
}

Paging

Lists return 100 rows per page by default and at most 1000 ($first). When the response has nextLink, request that URL (it is relative: prefix it with your gateway host) to get the next page; stop when nextLink is absent.

Errors

A failed request returns HTTP status 400 or above with a JSON error body in the Data API builder format (version 2.0.12):

{
  "error": {
    "code": "BadRequest",
    "message": "<reason>",
    "status": 400
  }
}
SituationResult
Unknown field, malformed filter, value of the wrong type or too long (for example batch_id over 50 characters)400 or above, nothing stored
(batch_id, row_id) already received400 or above, nothing stored
PUT, PATCH or DELETE on any endpoint, POST to an outbound endpoint400 or above, nothing changed
Key not found on a get-by-key path404

Sending data: the inbound flow

Inbound is asynchronous: you post rows, a background job processes them, you read the results.

  1. Choose a new batch_id (up to 50 characters, unique to your system) for each submission.
  2. POST each row with that batch_id and a distinct row_id (1, 2, 3, ...). One row per request. The response is 201 Created with the stored row, status Pending.
  3. Post all rows of the batch without long pauses. The job runs every minute and starts a batch only after no new row has arrived for 2 minutes, so the whole batch is processed together.
  4. Read the results with GET …_staging?$filter=batch_id eq '<batch_id>' until no row is Pending or Processing.
  5. Applied rows succeeded. Rejected rows did not; error_message says why. One bad row never blocks the others. Send corrected rows in a new batch.

Retries are safe. If a POST times out, send it again: a refusal means the first attempt was stored. Null means "not supplied". On an update a null or empty field keeps the existing value; inbound cannot clear a field. No changes after posting. Received rows cannot be updated or deleted; send a correction as a new row.

statusMeaning
PendingReceived, waiting for the background job.
ProcessingBeing processed. A row stuck here for 15 minutes is returned to Pending and retried.
AppliedWritten to PeoplesHR (Employee, Dependant, Bank) or copied to the dump table (Leave, Attendance, Payroll).
RejectedNot applied. Read error_message.

Rejection messages

These are the messages the apply procedures write to error_message (several reasons are joined with ; ).

MessageMeaning
employee_number not foundThe given internal number does not exist.
employee_display_number not foundNo employee has this display number (Dependant and Bank feeds).
employee_display_number matches more than one employeeSend employee_number instead.
employee_display_number does not belong to employee_numberBoth were given and they disagree.
employee_number or employee_display_number is requiredThe row does not identify an employee.
first_name and surname are required to create an employeeA new employee needs both names.
<field> must be Active or Inactive, confirmation_status must be Confirmed or Not ConfirmedInvalid status value.
<field> must be on or after 1753-01-01Date too early.
<field>: no matching value, <field>: matches N valuesA lookup name is unknown or ambiguous.
<level> requires <parent level>, <level> is not a child of <parent level>Organisation hierarchy does not fit.
could not allocate an employee numberPeoplesHR could not issue a number for a new employee.
dependant_number not found for this employeeDependant feed: unknown dependant number.
dependant_name and dependant_type are required to create a dependantDependant feed: new dependant incomplete.
branch_code is required, account_number is required, account_type is requiredBank feed: key field missing.
branch_code not found, branch_code does not belong to bank_codeBank feed: branch problem.
duplicates row N of this batchAn earlier row of the same batch targets the same record.
apply failed: <detail>PeoplesHR refused the write; the detail is the database message.

About the examples

Request bodies, response values and GraphQL queries are taken from the repository's API tests. Values in angle brackets (<string>, <YYYY-MM-DD>, <bank code>) are placeholders where the tests read a value from the database at run time or where no fixed data exists. Identifiers starting ZZT are the tests' sample employees: replace them with your own.

Employee Information

Employee master data: names, identity numbers, dates, job, status flags, contact details and organisation hierarchy.

GET /api/employee_information

List Employee Information

Employee master data: names, identity numbers, dates, job, status flags, contact details and organisation hierarchy. Returns one page of rows; follow nextLink until it is absent to read every row.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Query parameters

All optional.

NameTypeDescription
$filterstringFilter expression. Operators eq ne gt ge lt le, combined with and, or, not and parentheses. Strings in single quotes. Example: employee_number eq 'ZZT00611'.
$selectstringComma-separated fields to return. Omit for all fields.
$orderbystringSort order: field names, each optionally followed by asc or desc.
$firstintegerPage size. Default 100, maximum 1000.
$afterstringContinuation token. Do not build it: follow nextLink from the previous page.
curl
curl -G "$BASE_URL/api/employee_information" \
  --data-urlencode "\$filter=employee_display_number eq 'ZZT-E2E-1'"
Response 200 OK
{
  "value": [
    {
      "employee_number": "<8-digit employee number>",
      "employee_display_number": "ZZT-E2E-1",
      "calling_name": "Eve",
      "preferred_name": null,
      "first_name": "Eve",
      "middle_initials": null,
      "surname": "Endtoend",
      "title_salutation": null,
      "maiden_name": null,
      "initials": null,
      "names_by_initials": null,
      "full_name": null,
      "other_names": null,
      "nic_number": null,
      "epf_number": null,
      "birth_date": null,
      "age": null,
      "gender": null,
      "blood_group": null,
      "marital_status": null,
      "married_date": null,
      "nationality": null,
      "religion": null,
      "joined_date": null,
      "joined_date_to_group": null,
      "confirmation_date": null,
      "confirmation_status": "Not Confirmed",
      "retire_date": null,
      "resign_date": null,
      "designation_code": null,
      "designation": null,
      "corporate_title_code": null,
      "corporate_title": null,
      "job_profile": null,
      "salary_grade": null,
      "personal_grade": null,
      "cost_centre": null,
      "employment_type": null,
      "contract_start_date": null,
      "contract_end_date": null,
      "hr_status": "Inactive",
      "payroll_status": "Inactive",
      "attendance_status": "Inactive",
      "barcode_number": null,
      "location": null,
      "house_number": null,
      "street_1": null,
      "street_2": null,
      "city": "Roundtrip",
      "postal_code": null,
      "telephone_number": null,
      "mobile_number": null,
      "email_address": null,
      "official_telephone_number": null,
      "official_email_address": null,
      "passport_number": null,
      "electorate": null,
      "province": null,
      "country": null,
      "staff_category_code": null,
      "staff_category": null,
      "employee_category_code": null,
      "employee_category": null,
      "employee_group": null,
      "work_group": null,
      "company": null,
      "business_unit": null,
      "division": null,
      "department": null,
      "business_function": null,
      "section": null,
      "sub_department": null,
      "sub_sub_department": null,
      "unit": null,
      "sub_unit": null,
      "additional_hierarchy_level": null,
      "hierarchy_code": "<string>",
      "supervisor_number": null,
      "supervisor_name": null
    }
  ]
}
Response fields (79)
FieldTypeDescription
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)Employee number as shown to users (the external identifier). Not guaranteed unique across employees.
calling_namestring (max 50)Calling name (same value as first_name).
preferred_namestring (max 200)Preferred (nick) name.
first_namestring (max 50)First (calling) name.
middle_initialsstring (max 50)Middle initials.
surnamestring (max 50)Surname / last name.
title_salutationstring (max 200)Title or salutation (a PeoplesHR salutation name).
maiden_namestring (max 70)Maiden name.
initialsstring (max 250)Name with initials.
names_by_initialsstring (max 200)Names denoted by the initials.
full_namestring (max 200)Full name.
other_namesstring (max 200)Other names.
nic_numberstring (max 30)National identity card number.
epf_numberstring (max 25)EPF / provident fund number.
birth_datedate (YYYY-MM-DD)Date of birth.
ageintegerAge in whole years today, derived from birth_date.
genderstring (max 200)Gender (a PeoplesHR gender name).
blood_groupstring (max 200)Blood group (a PeoplesHR blood-group name).
marital_statusstring (max 200)Marital status (a PeoplesHR marital-status name).
married_datedate (YYYY-MM-DD)Date of marriage.
nationalitystring (max 200)Nationality (a PeoplesHR nationality name).
religionstring (max 200)Religion (a PeoplesHR religion name).
joined_datedate (YYYY-MM-DD)Date joined the company.
joined_date_to_groupdate (YYYY-MM-DD)Date joined the group.
confirmation_datedate (YYYY-MM-DD)Date the employee was confirmed.
confirmation_statusstring (max 20)Confirmation status. One of: Confirmed, Not Confirmed.
retire_datedate (YYYY-MM-DD)Retirement date.
resign_datedate (YYYY-MM-DD)Resignation date.
designation_codestringDesignation code.
designationstring (max 200)Designation (a PeoplesHR designation name).
corporate_title_codestringCorporate title code.
corporate_titlestring (max 200)Corporate title (a PeoplesHR corporate-title name).
job_profilestringJob profile (function role of the designation).
salary_gradestring (max 200)Salary grade (a PeoplesHR salary-grade name).
personal_gradestring (max 100)Personal grade. Always null in the current release (the view returns NULL for this field).
cost_centrestring (max 200)Cost centre (a PeoplesHR cost-centre name).
employment_typestring (max 200)Employment type (a PeoplesHR employment-type description).
contract_start_datedate (YYYY-MM-DD)Contract start date.
contract_end_datedate (YYYY-MM-DD)Contract end date.
hr_statusstring (max 10)Whether the employee is active in HR. One of: Active, Inactive.
payroll_statusstring (max 10)Whether the employee is active in payroll. One of: Active, Inactive.
attendance_statusstring (max 10)Whether the employee is active in attendance. One of: Active, Inactive.
barcode_numberstring (max 20)Barcode / attendance card number.
locationstring (max 200)Work location (a PeoplesHR location name).
house_numberstring (max 90)Permanent address, line 1.
street_1string (max 90)Permanent address, line 2.
street_2string (max 90)Permanent address, line 3.
citystring (max 90)Permanent address, city.
postal_codestring (max 20)Permanent address, postal code.
telephone_numberstring (max 30)Personal telephone number.
mobile_numberstring (max 20)Personal mobile number.
email_addressstring (max 100)Personal email address.
official_telephone_numberstring (max 20)Office telephone number.
official_email_addressstring (max 100)Office email address.
passport_numberstring (max 20)Passport number.
electoratestring (max 200)Electorate of the permanent address (a PeoplesHR electorate name).
provincestring (max 200)Province of the permanent address (a PeoplesHR province name).
countrystring (max 200)Country of the permanent address (a PeoplesHR country name).
staff_category_codestringStaff category code.
staff_categorystring (max 200)Staff category (a PeoplesHR staff-category name).
employee_category_codestringEmployee category code.
employee_categorystring (max 200)Employee category (a PeoplesHR category name).
employee_groupstring (max 200)Employee group (a PeoplesHR group name).
work_groupstringScheduling (work) group.
companystring (max 200)Organisation hierarchy: company (hierarchy level 3).
business_unitstring (max 200)Organisation hierarchy: business unit / sector (level 2).
divisionstring (max 200)Organisation hierarchy: division (level 4).
departmentstring (max 200)Organisation hierarchy: department (level 5).
business_functionstring (max 100)Business function. Always null in the current release (the view returns NULL for this field).
sectionstring (max 100)Section. Always null in the current release (the view returns NULL for this field).
sub_departmentstring (max 200)Organisation hierarchy: sub department (level 6).
sub_sub_departmentstring (max 200)Organisation hierarchy: level 7.
unitstring (max 200)Organisation hierarchy: level 8.
sub_unitstring (max 200)Organisation hierarchy: level 9.
additional_hierarchy_levelstring (max 200)Organisation hierarchy: level 10.
hierarchy_codestringCode of the deepest hierarchy node the employee is assigned to.
supervisor_numberstring (max 25)Display number of the primary supervisor.
supervisor_namestringDisplay name of the primary supervisor.

GET /api/employee_information/employee_number/{employee_number}

Get one Employee Information row

Returns the row with the given key (employee_number). The row is still wrapped in value (an array of one row). Unknown key: 404. Percent-encode key values that contain spaces or reserved characters (for example January 2026 → January%202026).

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Path parameters

NameTypeDescription
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key). Required.

Query parameters

All optional.

NameTypeDescription
$selectstringComma-separated fields to return. Omit for all fields.
curl
EMPLOYEE_NUMBER='…'
curl "$BASE_URL/api/employee_information/employee_number/$EMPLOYEE_NUMBER"
Response 200 OK
{
  "value": [
    {
      "employee_number": "<8-digit employee number>",
      "employee_display_number": "ZZT-E2E-1",
      "calling_name": "Eve",
      "preferred_name": null,
      "first_name": "Eve",
      "middle_initials": null,
      "surname": "Endtoend",
      "title_salutation": null,
      "maiden_name": null,
      "initials": null,
      "names_by_initials": null,
      "full_name": null,
      "other_names": null,
      "nic_number": null,
      "epf_number": null,
      "birth_date": null,
      "age": null,
      "gender": null,
      "blood_group": null,
      "marital_status": null,
      "married_date": null,
      "nationality": null,
      "religion": null,
      "joined_date": null,
      "joined_date_to_group": null,
      "confirmation_date": null,
      "confirmation_status": "Not Confirmed",
      "retire_date": null,
      "resign_date": null,
      "designation_code": null,
      "designation": null,
      "corporate_title_code": null,
      "corporate_title": null,
      "job_profile": null,
      "salary_grade": null,
      "personal_grade": null,
      "cost_centre": null,
      "employment_type": null,
      "contract_start_date": null,
      "contract_end_date": null,
      "hr_status": "Inactive",
      "payroll_status": "Inactive",
      "attendance_status": "Inactive",
      "barcode_number": null,
      "location": null,
      "house_number": null,
      "street_1": null,
      "street_2": null,
      "city": "Roundtrip",
      "postal_code": null,
      "telephone_number": null,
      "mobile_number": null,
      "email_address": null,
      "official_telephone_number": null,
      "official_email_address": null,
      "passport_number": null,
      "electorate": null,
      "province": null,
      "country": null,
      "staff_category_code": null,
      "staff_category": null,
      "employee_category_code": null,
      "employee_category": null,
      "employee_group": null,
      "work_group": null,
      "company": null,
      "business_unit": null,
      "division": null,
      "department": null,
      "business_function": null,
      "section": null,
      "sub_department": null,
      "sub_sub_department": null,
      "unit": null,
      "sub_unit": null,
      "additional_hierarchy_level": null,
      "hierarchy_code": "<string>",
      "supervisor_number": null,
      "supervisor_name": null
    }
  ]
}

Employee Information (inbound)

Send Employee Information data into PeoplesHR.

Processing rules

Applied to: the PeoplesHR employee master (create or update).

Matching. employee_number given: it must exist (a caller cannot choose a new number) and the row updates that employee. Otherwise employee_display_number is used: no match creates a new employee, one match updates it, several matches reject the row. A row with neither is rejected.

Create. Requires employee_display_number, first_name and surname. A new employee gets the next PeoplesHR employee number (written back to employee_number). hr_status, payroll_status and attendance_status default to Inactive and confirmation_status to Not Confirmed, so a new employee enters no process until these are set.

Update. Only supplied fields change. A null or blank value means "not supplied": inbound cannot clear a field.

Lookups. Send the same names the outbound employee_information returns (for example gender, designation, location, department). Each name must match exactly one PeoplesHR value or the row is rejected naming the field (<field>: no matching value).

Hierarchy. Each level must be a child of the level above it, using the stored value for levels the row does not supply. A new employee must supply the parent of every level it supplies.

Other rules. Status fields accept only Active/Inactive and Confirmed/Not Confirmed. Dates before 1753-01-01 are rejected. A later row of the same batch that targets the same employee is rejected (duplicates row N of this batch).

Not accepted inbound (outbound only): age, calling_name, the *_code fields, job_profile, personal_grade, business_function, section, hierarchy_code, supervisor_number, supervisor_name, work_group.

POST /api/employee_information_staging

Submit one Employee Information row

Stores one row for background processing and returns it with status Pending. Send every row of a submission with the same batch_id and a distinct row_id, then read the results with the next endpoint. Re-posting a (batch_id, row_id) pair that was already received is refused (HTTP status 400 or above) and stores nothing.

Headers

HeaderValueNotes
Content-Typeapplication/jsonRequired. The body is JSON.
AuthenticationWhatever your API gateway requires (see Authentication).

Request body

A JSON object. Required: batch_id, row_id; every other field is optional (null or omitted means "not supplied"). Do not send staging_id, status, error_message, received_at, claimed_at, processed_at: the server sets them.

Body fields (67)
FieldTypeRequiredDescription
batch_idstring (max 50)yesSender-chosen identifier that groups the rows of one submission (max 50 characters). Use a new value for every submission and read results back by it.
row_idintegeryesSender-chosen row number, unique within the batch. (batch_id, row_id) is unique: re-posting the same pair is refused, which makes a retried POST safe.
employee_numberstring (max 10)noInternal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)noEmployee number as shown to users (the external identifier). Not guaranteed unique across employees.
first_namestring (max 50)noFirst (calling) name.
preferred_namestring (max 200)noPreferred (nick) name.
middle_initialsstring (max 50)noMiddle initials.
surnamestring (max 50)noSurname / last name.
title_salutationstring (max 200)noTitle or salutation (a PeoplesHR salutation name).
maiden_namestring (max 70)noMaiden name.
initialsstring (max 250)noName with initials.
names_by_initialsstring (max 200)noNames denoted by the initials.
full_namestring (max 200)noFull name.
other_namesstring (max 200)noOther names.
nic_numberstring (max 30)noNational identity card number.
epf_numberstring (max 25)noEPF / provident fund number.
birth_datedate (YYYY-MM-DD)noDate of birth.
genderstring (max 200)noGender (a PeoplesHR gender name).
blood_groupstring (max 200)noBlood group (a PeoplesHR blood-group name).
marital_statusstring (max 200)noMarital status (a PeoplesHR marital-status name).
married_datedate (YYYY-MM-DD)noDate of marriage.
nationalitystring (max 200)noNationality (a PeoplesHR nationality name).
religionstring (max 200)noReligion (a PeoplesHR religion name).
joined_datedate (YYYY-MM-DD)noDate joined the company.
joined_date_to_groupdate (YYYY-MM-DD)noDate joined the group.
confirmation_datedate (YYYY-MM-DD)noDate the employee was confirmed.
confirmation_statusstring (max 20)noConfirmation status. One of: Confirmed, Not Confirmed.
retire_datedate (YYYY-MM-DD)noRetirement date.
resign_datedate (YYYY-MM-DD)noResignation date.
designationstring (max 200)noDesignation (a PeoplesHR designation name).
corporate_titlestring (max 200)noCorporate title (a PeoplesHR corporate-title name).
salary_gradestring (max 200)noSalary grade (a PeoplesHR salary-grade name).
cost_centrestring (max 200)noCost centre (a PeoplesHR cost-centre name).
employment_typestring (max 200)noEmployment type (a PeoplesHR employment-type description).
contract_start_datedate (YYYY-MM-DD)noContract start date.
contract_end_datedate (YYYY-MM-DD)noContract end date.
hr_statusstring (max 10)noWhether the employee is active in HR. One of: Active, Inactive.
payroll_statusstring (max 10)noWhether the employee is active in payroll. One of: Active, Inactive.
attendance_statusstring (max 10)noWhether the employee is active in attendance. One of: Active, Inactive.
barcode_numberstring (max 20)noBarcode / attendance card number.
locationstring (max 200)noWork location (a PeoplesHR location name).
house_numberstring (max 90)noPermanent address, line 1.
street_1string (max 90)noPermanent address, line 2.
street_2string (max 90)noPermanent address, line 3.
citystring (max 90)noPermanent address, city.
postal_codestring (max 20)noPermanent address, postal code.
telephone_numberstring (max 30)noPersonal telephone number.
mobile_numberstring (max 20)noPersonal mobile number.
email_addressstring (max 100)noPersonal email address.
official_telephone_numberstring (max 20)noOffice telephone number.
official_email_addressstring (max 100)noOffice email address.
passport_numberstring (max 20)noPassport number.
electoratestring (max 200)noElectorate of the permanent address (a PeoplesHR electorate name).
provincestring (max 200)noProvince of the permanent address (a PeoplesHR province name).
countrystring (max 200)noCountry of the permanent address (a PeoplesHR country name).
staff_categorystring (max 200)noStaff category (a PeoplesHR staff-category name).
employee_categorystring (max 200)noEmployee category (a PeoplesHR category name).
employee_groupstring (max 200)noEmployee group (a PeoplesHR group name).
companystring (max 200)noOrganisation hierarchy: company (hierarchy level 3).
business_unitstring (max 200)noOrganisation hierarchy: business unit / sector (level 2).
divisionstring (max 200)noOrganisation hierarchy: division (level 4).
departmentstring (max 200)noOrganisation hierarchy: department (level 5).
sub_departmentstring (max 200)noOrganisation hierarchy: sub department (level 6).
sub_sub_departmentstring (max 200)noOrganisation hierarchy: level 7.
unitstring (max 200)noOrganisation hierarchy: level 8.
sub_unitstring (max 200)noOrganisation hierarchy: level 9.
additional_hierarchy_levelstring (max 200)noOrganisation hierarchy: level 10.
curl
curl -X POST "$BASE_URL/api/employee_information_staging" \
  -H "Content-Type: application/json" \
  -d '{
  "batch_id": "example-0001",
  "row_id": 1,
  "employee_display_number": "ZZT-E2E-1",
  "first_name": "Eve",
  "surname": "Endtoend",
  "city": "Roundtrip"
}'

curl -X POST "$BASE_URL/api/employee_information_staging" \
  -H "Content-Type: application/json" \
  -d '{
  "batch_id": "example-0001",
  "row_id": 2,
  "employee_display_number": "ZZT-E2E-2",
  "first_name": "Bad",
  "surname": "Row",
  "gender": "No Such Gender"
}'
Response 201 Created
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Pending",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": null,
      "processed_at": null,
      "employee_number": null,
      "employee_display_number": "ZZT-E2E-1",
      "first_name": "Eve",
      "preferred_name": null,
      "middle_initials": null,
      "surname": "Endtoend",
      "title_salutation": null,
      "maiden_name": null,
      "initials": null,
      "names_by_initials": null,
      "full_name": null,
      "other_names": null,
      "nic_number": null,
      "epf_number": null,
      "birth_date": null,
      "gender": null,
      "blood_group": null,
      "marital_status": null,
      "married_date": null,
      "nationality": null,
      "religion": null,
      "joined_date": null,
      "joined_date_to_group": null,
      "confirmation_date": null,
      "confirmation_status": null,
      "retire_date": null,
      "resign_date": null,
      "designation": null,
      "corporate_title": null,
      "salary_grade": null,
      "cost_centre": null,
      "employment_type": null,
      "contract_start_date": null,
      "contract_end_date": null,
      "hr_status": null,
      "payroll_status": null,
      "attendance_status": null,
      "barcode_number": null,
      "location": null,
      "house_number": null,
      "street_1": null,
      "street_2": null,
      "city": "Roundtrip",
      "postal_code": null,
      "telephone_number": null,
      "mobile_number": null,
      "email_address": null,
      "official_telephone_number": null,
      "official_email_address": null,
      "passport_number": null,
      "electorate": null,
      "province": null,
      "country": null,
      "staff_category": null,
      "employee_category": null,
      "employee_group": null,
      "company": null,
      "business_unit": null,
      "division": null,
      "department": null,
      "sub_department": null,
      "sub_sub_department": null,
      "unit": null,
      "sub_unit": null,
      "additional_hierarchy_level": null
    }
  ]
}

GET /api/employee_information_staging

Read Employee Information submission results

Returns received rows with their status and error_message. Filter by your batch_id. Rows stay Pending until the background job runs (every minute) and the batch has been quiet for 2 minutes; poll until no row is Pending or Processing.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Query parameters

All optional.

NameTypeDescription
$filterstringFilter expression. Operators eq ne gt ge lt le, combined with and, or, not and parentheses. Strings in single quotes. Example: employee_number eq 'ZZT00611'.
$selectstringComma-separated fields to return. Omit for all fields.
$orderbystringSort order: field names, each optionally followed by asc or desc.
$firstintegerPage size. Default 100, maximum 1000.
$afterstringContinuation token. Do not build it: follow nextLink from the previous page.
curl
curl -G "$BASE_URL/api/employee_information_staging" \
  --data-urlencode "\$filter=batch_id eq 'example-0001'" \
  --data-urlencode "\$orderby=row_id"
Response 200 OK
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Applied",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "employee_number": "<8-digit employee number>",
      "employee_display_number": "ZZT-E2E-1",
      "first_name": "Eve",
      "preferred_name": null,
      "middle_initials": null,
      "surname": "Endtoend",
      "title_salutation": null,
      "maiden_name": null,
      "initials": null,
      "names_by_initials": null,
      "full_name": null,
      "other_names": null,
      "nic_number": null,
      "epf_number": null,
      "birth_date": null,
      "gender": null,
      "blood_group": null,
      "marital_status": null,
      "married_date": null,
      "nationality": null,
      "religion": null,
      "joined_date": null,
      "joined_date_to_group": null,
      "confirmation_date": null,
      "confirmation_status": null,
      "retire_date": null,
      "resign_date": null,
      "designation": null,
      "corporate_title": null,
      "salary_grade": null,
      "cost_centre": null,
      "employment_type": null,
      "contract_start_date": null,
      "contract_end_date": null,
      "hr_status": null,
      "payroll_status": null,
      "attendance_status": null,
      "barcode_number": null,
      "location": null,
      "house_number": null,
      "street_1": null,
      "street_2": null,
      "city": "Roundtrip",
      "postal_code": null,
      "telephone_number": null,
      "mobile_number": null,
      "email_address": null,
      "official_telephone_number": null,
      "official_email_address": null,
      "passport_number": null,
      "electorate": null,
      "province": null,
      "country": null,
      "staff_category": null,
      "employee_category": null,
      "employee_group": null,
      "company": null,
      "business_unit": null,
      "division": null,
      "department": null,
      "sub_department": null,
      "sub_sub_department": null,
      "unit": null,
      "sub_unit": null,
      "additional_hierarchy_level": null
    },
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 2,
      "status": "Rejected",
      "error_message": "gender: no matching value",
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "employee_number": null,
      "employee_display_number": "ZZT-E2E-2",
      "first_name": "Bad",
      "preferred_name": null,
      "middle_initials": null,
      "surname": "Row",
      "title_salutation": null,
      "maiden_name": null,
      "initials": null,
      "names_by_initials": null,
      "full_name": null,
      "other_names": null,
      "nic_number": null,
      "epf_number": null,
      "birth_date": null,
      "gender": "No Such Gender",
      "blood_group": null,
      "marital_status": null,
      "married_date": null,
      "nationality": null,
      "religion": null,
      "joined_date": null,
      "joined_date_to_group": null,
      "confirmation_date": null,
      "confirmation_status": null,
      "retire_date": null,
      "resign_date": null,
      "designation": null,
      "corporate_title": null,
      "salary_grade": null,
      "cost_centre": null,
      "employment_type": null,
      "contract_start_date": null,
      "contract_end_date": null,
      "hr_status": null,
      "payroll_status": null,
      "attendance_status": null,
      "barcode_number": null,
      "location": null,
      "house_number": null,
      "street_1": null,
      "street_2": null,
      "city": null,
      "postal_code": null,
      "telephone_number": null,
      "mobile_number": null,
      "email_address": null,
      "official_telephone_number": null,
      "official_email_address": null,
      "passport_number": null,
      "electorate": null,
      "province": null,
      "country": null,
      "staff_category": null,
      "employee_category": null,
      "employee_group": null,
      "company": null,
      "business_unit": null,
      "division": null,
      "department": null,
      "sub_department": null,
      "sub_sub_department": null,
      "unit": null,
      "sub_unit": null,
      "additional_hierarchy_level": null
    }
  ]
}

After processing.

Response fields (73)
FieldTypeDescription
staging_idintegerServer-assigned identifier of the staging row. Read only.
batch_idstring (max 50)Sender-chosen identifier that groups the rows of one submission (max 50 characters). Use a new value for every submission and read results back by it.
row_idintegerSender-chosen row number, unique within the batch. (batch_id, row_id) is unique: re-posting the same pair is refused, which makes a retried POST safe.
statusstring (max 10)Processing state of the row. Pending: received, not yet picked up. Processing: claimed by the background job. Applied: written to PeoplesHR (or copied to the dump table for dump feeds). Rejected: not applied, see error_message. Read only. One of: Pending, Processing, Applied, Rejected.
error_messagestring (max 2000)Why the row was rejected (several reasons are joined with ; ). Null when the row was applied. Read only.
received_atdate-time (UTC)UTC time the row was received. Read only.
claimed_atdate-time (UTC)UTC time the background job claimed the row. Read only.
processed_atdate-time (UTC)UTC time the row reached Applied or Rejected. Read only.
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)Employee number as shown to users (the external identifier). Not guaranteed unique across employees.
first_namestring (max 50)First (calling) name.
preferred_namestring (max 200)Preferred (nick) name.
middle_initialsstring (max 50)Middle initials.
surnamestring (max 50)Surname / last name.
title_salutationstring (max 200)Title or salutation (a PeoplesHR salutation name).
maiden_namestring (max 70)Maiden name.
initialsstring (max 250)Name with initials.
names_by_initialsstring (max 200)Names denoted by the initials.
full_namestring (max 200)Full name.
other_namesstring (max 200)Other names.
nic_numberstring (max 30)National identity card number.
epf_numberstring (max 25)EPF / provident fund number.
birth_datedate (YYYY-MM-DD)Date of birth.
genderstring (max 200)Gender (a PeoplesHR gender name).
blood_groupstring (max 200)Blood group (a PeoplesHR blood-group name).
marital_statusstring (max 200)Marital status (a PeoplesHR marital-status name).
married_datedate (YYYY-MM-DD)Date of marriage.
nationalitystring (max 200)Nationality (a PeoplesHR nationality name).
religionstring (max 200)Religion (a PeoplesHR religion name).
joined_datedate (YYYY-MM-DD)Date joined the company.
joined_date_to_groupdate (YYYY-MM-DD)Date joined the group.
confirmation_datedate (YYYY-MM-DD)Date the employee was confirmed.
confirmation_statusstring (max 20)Confirmation status. One of: Confirmed, Not Confirmed.
retire_datedate (YYYY-MM-DD)Retirement date.
resign_datedate (YYYY-MM-DD)Resignation date.
designationstring (max 200)Designation (a PeoplesHR designation name).
corporate_titlestring (max 200)Corporate title (a PeoplesHR corporate-title name).
salary_gradestring (max 200)Salary grade (a PeoplesHR salary-grade name).
cost_centrestring (max 200)Cost centre (a PeoplesHR cost-centre name).
employment_typestring (max 200)Employment type (a PeoplesHR employment-type description).
contract_start_datedate (YYYY-MM-DD)Contract start date.
contract_end_datedate (YYYY-MM-DD)Contract end date.
hr_statusstring (max 10)Whether the employee is active in HR. One of: Active, Inactive.
payroll_statusstring (max 10)Whether the employee is active in payroll. One of: Active, Inactive.
attendance_statusstring (max 10)Whether the employee is active in attendance. One of: Active, Inactive.
barcode_numberstring (max 20)Barcode / attendance card number.
locationstring (max 200)Work location (a PeoplesHR location name).
house_numberstring (max 90)Permanent address, line 1.
street_1string (max 90)Permanent address, line 2.
street_2string (max 90)Permanent address, line 3.
citystring (max 90)Permanent address, city.
postal_codestring (max 20)Permanent address, postal code.
telephone_numberstring (max 30)Personal telephone number.
mobile_numberstring (max 20)Personal mobile number.
email_addressstring (max 100)Personal email address.
official_telephone_numberstring (max 20)Office telephone number.
official_email_addressstring (max 100)Office email address.
passport_numberstring (max 20)Passport number.
electoratestring (max 200)Electorate of the permanent address (a PeoplesHR electorate name).
provincestring (max 200)Province of the permanent address (a PeoplesHR province name).
countrystring (max 200)Country of the permanent address (a PeoplesHR country name).
staff_categorystring (max 200)Staff category (a PeoplesHR staff-category name).
employee_categorystring (max 200)Employee category (a PeoplesHR category name).
employee_groupstring (max 200)Employee group (a PeoplesHR group name).
companystring (max 200)Organisation hierarchy: company (hierarchy level 3).
business_unitstring (max 200)Organisation hierarchy: business unit / sector (level 2).
divisionstring (max 200)Organisation hierarchy: division (level 4).
departmentstring (max 200)Organisation hierarchy: department (level 5).
sub_departmentstring (max 200)Organisation hierarchy: sub department (level 6).
sub_sub_departmentstring (max 200)Organisation hierarchy: level 7.
unitstring (max 200)Organisation hierarchy: level 8.
sub_unitstring (max 200)Organisation hierarchy: level 9.
additional_hierarchy_levelstring (max 200)Organisation hierarchy: level 10.

GET /api/employee_information_staging/staging_id/{staging_id}

Get one received Employee Information row

Returns one received row by its staging_id (from the POST response). Unknown id: 404.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Path parameters

NameTypeDescription
staging_idintegerServer-assigned identifier of the staging row. Read only. Required.

Query parameters

All optional.

NameTypeDescription
$selectstringComma-separated fields to return. Omit for all fields.
curl
STAGING_ID='…'
curl "$BASE_URL/api/employee_information_staging/staging_id/$STAGING_ID"
Response 200 OK
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Applied",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "employee_number": "<8-digit employee number>",
      "employee_display_number": "ZZT-E2E-1",
      "first_name": "Eve",
      "preferred_name": null,
      "middle_initials": null,
      "surname": "Endtoend",
      "title_salutation": null,
      "maiden_name": null,
      "initials": null,
      "names_by_initials": null,
      "full_name": null,
      "other_names": null,
      "nic_number": null,
      "epf_number": null,
      "birth_date": null,
      "gender": null,
      "blood_group": null,
      "marital_status": null,
      "married_date": null,
      "nationality": null,
      "religion": null,
      "joined_date": null,
      "joined_date_to_group": null,
      "confirmation_date": null,
      "confirmation_status": null,
      "retire_date": null,
      "resign_date": null,
      "designation": null,
      "corporate_title": null,
      "salary_grade": null,
      "cost_centre": null,
      "employment_type": null,
      "contract_start_date": null,
      "contract_end_date": null,
      "hr_status": null,
      "payroll_status": null,
      "attendance_status": null,
      "barcode_number": null,
      "location": null,
      "house_number": null,
      "street_1": null,
      "street_2": null,
      "city": "Roundtrip",
      "postal_code": null,
      "telephone_number": null,
      "mobile_number": null,
      "email_address": null,
      "official_telephone_number": null,
      "official_email_address": null,
      "passport_number": null,
      "electorate": null,
      "province": null,
      "country": null,
      "staff_category": null,
      "employee_category": null,
      "employee_group": null,
      "company": null,
      "business_unit": null,
      "division": null,
      "department": null,
      "sub_department": null,
      "sub_sub_department": null,
      "unit": null,
      "sub_unit": null,
      "additional_hierarchy_level": null
    }
  ]
}

Dependant Details

Employee dependants (spouse, children and other relations).

GET /api/dependant_details

List Dependant Details

Employee dependants (spouse, children and other relations). Returns one page of rows; follow nextLink until it is absent to read every row.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Query parameters

All optional.

NameTypeDescription
$filterstringFilter expression. Operators eq ne gt ge lt le, combined with and, or, not and parentheses. Strings in single quotes. Example: employee_number eq 'ZZT00611'.
$selectstringComma-separated fields to return. Omit for all fields.
$orderbystringSort order: field names, each optionally followed by asc or desc.
$firstintegerPage size. Default 100, maximum 1000.
$afterstringContinuation token. Do not build it: follow nextLink from the previous page.
curl
curl -G "$BASE_URL/api/dependant_details" \
  --data-urlencode "\$filter=employee_number eq 'ZZT00611'"
Response 200 OK
{
  "value": [
    {
      "employee_number": "ZZT00611",
      "employee_display_number": "ZZT-API611",
      "dependant_number": 1,
      "dependant_name": "Api Child",
      "dependant_type": "<relationship name>"
    }
  ]
}
Response fields (5)
FieldTypeDescription
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)Employee number as shown to users (the external identifier). Not guaranteed unique across employees.
dependant_numberintegerDependant sequence number, unique per employee.
dependant_namestring (max 200)Dependant full name.
dependant_typestring (max 20)Relationship to the employee (a PeoplesHR relationship name).

GET /api/dependant_details/employee_number/{employee_number}/dependant_number/{dependant_number}

Get one Dependant Details row

Returns the row with the given key (employee_number, dependant_number). The row is still wrapped in value (an array of one row). Unknown key: 404. Percent-encode key values that contain spaces or reserved characters (for example January 2026 → January%202026).

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Path parameters

NameTypeDescription
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key). Required.
dependant_numberintegerDependant sequence number, unique per employee. Required.

Query parameters

All optional.

NameTypeDescription
$selectstringComma-separated fields to return. Omit for all fields.
curl
EMPLOYEE_NUMBER='ZZT00611'
DEPENDANT_NUMBER='1'
curl "$BASE_URL/api/dependant_details/employee_number/$EMPLOYEE_NUMBER/dependant_number/$DEPENDANT_NUMBER"
Response 200 OK
{
  "value": [
    {
      "employee_number": "ZZT00611",
      "employee_display_number": "ZZT-API611",
      "dependant_number": 1,
      "dependant_name": "Api Child",
      "dependant_type": "<relationship name>"
    }
  ]
}

Dependant Details (inbound)

Send Dependant Details data into PeoplesHR.

Processing rules

Applied to: the PeoplesHR dependant master (create or update). The employee must already exist; this feed never creates employees.

Employee. employee_number is used when given and must exist; otherwise employee_display_number must match exactly one employee. When both are given the display number must belong to that employee.

Matching. dependant_number given: it must exist for the employee; name and type are updated (a null field keeps its value). Not given: an existing dependant with the same name and type is treated as already present (no change, row Applied, its number written back), so re-sending is safe. Otherwise a new dependant is created with the next number; creating requires dependant_name and dependant_type.

Lookups. dependant_type must match exactly one PeoplesHR relationship name.

A later row of the same batch that targets the same dependant is rejected. The resolved employee_number and dependant_number are written back to the staging row.

POST /api/dependant_details_staging

Submit one Dependant Details row

Stores one row for background processing and returns it with status Pending. Send every row of a submission with the same batch_id and a distinct row_id, then read the results with the next endpoint. Re-posting a (batch_id, row_id) pair that was already received is refused (HTTP status 400 or above) and stores nothing.

Headers

HeaderValueNotes
Content-Typeapplication/jsonRequired. The body is JSON.
AuthenticationWhatever your API gateway requires (see Authentication).

Request body

A JSON object. Required: batch_id, row_id; every other field is optional (null or omitted means "not supplied"). Do not send staging_id, status, error_message, received_at, claimed_at, processed_at: the server sets them.

Body fields (7)
FieldTypeRequiredDescription
batch_idstring (max 50)yesSender-chosen identifier that groups the rows of one submission (max 50 characters). Use a new value for every submission and read results back by it.
row_idintegeryesSender-chosen row number, unique within the batch. (batch_id, row_id) is unique: re-posting the same pair is refused, which makes a retried POST safe.
employee_numberstring (max 10)noInternal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)noEmployee number as shown to users (the external identifier). Not guaranteed unique across employees.
dependant_numberintegernoDependant sequence number, unique per employee.
dependant_namestring (max 200)noDependant full name.
dependant_typestring (max 20)noRelationship to the employee (a PeoplesHR relationship name).
curl
curl -X POST "$BASE_URL/api/dependant_details_staging" \
  -H "Content-Type: application/json" \
  -d '{
  "batch_id": "example-0001",
  "row_id": 1,
  "employee_display_number": "ZZT-API611",
  "dependant_name": "Api Child",
  "dependant_type": "<relationship name>"
}'

curl -X POST "$BASE_URL/api/dependant_details_staging" \
  -H "Content-Type: application/json" \
  -d '{
  "batch_id": "example-0001",
  "row_id": 2,
  "employee_number": "ZZT00611",
  "dependant_name": "Bad Child",
  "dependant_type": "No Such Relationship"
}'
Response 201 Created
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Pending",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": null,
      "processed_at": null,
      "employee_number": null,
      "employee_display_number": "ZZT-API611",
      "dependant_number": null,
      "dependant_name": "Api Child",
      "dependant_type": "<relationship name>"
    }
  ]
}

GET /api/dependant_details_staging

Read Dependant Details submission results

Returns received rows with their status and error_message. Filter by your batch_id. Rows stay Pending until the background job runs (every minute) and the batch has been quiet for 2 minutes; poll until no row is Pending or Processing.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Query parameters

All optional.

NameTypeDescription
$filterstringFilter expression. Operators eq ne gt ge lt le, combined with and, or, not and parentheses. Strings in single quotes. Example: employee_number eq 'ZZT00611'.
$selectstringComma-separated fields to return. Omit for all fields.
$orderbystringSort order: field names, each optionally followed by asc or desc.
$firstintegerPage size. Default 100, maximum 1000.
$afterstringContinuation token. Do not build it: follow nextLink from the previous page.
curl
curl -G "$BASE_URL/api/dependant_details_staging" \
  --data-urlencode "\$filter=batch_id eq 'example-0001'" \
  --data-urlencode "\$orderby=row_id"
Response 200 OK
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Applied",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "employee_number": "ZZT00611",
      "employee_display_number": "ZZT-API611",
      "dependant_number": 1,
      "dependant_name": "Api Child",
      "dependant_type": "<relationship name>"
    },
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 2,
      "status": "Rejected",
      "error_message": "dependant_type: no matching value",
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "employee_number": "ZZT00611",
      "employee_display_number": null,
      "dependant_number": null,
      "dependant_name": "Bad Child",
      "dependant_type": "No Such Relationship"
    }
  ]
}

After processing.

Response fields (13)
FieldTypeDescription
staging_idintegerServer-assigned identifier of the staging row. Read only.
batch_idstring (max 50)Sender-chosen identifier that groups the rows of one submission (max 50 characters). Use a new value for every submission and read results back by it.
row_idintegerSender-chosen row number, unique within the batch. (batch_id, row_id) is unique: re-posting the same pair is refused, which makes a retried POST safe.
statusstring (max 10)Processing state of the row. Pending: received, not yet picked up. Processing: claimed by the background job. Applied: written to PeoplesHR (or copied to the dump table for dump feeds). Rejected: not applied, see error_message. Read only. One of: Pending, Processing, Applied, Rejected.
error_messagestring (max 2000)Why the row was rejected (several reasons are joined with ; ). Null when the row was applied. Read only.
received_atdate-time (UTC)UTC time the row was received. Read only.
claimed_atdate-time (UTC)UTC time the background job claimed the row. Read only.
processed_atdate-time (UTC)UTC time the row reached Applied or Rejected. Read only.
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)Employee number as shown to users (the external identifier). Not guaranteed unique across employees.
dependant_numberintegerDependant sequence number, unique per employee.
dependant_namestring (max 200)Dependant full name.
dependant_typestring (max 20)Relationship to the employee (a PeoplesHR relationship name).

GET /api/dependant_details_staging/staging_id/{staging_id}

Get one received Dependant Details row

Returns one received row by its staging_id (from the POST response). Unknown id: 404.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Path parameters

NameTypeDescription
staging_idintegerServer-assigned identifier of the staging row. Read only. Required.

Query parameters

All optional.

NameTypeDescription
$selectstringComma-separated fields to return. Omit for all fields.
curl
STAGING_ID='…'
curl "$BASE_URL/api/dependant_details_staging/staging_id/$STAGING_ID"
Response 200 OK
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Applied",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "employee_number": "ZZT00611",
      "employee_display_number": "ZZT-API611",
      "dependant_number": 1,
      "dependant_name": "Api Child",
      "dependant_type": "<relationship name>"
    }
  ]
}

Employee Bank Information

Employee bank accounts used for salary credit.

GET /api/employee_bank_information

List Employee Bank Information

Employee bank accounts used for salary credit. Returns one page of rows; follow nextLink until it is absent to read every row.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Query parameters

All optional.

NameTypeDescription
$filterstringFilter expression. Operators eq ne gt ge lt le, combined with and, or, not and parentheses. Strings in single quotes. Example: employee_number eq 'ZZT00611'.
$selectstringComma-separated fields to return. Omit for all fields.
$orderbystringSort order: field names, each optionally followed by asc or desc.
$firstintegerPage size. Default 100, maximum 1000.
$afterstringContinuation token. Do not build it: follow nextLink from the previous page.
curl
curl -G "$BASE_URL/api/employee_bank_information" \
  --data-urlencode "\$filter=employee_number eq 'ZZT00612'"
Response 200 OK
{
  "value": [
    {
      "employee_number": "ZZT00612",
      "employee_display_number": "ZZT-API612",
      "bank_code": "<bank code>",
      "bank_name": "<string>",
      "branch_code": "<branch code>",
      "branch_name": "<string>",
      "account_number": "API-ACC-1",
      "account_name": "Api Holder",
      "bank_amount": 0,
      "account_status": "INACTIVE",
      "account_order": 1,
      "account_type": "Savings"
    }
  ]
}
Response fields (12)
FieldTypeDescription
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)Employee number as shown to users (the external identifier). Not guaranteed unique across employees.
bank_codestring (max 10)Bank code.
bank_namestring (max 100)Bank name.
branch_codestring (max 10)Branch code (unique across banks).
branch_namestring (max 120)Branch name.
account_numberstring (max 80)Bank account number.
account_namestring (max 200)Name on the account.
bank_amountnumberSalary amount credited to this account.
account_statusstring (max 8)Whether the account is active for salary credit. One of: ACTIVE, INACTIVE.
account_orderintegerOrder of the account when salary is split across accounts.
account_typestring (max 20)Account type (a PeoplesHR account-type name, for example Current, Savings).

GET /api/employee_bank_information/employee_number/{employee_number}/bank_code/{bank_code}/branch_code/{branch_code}/account_number/{account_number}/account_type/{account_type}

Get one Employee Bank Information row

Returns the row with the given key (employee_number, bank_code, branch_code, account_number, account_type). The row is still wrapped in value (an array of one row). Unknown key: 404. Percent-encode key values that contain spaces or reserved characters (for example January 2026 → January%202026).

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Path parameters

NameTypeDescription
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key). Required.
bank_codestring (max 10)Bank code. Required.
branch_codestring (max 10)Branch code (unique across banks). Required.
account_numberstring (max 80)Bank account number. Required.
account_typestring (max 20)Account type (a PeoplesHR account-type name, for example Current, Savings). Required.

Query parameters

All optional.

NameTypeDescription
$selectstringComma-separated fields to return. Omit for all fields.
curl
EMPLOYEE_NUMBER='ZZT00612'
BANK_CODE='…'
BRANCH_CODE='…'
ACCOUNT_NUMBER='API-ACC-1'
ACCOUNT_TYPE='Savings'
curl "$BASE_URL/api/employee_bank_information/employee_number/$EMPLOYEE_NUMBER/bank_code/$BANK_CODE/branch_code/$BRANCH_CODE/account_number/$ACCOUNT_NUMBER/account_type/$ACCOUNT_TYPE"
Response 200 OK
{
  "value": [
    {
      "employee_number": "ZZT00612",
      "employee_display_number": "ZZT-API612",
      "bank_code": "<bank code>",
      "bank_name": "<string>",
      "branch_code": "<branch code>",
      "branch_name": "<string>",
      "account_number": "API-ACC-1",
      "account_name": "Api Holder",
      "bank_amount": 0,
      "account_status": "INACTIVE",
      "account_order": 1,
      "account_type": "Savings"
    }
  ]
}

Employee Bank Information (inbound)

Send Employee Bank Information data into PeoplesHR.

Processing rules

Applied to: the PeoplesHR employee bank-account master (create or update). The employee must already exist (same employee rules as Dependant Details).

Matching. An account is identified by (branch_code, employee, account_number, account_type); all three fields are required. An existing account has account_name and account_order updated (a null field keeps its value); otherwise the account is created.

Lookups. branch_code must exist and, when bank_code is given, belong to that bank. account_type must match exactly one PeoplesHR account-type name. bank_name and branch_name are not accepted.

Safeguard. account_status and bank_amount are accepted but ignored: a new account is always created INACTIVE with amount 0, and an update never changes status or amount. Activation and amounts are managed in PeoplesHR. account_order defaults to the next order for the employee.

A later row of the same batch that targets the same account is rejected. The resolved employee_number, bank_code and account_order are written back to the staging row.

POST /api/employee_bank_information_staging

Submit one Employee Bank Information row

Stores one row for background processing and returns it with status Pending. Send every row of a submission with the same batch_id and a distinct row_id, then read the results with the next endpoint. Re-posting a (batch_id, row_id) pair that was already received is refused (HTTP status 400 or above) and stores nothing.

Headers

HeaderValueNotes
Content-Typeapplication/jsonRequired. The body is JSON.
AuthenticationWhatever your API gateway requires (see Authentication).

Request body

A JSON object. Required: batch_id, row_id; every other field is optional (null or omitted means "not supplied"). Do not send staging_id, status, error_message, received_at, claimed_at, processed_at: the server sets them.

Body fields (12)
FieldTypeRequiredDescription
batch_idstring (max 50)yesSender-chosen identifier that groups the rows of one submission (max 50 characters). Use a new value for every submission and read results back by it.
row_idintegeryesSender-chosen row number, unique within the batch. (batch_id, row_id) is unique: re-posting the same pair is refused, which makes a retried POST safe.
employee_numberstring (max 10)noInternal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)noEmployee number as shown to users (the external identifier). Not guaranteed unique across employees.
bank_codestring (max 10)noBank code.
branch_codestring (max 10)noBranch code (unique across banks).
account_numberstring (max 80)noBank account number.
account_namestring (max 200)noName on the account.
bank_amountnumbernoSalary amount credited to this account. Accepted but ignored inbound.
account_statusstring (max 8)noWhether the account is active for salary credit. One of: ACTIVE, INACTIVE. Accepted but ignored inbound.
account_orderintegernoOrder of the account when salary is split across accounts.
account_typestring (max 20)noAccount type (a PeoplesHR account-type name, for example Current, Savings).
curl
curl -X POST "$BASE_URL/api/employee_bank_information_staging" \
  -H "Content-Type: application/json" \
  -d '{
  "batch_id": "example-0001",
  "row_id": 1,
  "employee_number": "ZZT00612",
  "branch_code": "<branch code>",
  "account_number": "API-ACC-1",
  "account_type": "Savings",
  "account_name": "Api Holder"
}'
Response 201 Created
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Pending",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": null,
      "processed_at": null,
      "employee_number": "ZZT00612",
      "employee_display_number": null,
      "bank_code": null,
      "branch_code": "<branch code>",
      "account_number": "API-ACC-1",
      "account_name": "Api Holder",
      "bank_amount": null,
      "account_status": null,
      "account_order": null,
      "account_type": "Savings"
    }
  ]
}

GET /api/employee_bank_information_staging

Read Employee Bank Information submission results

Returns received rows with their status and error_message. Filter by your batch_id. Rows stay Pending until the background job runs (every minute) and the batch has been quiet for 2 minutes; poll until no row is Pending or Processing.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Query parameters

All optional.

NameTypeDescription
$filterstringFilter expression. Operators eq ne gt ge lt le, combined with and, or, not and parentheses. Strings in single quotes. Example: employee_number eq 'ZZT00611'.
$selectstringComma-separated fields to return. Omit for all fields.
$orderbystringSort order: field names, each optionally followed by asc or desc.
$firstintegerPage size. Default 100, maximum 1000.
$afterstringContinuation token. Do not build it: follow nextLink from the previous page.
curl
curl -G "$BASE_URL/api/employee_bank_information_staging" \
  --data-urlencode "\$filter=batch_id eq 'example-0001'" \
  --data-urlencode "\$orderby=row_id"
Response 200 OK
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Applied",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "employee_number": "ZZT00612",
      "employee_display_number": null,
      "bank_code": "<bank code>",
      "branch_code": "<branch code>",
      "account_number": "API-ACC-1",
      "account_name": "Api Holder",
      "bank_amount": null,
      "account_status": null,
      "account_order": 1,
      "account_type": "Savings"
    }
  ]
}

After processing.

Response fields (18)
FieldTypeDescription
staging_idintegerServer-assigned identifier of the staging row. Read only.
batch_idstring (max 50)Sender-chosen identifier that groups the rows of one submission (max 50 characters). Use a new value for every submission and read results back by it.
row_idintegerSender-chosen row number, unique within the batch. (batch_id, row_id) is unique: re-posting the same pair is refused, which makes a retried POST safe.
statusstring (max 10)Processing state of the row. Pending: received, not yet picked up. Processing: claimed by the background job. Applied: written to PeoplesHR (or copied to the dump table for dump feeds). Rejected: not applied, see error_message. Read only. One of: Pending, Processing, Applied, Rejected.
error_messagestring (max 2000)Why the row was rejected (several reasons are joined with ; ). Null when the row was applied. Read only.
received_atdate-time (UTC)UTC time the row was received. Read only.
claimed_atdate-time (UTC)UTC time the background job claimed the row. Read only.
processed_atdate-time (UTC)UTC time the row reached Applied or Rejected. Read only.
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)Employee number as shown to users (the external identifier). Not guaranteed unique across employees.
bank_codestring (max 10)Bank code.
branch_codestring (max 10)Branch code (unique across banks).
account_numberstring (max 80)Bank account number.
account_namestring (max 200)Name on the account.
bank_amountnumberSalary amount credited to this account.
account_statusstring (max 8)Whether the account is active for salary credit. One of: ACTIVE, INACTIVE.
account_orderintegerOrder of the account when salary is split across accounts.
account_typestring (max 20)Account type (a PeoplesHR account-type name, for example Current, Savings).

GET /api/employee_bank_information_staging/staging_id/{staging_id}

Get one received Employee Bank Information row

Returns one received row by its staging_id (from the POST response). Unknown id: 404.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Path parameters

NameTypeDescription
staging_idintegerServer-assigned identifier of the staging row. Read only. Required.

Query parameters

All optional.

NameTypeDescription
$selectstringComma-separated fields to return. Omit for all fields.
curl
STAGING_ID='…'
curl "$BASE_URL/api/employee_bank_information_staging/staging_id/$STAGING_ID"
Response 200 OK
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Applied",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "employee_number": "ZZT00612",
      "employee_display_number": null,
      "bank_code": "<bank code>",
      "branch_code": "<branch code>",
      "account_number": "API-ACC-1",
      "account_name": "Api Holder",
      "bank_amount": null,
      "account_status": null,
      "account_order": 1,
      "account_type": "Savings"
    }
  ]
}

Absence / Leave Information

Leave applications, with the employee's entitlement, balance and utilisation for the leave type and year.

GET /api/absence_leave_information

List Absence / Leave Information

Leave applications, with the employee's entitlement, balance and utilisation for the leave type and year. Returns one page of rows; follow nextLink until it is absent to read every row.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Query parameters

All optional.

NameTypeDescription
$filterstringFilter expression. Operators eq ne gt ge lt le, combined with and, or, not and parentheses. Strings in single quotes. Example: employee_number eq 'ZZT00611'.
$selectstringComma-separated fields to return. Omit for all fields.
$orderbystringSort order: field names, each optionally followed by asc or desc.
$firstintegerPage size. Default 100, maximum 1000.
$afterstringContinuation token. Do not build it: follow nextLink from the previous page.
curl
curl -G "$BASE_URL/api/absence_leave_information" \
  --data-urlencode "\$select=leave_application_id,employee_display_number,from_date,to_date,approval_status" \
  --data-urlencode "\$orderby=leave_application_id desc" \
  --data-urlencode "\$first=10"
Response 200 OK
{
  "value": [
    {
      "leave_application_id": "<integer>",
      "employee_display_number": "<string>",
      "from_date": "<YYYY-MM-DD>",
      "to_date": "<YYYY-MM-DD>",
      "approval_status": "approved"
    }
  ],
  "nextLink": "/api/absence_leave_information?$select=leave_application_id,employee_display_number,from_date,to_date,approval_status&$orderby=leave_application_id%20desc&$first=10&$after=<token>"
}

Values in angle brackets are placeholders: the repository has no fixed data for this area.

Response fields (28)
FieldTypeDescription
leave_application_idintegerLeave application identifier.
leave_yearintegerLeave year.
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)Employee number as shown to users (the external identifier). Not guaranteed unique across employees.
employee_namestring (max 600)Employee display name.
leave_typestring (max 100)Leave type description.
leave_type_codestring (max 10)Leave type code.
leave_type_namestring (max 50)Leave type name.
from_datedate (YYYY-MM-DD)First day of leave.
to_datedate (YYYY-MM-DD)Last day of leave.
number_of_daysnumberNumber of leave days.
half_day_informationstring (max 20)Half-day code and session (code/session) when the application has a day breakdown.
approval_statusstring (max 20)Approval state of the application. One of: approved, pending, rejected, cancelled.
applied_statusintegerApplied-status flag of the application.
approved_statusintegerApproved flag of the application (0 or 1).
leave_commentsstring (max 500)Comments entered with the application.
leave_reason_codeintegerLeave reason code.
leave_reason_descriptionstring (max 500)Leave reason description.
entitlementnumberDays entitled for the employee, leave type and year.
balancenumberDays remaining for the employee, leave type and year.
utilizednumberDays used for the employee, leave type and year.
pendingnumberDays pending approval. Always null in the current release (the view returns NULL for this field).
start_timestring (HH:mm)Start time for short (time-based) leave. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
end_timestring (HH:mm)End time for short (time-based) leave. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
commentsstring (max 250)Additional comments.
cover_date_1date (YYYY-MM-DD)Cover date 1 (short leave). Always null in the current release (the view returns NULL for this field).
cover_date_2date (YYYY-MM-DD)Cover date 2 (short leave). Always null in the current release (the view returns NULL for this field).
type_statusintegerShort-leave type status. Always null in the current release (the view returns NULL for this field).

GET /api/absence_leave_information/leave_application_id/{leave_application_id}

Get one Absence / Leave Information row

Returns the row with the given key (leave_application_id). The row is still wrapped in value (an array of one row). Unknown key: 404.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Path parameters

NameTypeDescription
leave_application_idintegerLeave application identifier. Required.

Query parameters

All optional.

NameTypeDescription
$selectstringComma-separated fields to return. Omit for all fields.
curl
LEAVE_APPLICATION_ID='…'
curl "$BASE_URL/api/absence_leave_information/leave_application_id/$LEAVE_APPLICATION_ID"
Response 200 OK
{
  "value": [
    {
      "leave_application_id": "<integer>",
      "leave_year": "<integer>",
      "employee_number": "<string>",
      "employee_display_number": "<string>",
      "employee_name": "<string>",
      "leave_type": "<string>",
      "leave_type_code": "<string>",
      "leave_type_name": "<string>",
      "from_date": "<YYYY-MM-DD>",
      "to_date": "<YYYY-MM-DD>",
      "number_of_days": "<number>",
      "half_day_information": "<string>",
      "approval_status": "approved",
      "applied_status": "<integer>",
      "approved_status": "<integer>",
      "leave_comments": "<string>",
      "leave_reason_code": "<integer>",
      "leave_reason_description": "<string>",
      "entitlement": "<number>",
      "balance": "<number>",
      "utilized": "<number>",
      "pending": null,
      "start_time": "<HH:mm>",
      "end_time": "<HH:mm>",
      "comments": "<string>",
      "cover_date_1": null,
      "cover_date_2": null,
      "type_status": null
    }
  ]
}

Leave Applications (inbound)

Send Leave Applications data into PeoplesHR.

Processing rules

Delivered to: the PeoplesHR.dump_leave_application table in the PeoplesHR database, for the implementation team to process. Rows are copied as sent: nothing is validated or looked up, so a row is never Rejected. Applied means "copied".

POST /api/leave_application_staging

Submit one Leave Applications row

Stores one row for background processing and returns it with status Pending. Send every row of a submission with the same batch_id and a distinct row_id, then read the results with the next endpoint. Re-posting a (batch_id, row_id) pair that was already received is refused (HTTP status 400 or above) and stores nothing.

Headers

HeaderValueNotes
Content-Typeapplication/jsonRequired. The body is JSON.
AuthenticationWhatever your API gateway requires (see Authentication).

Request body

A JSON object. Required: batch_id, row_id; every other field is optional (null or omitted means "not supplied"). Do not send staging_id, status, error_message, received_at, claimed_at, processed_at: the server sets them.

Body fields (26)
FieldTypeRequiredDescription
batch_idstring (max 50)yesSender-chosen identifier that groups the rows of one submission (max 50 characters). Use a new value for every submission and read results back by it.
row_idintegeryesSender-chosen row number, unique within the batch. (batch_id, row_id) is unique: re-posting the same pair is refused, which makes a retried POST safe.
leave_application_idintegernoLeave application identifier.
leave_yearintegernoLeave year.
employee_numberstring (max 10)noInternal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)noEmployee number as shown to users (the external identifier). Not guaranteed unique across employees.
employee_namestring (max 600)noEmployee display name.
leave_typestring (max 100)noLeave type description.
leave_type_codestring (max 10)noLeave type code.
leave_type_namestring (max 50)noLeave type name.
from_datedate (YYYY-MM-DD)noFirst day of leave.
to_datedate (YYYY-MM-DD)noLast day of leave.
number_of_daysnumbernoNumber of leave days.
half_day_informationstring (max 20)noHalf-day code and session (code/session) when the application has a day breakdown.
approval_statusstring (max 20)noApproval state of the application. One of: approved, pending, rejected, cancelled.
applied_statusintegernoApplied-status flag of the application.
approved_statusintegernoApproved flag of the application (0 or 1).
leave_commentsstring (max 500)noComments entered with the application.
leave_reason_codeintegernoLeave reason code.
leave_reason_descriptionstring (max 500)noLeave reason description.
start_timestring (HH:mm)noStart time for short (time-based) leave. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
end_timestring (HH:mm)noEnd time for short (time-based) leave. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
commentsstring (max 250)noAdditional comments.
cover_date_1date (YYYY-MM-DD)noCover date 1 (short leave).
cover_date_2date (YYYY-MM-DD)noCover date 2 (short leave).
type_statusintegernoShort-leave type status.
curl
curl -X POST "$BASE_URL/api/leave_application_staging" \
  -H "Content-Type: application/json" \
  -d '{
  "batch_id": "example-0001",
  "row_id": 1,
  "leave_application_id": 101,
  "leave_year": 101,
  "employee_number": "s1-employe",
  "employee_display_number": "s1-employee_",
  "employee_name": "s1-employee_",
  "leave_type": "s1-leave_typ",
  "leave_type_code": "s1-leave_t",
  "leave_type_name": "s1-leave_typ",
  "from_date": "2026-03-14",
  "to_date": "2026-03-14",
  "number_of_days": 12.5,
  "half_day_information": "s1-half_day_",
  "approval_status": "s1-approval_",
  "applied_status": 101,
  "approved_status": 101,
  "leave_comments": "s1-leave_com",
  "leave_reason_code": 101,
  "leave_reason_description": "s1-leave_rea",
  "start_time": "08:30",
  "end_time": "08:30",
  "comments": "s1-commentsx",
  "cover_date_1": "2026-03-14",
  "cover_date_2": "2026-03-14",
  "type_status": 101
}'
Response 201 Created
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Pending",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": null,
      "processed_at": null,
      "leave_application_id": 101,
      "leave_year": 101,
      "employee_number": "s1-employe",
      "employee_display_number": "s1-employee_",
      "employee_name": "s1-employee_",
      "leave_type": "s1-leave_typ",
      "leave_type_code": "s1-leave_t",
      "leave_type_name": "s1-leave_typ",
      "from_date": "2026-03-14",
      "to_date": "2026-03-14",
      "number_of_days": 12.5,
      "half_day_information": "s1-half_day_",
      "approval_status": "s1-approval_",
      "applied_status": 101,
      "approved_status": 101,
      "leave_comments": "s1-leave_com",
      "leave_reason_code": 101,
      "leave_reason_description": "s1-leave_rea",
      "start_time": "08:30",
      "end_time": "08:30",
      "comments": "s1-commentsx",
      "cover_date_1": "2026-03-14",
      "cover_date_2": "2026-03-14",
      "type_status": 101
    }
  ]
}

Example values follow the generator the repository's API tests post for this feed (New-InboundSampleValues in tests/Common.ps1): they show each field's type and size, not real data.

GET /api/leave_application_staging

Read Leave Applications submission results

Returns received rows with their status and error_message. Filter by your batch_id. Rows stay Pending until the background job runs (every minute) and the batch has been quiet for 2 minutes; poll until no row is Pending or Processing.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Query parameters

All optional.

NameTypeDescription
$filterstringFilter expression. Operators eq ne gt ge lt le, combined with and, or, not and parentheses. Strings in single quotes. Example: employee_number eq 'ZZT00611'.
$selectstringComma-separated fields to return. Omit for all fields.
$orderbystringSort order: field names, each optionally followed by asc or desc.
$firstintegerPage size. Default 100, maximum 1000.
$afterstringContinuation token. Do not build it: follow nextLink from the previous page.
curl
curl -G "$BASE_URL/api/leave_application_staging" \
  --data-urlencode "\$filter=batch_id eq 'example-0001'" \
  --data-urlencode "\$orderby=row_id"
Response 200 OK
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Applied",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "leave_application_id": 101,
      "leave_year": 101,
      "employee_number": "s1-employe",
      "employee_display_number": "s1-employee_",
      "employee_name": "s1-employee_",
      "leave_type": "s1-leave_typ",
      "leave_type_code": "s1-leave_t",
      "leave_type_name": "s1-leave_typ",
      "from_date": "2026-03-14",
      "to_date": "2026-03-14",
      "number_of_days": 12.5,
      "half_day_information": "s1-half_day_",
      "approval_status": "s1-approval_",
      "applied_status": 101,
      "approved_status": 101,
      "leave_comments": "s1-leave_com",
      "leave_reason_code": 101,
      "leave_reason_description": "s1-leave_rea",
      "start_time": "08:30",
      "end_time": "08:30",
      "comments": "s1-commentsx",
      "cover_date_1": "2026-03-14",
      "cover_date_2": "2026-03-14",
      "type_status": 101
    }
  ]
}

After processing. Example values follow the generator the repository's API tests post for this feed (New-InboundSampleValues in tests/Common.ps1): they show each field's type and size, not real data.

Response fields (32)
FieldTypeDescription
staging_idintegerServer-assigned identifier of the staging row. Read only.
batch_idstring (max 50)Sender-chosen identifier that groups the rows of one submission (max 50 characters). Use a new value for every submission and read results back by it.
row_idintegerSender-chosen row number, unique within the batch. (batch_id, row_id) is unique: re-posting the same pair is refused, which makes a retried POST safe.
statusstring (max 10)Processing state of the row. Pending: received, not yet picked up. Processing: claimed by the background job. Applied: written to PeoplesHR (or copied to the dump table for dump feeds). Rejected: not applied, see error_message. Read only. One of: Pending, Processing, Applied, Rejected.
error_messagestring (max 2000)Why the row was rejected (several reasons are joined with ; ). Null when the row was applied. Read only.
received_atdate-time (UTC)UTC time the row was received. Read only.
claimed_atdate-time (UTC)UTC time the background job claimed the row. Read only.
processed_atdate-time (UTC)UTC time the row reached Applied or Rejected. Read only.
leave_application_idintegerLeave application identifier.
leave_yearintegerLeave year.
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)Employee number as shown to users (the external identifier). Not guaranteed unique across employees.
employee_namestring (max 600)Employee display name.
leave_typestring (max 100)Leave type description.
leave_type_codestring (max 10)Leave type code.
leave_type_namestring (max 50)Leave type name.
from_datedate (YYYY-MM-DD)First day of leave.
to_datedate (YYYY-MM-DD)Last day of leave.
number_of_daysnumberNumber of leave days.
half_day_informationstring (max 20)Half-day code and session (code/session) when the application has a day breakdown.
approval_statusstring (max 20)Approval state of the application. One of: approved, pending, rejected, cancelled.
applied_statusintegerApplied-status flag of the application.
approved_statusintegerApproved flag of the application (0 or 1).
leave_commentsstring (max 500)Comments entered with the application.
leave_reason_codeintegerLeave reason code.
leave_reason_descriptionstring (max 500)Leave reason description.
start_timestring (HH:mm)Start time for short (time-based) leave. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
end_timestring (HH:mm)End time for short (time-based) leave. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
commentsstring (max 250)Additional comments.
cover_date_1date (YYYY-MM-DD)Cover date 1 (short leave).
cover_date_2date (YYYY-MM-DD)Cover date 2 (short leave).
type_statusintegerShort-leave type status.

GET /api/leave_application_staging/staging_id/{staging_id}

Get one received Leave Applications row

Returns one received row by its staging_id (from the POST response). Unknown id: 404.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Path parameters

NameTypeDescription
staging_idintegerServer-assigned identifier of the staging row. Read only. Required.

Query parameters

All optional.

NameTypeDescription
$selectstringComma-separated fields to return. Omit for all fields.
curl
STAGING_ID='…'
curl "$BASE_URL/api/leave_application_staging/staging_id/$STAGING_ID"
Response 200 OK
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Applied",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "leave_application_id": 101,
      "leave_year": 101,
      "employee_number": "s1-employe",
      "employee_display_number": "s1-employee_",
      "employee_name": "s1-employee_",
      "leave_type": "s1-leave_typ",
      "leave_type_code": "s1-leave_t",
      "leave_type_name": "s1-leave_typ",
      "from_date": "2026-03-14",
      "to_date": "2026-03-14",
      "number_of_days": 12.5,
      "half_day_information": "s1-half_day_",
      "approval_status": "s1-approval_",
      "applied_status": 101,
      "approved_status": 101,
      "leave_comments": "s1-leave_com",
      "leave_reason_code": 101,
      "leave_reason_description": "s1-leave_rea",
      "start_time": "08:30",
      "end_time": "08:30",
      "comments": "s1-commentsx",
      "cover_date_1": "2026-03-14",
      "cover_date_2": "2026-03-14",
      "type_status": 101
    }
  ]
}

Leave Balances (inbound)

Send Leave Balances data into PeoplesHR.

Processing rules

Delivered to: the PeoplesHR.dump_leave_balance table in the PeoplesHR database, for the implementation team to process. Rows are copied as sent: nothing is validated or looked up, so a row is never Rejected. Applied means "copied".

POST /api/leave_balance_staging

Submit one Leave Balances row

Stores one row for background processing and returns it with status Pending. Send every row of a submission with the same batch_id and a distinct row_id, then read the results with the next endpoint. Re-posting a (batch_id, row_id) pair that was already received is refused (HTTP status 400 or above) and stores nothing.

Headers

HeaderValueNotes
Content-Typeapplication/jsonRequired. The body is JSON.
AuthenticationWhatever your API gateway requires (see Authentication).

Request body

A JSON object. Required: batch_id, row_id; every other field is optional (null or omitted means "not supplied"). Do not send staging_id, status, error_message, received_at, claimed_at, processed_at: the server sets them.

Body fields (13)
FieldTypeRequiredDescription
batch_idstring (max 50)yesSender-chosen identifier that groups the rows of one submission (max 50 characters). Use a new value for every submission and read results back by it.
row_idintegeryesSender-chosen row number, unique within the batch. (batch_id, row_id) is unique: re-posting the same pair is refused, which makes a retried POST safe.
employee_numberstring (max 10)noInternal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)noEmployee number as shown to users (the external identifier). Not guaranteed unique across employees.
employee_namestring (max 600)noEmployee display name.
leave_yearintegernoLeave year.
leave_typestring (max 100)noLeave type description.
leave_type_codestring (max 10)noLeave type code.
leave_type_namestring (max 50)noLeave type name.
entitlementnumbernoDays entitled for the employee, leave type and year.
balancenumbernoDays remaining for the employee, leave type and year.
utilizednumbernoDays used for the employee, leave type and year.
pendingnumbernoDays pending approval.
curl
curl -X POST "$BASE_URL/api/leave_balance_staging" \
  -H "Content-Type: application/json" \
  -d '{
  "batch_id": "example-0001",
  "row_id": 1,
  "employee_number": "s1-employe",
  "employee_display_number": "s1-employee_",
  "employee_name": "s1-employee_",
  "leave_year": 101,
  "leave_type": "s1-leave_typ",
  "leave_type_code": "s1-leave_t",
  "leave_type_name": "s1-leave_typ",
  "entitlement": 12.5,
  "balance": 12.5,
  "utilized": 12.5,
  "pending": 12.5
}'
Response 201 Created
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Pending",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": null,
      "processed_at": null,
      "employee_number": "s1-employe",
      "employee_display_number": "s1-employee_",
      "employee_name": "s1-employee_",
      "leave_year": 101,
      "leave_type": "s1-leave_typ",
      "leave_type_code": "s1-leave_t",
      "leave_type_name": "s1-leave_typ",
      "entitlement": 12.5,
      "balance": 12.5,
      "utilized": 12.5,
      "pending": 12.5
    }
  ]
}

Example values follow the generator the repository's API tests post for this feed (New-InboundSampleValues in tests/Common.ps1): they show each field's type and size, not real data.

GET /api/leave_balance_staging

Read Leave Balances submission results

Returns received rows with their status and error_message. Filter by your batch_id. Rows stay Pending until the background job runs (every minute) and the batch has been quiet for 2 minutes; poll until no row is Pending or Processing.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Query parameters

All optional.

NameTypeDescription
$filterstringFilter expression. Operators eq ne gt ge lt le, combined with and, or, not and parentheses. Strings in single quotes. Example: employee_number eq 'ZZT00611'.
$selectstringComma-separated fields to return. Omit for all fields.
$orderbystringSort order: field names, each optionally followed by asc or desc.
$firstintegerPage size. Default 100, maximum 1000.
$afterstringContinuation token. Do not build it: follow nextLink from the previous page.
curl
curl -G "$BASE_URL/api/leave_balance_staging" \
  --data-urlencode "\$filter=batch_id eq 'example-0001'" \
  --data-urlencode "\$orderby=row_id"
Response 200 OK
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Applied",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "employee_number": "s1-employe",
      "employee_display_number": "s1-employee_",
      "employee_name": "s1-employee_",
      "leave_year": 101,
      "leave_type": "s1-leave_typ",
      "leave_type_code": "s1-leave_t",
      "leave_type_name": "s1-leave_typ",
      "entitlement": 12.5,
      "balance": 12.5,
      "utilized": 12.5,
      "pending": 12.5
    }
  ]
}

After processing. Example values follow the generator the repository's API tests post for this feed (New-InboundSampleValues in tests/Common.ps1): they show each field's type and size, not real data.

Response fields (19)
FieldTypeDescription
staging_idintegerServer-assigned identifier of the staging row. Read only.
batch_idstring (max 50)Sender-chosen identifier that groups the rows of one submission (max 50 characters). Use a new value for every submission and read results back by it.
row_idintegerSender-chosen row number, unique within the batch. (batch_id, row_id) is unique: re-posting the same pair is refused, which makes a retried POST safe.
statusstring (max 10)Processing state of the row. Pending: received, not yet picked up. Processing: claimed by the background job. Applied: written to PeoplesHR (or copied to the dump table for dump feeds). Rejected: not applied, see error_message. Read only. One of: Pending, Processing, Applied, Rejected.
error_messagestring (max 2000)Why the row was rejected (several reasons are joined with ; ). Null when the row was applied. Read only.
received_atdate-time (UTC)UTC time the row was received. Read only.
claimed_atdate-time (UTC)UTC time the background job claimed the row. Read only.
processed_atdate-time (UTC)UTC time the row reached Applied or Rejected. Read only.
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)Employee number as shown to users (the external identifier). Not guaranteed unique across employees.
employee_namestring (max 600)Employee display name.
leave_yearintegerLeave year.
leave_typestring (max 100)Leave type description.
leave_type_codestring (max 10)Leave type code.
leave_type_namestring (max 50)Leave type name.
entitlementnumberDays entitled for the employee, leave type and year.
balancenumberDays remaining for the employee, leave type and year.
utilizednumberDays used for the employee, leave type and year.
pendingnumberDays pending approval.

GET /api/leave_balance_staging/staging_id/{staging_id}

Get one received Leave Balances row

Returns one received row by its staging_id (from the POST response). Unknown id: 404.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Path parameters

NameTypeDescription
staging_idintegerServer-assigned identifier of the staging row. Read only. Required.

Query parameters

All optional.

NameTypeDescription
$selectstringComma-separated fields to return. Omit for all fields.
curl
STAGING_ID='…'
curl "$BASE_URL/api/leave_balance_staging/staging_id/$STAGING_ID"
Response 200 OK
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Applied",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "employee_number": "s1-employe",
      "employee_display_number": "s1-employee_",
      "employee_name": "s1-employee_",
      "leave_year": 101,
      "leave_type": "s1-leave_typ",
      "leave_type_code": "s1-leave_t",
      "leave_type_name": "s1-leave_typ",
      "entitlement": 12.5,
      "balance": 12.5,
      "utilized": 12.5,
      "pending": 12.5
    }
  ]
}

Attendance Information

Daily attendance: roster, clock in and out, worked hours, lateness and overtime.

GET /api/attendance_information

List Attendance Information

Daily attendance: roster, clock in and out, worked hours, lateness and overtime. Returns one page of rows; follow nextLink until it is absent to read every row.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Query parameters

All optional.

NameTypeDescription
$filterstringFilter expression. Operators eq ne gt ge lt le, combined with and, or, not and parentheses. Strings in single quotes. Example: employee_number eq 'ZZT00611'.
$selectstringComma-separated fields to return. Omit for all fields.
$orderbystringSort order: field names, each optionally followed by asc or desc.
$firstintegerPage size. Default 100, maximum 1000.
$afterstringContinuation token. Do not build it: follow nextLink from the previous page.
curl
curl -G "$BASE_URL/api/attendance_information" \
  --data-urlencode "\$select=roster_date,employee_number,in_time,out_time,work_hours" \
  --data-urlencode "\$orderby=roster_date desc" \
  --data-urlencode "\$first=10"
Response 200 OK
{
  "value": [
    {
      "roster_date": "<YYYY-MM-DD>",
      "employee_number": "<string>",
      "in_time": "<HH:mm>",
      "out_time": "<HH:mm>",
      "work_hours": "<HH:mm>"
    }
  ],
  "nextLink": "/api/attendance_information?$select=roster_date,employee_number,in_time,out_time,work_hours&$orderby=roster_date%20desc&$first=10&$after=<token>"
}

Values in angle brackets are placeholders: the repository has no fixed data for this area.

Response fields (33)
FieldTypeDescription
roster_datedate (YYYY-MM-DD)Roster (working) date the record belongs to.
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)Employee number as shown to users (the external identifier). Not guaranteed unique across employees.
employee_namestring (max 600)Employee display name.
shiftstring (max 25)Shift name.
shift_codestring (max 5)Shift short code.
rosterstring (max 200)Roster name.
roster_codestring (max 200)Roster display code.
in_datedate (YYYY-MM-DD)Actual clock-in date.
in_timestring (HH:mm)Actual clock-in time. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
out_datedate (YYYY-MM-DD)Actual clock-out date.
out_timestring (HH:mm)Actual clock-out time. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
present_statusstring (max 7)Presence on the roster date. One of: Present, Absent.
day_typestring (max 150)Day type (for example working day or holiday type).
work_hoursstring (HH:mm)Hours worked. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
no_pay_daysnumberNo-pay days for the date (0 to 1).
pre_ot_hoursstring (HH:mm)Overtime before the shift (all rates). Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
post_ot_hoursstring (HH:mm)Overtime after the shift (all rates). Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
late_hoursstring (HH:mm)Late arrival. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
early_departure_hoursstring (HH:mm)Early departure. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
approved_late_hoursstring (HH:mm)Approved late arrival. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
normal_otstring (HH:mm)Normal-rate overtime, calculated. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
approved_normal_otstring (HH:mm)Normal-rate overtime, approved. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
pre_approved_normal_otstring (HH:mm)Pre-shift normal-rate overtime, approved. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
double_otstring (HH:mm)Double-rate overtime, calculated. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
approved_double_otstring (HH:mm)Double-rate overtime, approved. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
triple_otstring (HH:mm)Triple-rate overtime, calculated. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
approved_triple_otstring (HH:mm)Triple-rate overtime, approved. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
ot_2_5xstring (HH:mm)Overtime at 2.5x. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours). Always null in the current release (the view returns NULL for this field).
ot_3_5xstring (HH:mm)Overtime at 3.5x. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours). Always null in the current release (the view returns NULL for this field).
ot_1_75xstring (HH:mm)Overtime at 1.75x. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours). Always null in the current release (the view returns NULL for this field).
break_within_shiftstring (HH:mm)Break taken within the shift. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours). Always null in the current release (the view returns NULL for this field).
break_within_otstring (HH:mm)Break taken within overtime. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours). Always null in the current release (the view returns NULL for this field).

GET /api/attendance_information/roster_date/{roster_date}/employee_number/{employee_number}

Get one Attendance Information row

Returns the row with the given key (roster_date, employee_number). The row is still wrapped in value (an array of one row). Unknown key: 404. Percent-encode key values that contain spaces or reserved characters (for example January 2026 → January%202026).

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Path parameters

NameTypeDescription
roster_datedate (YYYY-MM-DD)Roster (working) date the record belongs to. Required.
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key). Required.

Query parameters

All optional.

NameTypeDescription
$selectstringComma-separated fields to return. Omit for all fields.
curl
ROSTER_DATE='…'
EMPLOYEE_NUMBER='…'
curl "$BASE_URL/api/attendance_information/roster_date/$ROSTER_DATE/employee_number/$EMPLOYEE_NUMBER"
Response 200 OK
{
  "value": [
    {
      "roster_date": "<YYYY-MM-DD>",
      "employee_number": "<string>",
      "employee_display_number": "<string>",
      "employee_name": "<string>",
      "shift": "<string>",
      "shift_code": "<string>",
      "roster": "<string>",
      "roster_code": "<string>",
      "in_date": "<YYYY-MM-DD>",
      "in_time": "<HH:mm>",
      "out_date": "<YYYY-MM-DD>",
      "out_time": "<HH:mm>",
      "present_status": "Present",
      "day_type": "<string>",
      "work_hours": "<HH:mm>",
      "no_pay_days": "<number>",
      "pre_ot_hours": "<HH:mm>",
      "post_ot_hours": "<HH:mm>",
      "late_hours": "<HH:mm>",
      "early_departure_hours": "<HH:mm>",
      "approved_late_hours": "<HH:mm>",
      "normal_ot": "<HH:mm>",
      "approved_normal_ot": "<HH:mm>",
      "pre_approved_normal_ot": "<HH:mm>",
      "double_ot": "<HH:mm>",
      "approved_double_ot": "<HH:mm>",
      "triple_ot": "<HH:mm>",
      "approved_triple_ot": "<HH:mm>",
      "ot_2_5x": null,
      "ot_3_5x": null,
      "ot_1_75x": null,
      "break_within_shift": null,
      "break_within_ot": null
    }
  ]
}

Attendance (inbound)

Send Attendance data into PeoplesHR.

Processing rules

Delivered to: the PeoplesHR.dump_attendance table in the PeoplesHR database, for the implementation team to process. Rows are copied as sent: nothing is validated or looked up, so a row is never Rejected. Applied means "copied".

POST /api/attendance_staging

Submit one Attendance row

Stores one row for background processing and returns it with status Pending. Send every row of a submission with the same batch_id and a distinct row_id, then read the results with the next endpoint. Re-posting a (batch_id, row_id) pair that was already received is refused (HTTP status 400 or above) and stores nothing.

Headers

HeaderValueNotes
Content-Typeapplication/jsonRequired. The body is JSON.
AuthenticationWhatever your API gateway requires (see Authentication).

Request body

A JSON object. Required: batch_id, row_id; every other field is optional (null or omitted means "not supplied"). Do not send staging_id, status, error_message, received_at, claimed_at, processed_at: the server sets them.

Body fields (35)
FieldTypeRequiredDescription
batch_idstring (max 50)yesSender-chosen identifier that groups the rows of one submission (max 50 characters). Use a new value for every submission and read results back by it.
row_idintegeryesSender-chosen row number, unique within the batch. (batch_id, row_id) is unique: re-posting the same pair is refused, which makes a retried POST safe.
roster_datedate (YYYY-MM-DD)noRoster (working) date the record belongs to.
employee_numberstring (max 10)noInternal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)noEmployee number as shown to users (the external identifier). Not guaranteed unique across employees.
employee_namestring (max 600)noEmployee display name.
shiftstring (max 25)noShift name.
shift_codestring (max 5)noShift short code.
rosterstring (max 200)noRoster name.
roster_codestring (max 200)noRoster display code.
in_datedate (YYYY-MM-DD)noActual clock-in date.
in_timestring (HH:mm)noActual clock-in time. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
out_datedate (YYYY-MM-DD)noActual clock-out date.
out_timestring (HH:mm)noActual clock-out time. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
present_statusstring (max 7)noPresence on the roster date. One of: Present, Absent.
day_typestring (max 150)noDay type (for example working day or holiday type).
work_hoursstring (HH:mm)noHours worked. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
no_pay_daysnumbernoNo-pay days for the date (0 to 1).
pre_ot_hoursstring (HH:mm)noOvertime before the shift (all rates). Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
post_ot_hoursstring (HH:mm)noOvertime after the shift (all rates). Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
late_hoursstring (HH:mm)noLate arrival. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
early_departure_hoursstring (HH:mm)noEarly departure. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
approved_late_hoursstring (HH:mm)noApproved late arrival. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
normal_otstring (HH:mm)noNormal-rate overtime, calculated. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
approved_normal_otstring (HH:mm)noNormal-rate overtime, approved. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
pre_approved_normal_otstring (HH:mm)noPre-shift normal-rate overtime, approved. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
double_otstring (HH:mm)noDouble-rate overtime, calculated. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
approved_double_otstring (HH:mm)noDouble-rate overtime, approved. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
triple_otstring (HH:mm)noTriple-rate overtime, calculated. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
approved_triple_otstring (HH:mm)noTriple-rate overtime, approved. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
ot_2_5xstring (HH:mm)noOvertime at 2.5x. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
ot_3_5xstring (HH:mm)noOvertime at 3.5x. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
ot_1_75xstring (HH:mm)noOvertime at 1.75x. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
break_within_shiftstring (HH:mm)noBreak taken within the shift. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
break_within_otstring (HH:mm)noBreak taken within overtime. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
curl
curl -X POST "$BASE_URL/api/attendance_staging" \
  -H "Content-Type: application/json" \
  -d '{
  "batch_id": "example-0001",
  "row_id": 1,
  "roster_date": "2026-03-14",
  "employee_number": "s1-employe",
  "employee_display_number": "s1-employee_",
  "employee_name": "s1-employee_",
  "shift": "s1-shiftxxxx",
  "shift_code": "s1-sh",
  "roster": "s1-rosterxxx",
  "roster_code": "s1-roster_co",
  "in_date": "2026-03-14",
  "in_time": "08:30",
  "out_date": "2026-03-14",
  "out_time": "08:30",
  "present_status": "s1-pres",
  "day_type": "s1-day_typex",
  "work_hours": "08:30",
  "no_pay_days": 12.5,
  "pre_ot_hours": "08:30",
  "post_ot_hours": "08:30",
  "late_hours": "08:30",
  "early_departure_hours": "08:30",
  "approved_late_hours": "08:30",
  "normal_ot": "08:30",
  "approved_normal_ot": "08:30",
  "pre_approved_normal_ot": "08:30",
  "double_ot": "08:30",
  "approved_double_ot": "08:30",
  "triple_ot": "08:30",
  "approved_triple_ot": "08:30",
  "ot_2_5x": "08:30",
  "ot_3_5x": "08:30",
  "ot_1_75x": "08:30",
  "break_within_shift": "08:30",
  "break_within_ot": "08:30"
}'
Response 201 Created
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Pending",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": null,
      "processed_at": null,
      "roster_date": "2026-03-14",
      "employee_number": "s1-employe",
      "employee_display_number": "s1-employee_",
      "employee_name": "s1-employee_",
      "shift": "s1-shiftxxxx",
      "shift_code": "s1-sh",
      "roster": "s1-rosterxxx",
      "roster_code": "s1-roster_co",
      "in_date": "2026-03-14",
      "in_time": "08:30",
      "out_date": "2026-03-14",
      "out_time": "08:30",
      "present_status": "s1-pres",
      "day_type": "s1-day_typex",
      "work_hours": "08:30",
      "no_pay_days": 12.5,
      "pre_ot_hours": "08:30",
      "post_ot_hours": "08:30",
      "late_hours": "08:30",
      "early_departure_hours": "08:30",
      "approved_late_hours": "08:30",
      "normal_ot": "08:30",
      "approved_normal_ot": "08:30",
      "pre_approved_normal_ot": "08:30",
      "double_ot": "08:30",
      "approved_double_ot": "08:30",
      "triple_ot": "08:30",
      "approved_triple_ot": "08:30",
      "ot_2_5x": "08:30",
      "ot_3_5x": "08:30",
      "ot_1_75x": "08:30",
      "break_within_shift": "08:30",
      "break_within_ot": "08:30"
    }
  ]
}

Example values follow the generator the repository's API tests post for this feed (New-InboundSampleValues in tests/Common.ps1): they show each field's type and size, not real data.

GET /api/attendance_staging

Read Attendance submission results

Returns received rows with their status and error_message. Filter by your batch_id. Rows stay Pending until the background job runs (every minute) and the batch has been quiet for 2 minutes; poll until no row is Pending or Processing.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Query parameters

All optional.

NameTypeDescription
$filterstringFilter expression. Operators eq ne gt ge lt le, combined with and, or, not and parentheses. Strings in single quotes. Example: employee_number eq 'ZZT00611'.
$selectstringComma-separated fields to return. Omit for all fields.
$orderbystringSort order: field names, each optionally followed by asc or desc.
$firstintegerPage size. Default 100, maximum 1000.
$afterstringContinuation token. Do not build it: follow nextLink from the previous page.
curl
curl -G "$BASE_URL/api/attendance_staging" \
  --data-urlencode "\$filter=batch_id eq 'example-0001'" \
  --data-urlencode "\$orderby=row_id"
Response 200 OK
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Applied",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "roster_date": "2026-03-14",
      "employee_number": "s1-employe",
      "employee_display_number": "s1-employee_",
      "employee_name": "s1-employee_",
      "shift": "s1-shiftxxxx",
      "shift_code": "s1-sh",
      "roster": "s1-rosterxxx",
      "roster_code": "s1-roster_co",
      "in_date": "2026-03-14",
      "in_time": "08:30",
      "out_date": "2026-03-14",
      "out_time": "08:30",
      "present_status": "s1-pres",
      "day_type": "s1-day_typex",
      "work_hours": "08:30",
      "no_pay_days": 12.5,
      "pre_ot_hours": "08:30",
      "post_ot_hours": "08:30",
      "late_hours": "08:30",
      "early_departure_hours": "08:30",
      "approved_late_hours": "08:30",
      "normal_ot": "08:30",
      "approved_normal_ot": "08:30",
      "pre_approved_normal_ot": "08:30",
      "double_ot": "08:30",
      "approved_double_ot": "08:30",
      "triple_ot": "08:30",
      "approved_triple_ot": "08:30",
      "ot_2_5x": "08:30",
      "ot_3_5x": "08:30",
      "ot_1_75x": "08:30",
      "break_within_shift": "08:30",
      "break_within_ot": "08:30"
    }
  ]
}

After processing. Example values follow the generator the repository's API tests post for this feed (New-InboundSampleValues in tests/Common.ps1): they show each field's type and size, not real data.

Response fields (41)
FieldTypeDescription
staging_idintegerServer-assigned identifier of the staging row. Read only.
batch_idstring (max 50)Sender-chosen identifier that groups the rows of one submission (max 50 characters). Use a new value for every submission and read results back by it.
row_idintegerSender-chosen row number, unique within the batch. (batch_id, row_id) is unique: re-posting the same pair is refused, which makes a retried POST safe.
statusstring (max 10)Processing state of the row. Pending: received, not yet picked up. Processing: claimed by the background job. Applied: written to PeoplesHR (or copied to the dump table for dump feeds). Rejected: not applied, see error_message. Read only. One of: Pending, Processing, Applied, Rejected.
error_messagestring (max 2000)Why the row was rejected (several reasons are joined with ; ). Null when the row was applied. Read only.
received_atdate-time (UTC)UTC time the row was received. Read only.
claimed_atdate-time (UTC)UTC time the background job claimed the row. Read only.
processed_atdate-time (UTC)UTC time the row reached Applied or Rejected. Read only.
roster_datedate (YYYY-MM-DD)Roster (working) date the record belongs to.
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)Employee number as shown to users (the external identifier). Not guaranteed unique across employees.
employee_namestring (max 600)Employee display name.
shiftstring (max 25)Shift name.
shift_codestring (max 5)Shift short code.
rosterstring (max 200)Roster name.
roster_codestring (max 200)Roster display code.
in_datedate (YYYY-MM-DD)Actual clock-in date.
in_timestring (HH:mm)Actual clock-in time. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
out_datedate (YYYY-MM-DD)Actual clock-out date.
out_timestring (HH:mm)Actual clock-out time. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
present_statusstring (max 7)Presence on the roster date. One of: Present, Absent.
day_typestring (max 150)Day type (for example working day or holiday type).
work_hoursstring (HH:mm)Hours worked. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
no_pay_daysnumberNo-pay days for the date (0 to 1).
pre_ot_hoursstring (HH:mm)Overtime before the shift (all rates). Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
post_ot_hoursstring (HH:mm)Overtime after the shift (all rates). Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
late_hoursstring (HH:mm)Late arrival. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
early_departure_hoursstring (HH:mm)Early departure. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
approved_late_hoursstring (HH:mm)Approved late arrival. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
normal_otstring (HH:mm)Normal-rate overtime, calculated. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
approved_normal_otstring (HH:mm)Normal-rate overtime, approved. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
pre_approved_normal_otstring (HH:mm)Pre-shift normal-rate overtime, approved. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
double_otstring (HH:mm)Double-rate overtime, calculated. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
approved_double_otstring (HH:mm)Double-rate overtime, approved. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
triple_otstring (HH:mm)Triple-rate overtime, calculated. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
approved_triple_otstring (HH:mm)Triple-rate overtime, approved. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
ot_2_5xstring (HH:mm)Overtime at 2.5x. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
ot_3_5xstring (HH:mm)Overtime at 3.5x. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
ot_1_75xstring (HH:mm)Overtime at 1.75x. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
break_within_shiftstring (HH:mm)Break taken within the shift. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).
break_within_otstring (HH:mm)Break taken within overtime. Duration or clock time as text in HH:mm (hours and minutes, not decimal hours).

GET /api/attendance_staging/staging_id/{staging_id}

Get one received Attendance row

Returns one received row by its staging_id (from the POST response). Unknown id: 404.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Path parameters

NameTypeDescription
staging_idintegerServer-assigned identifier of the staging row. Read only. Required.

Query parameters

All optional.

NameTypeDescription
$selectstringComma-separated fields to return. Omit for all fields.
curl
STAGING_ID='…'
curl "$BASE_URL/api/attendance_staging/staging_id/$STAGING_ID"
Response 200 OK
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Applied",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "roster_date": "2026-03-14",
      "employee_number": "s1-employe",
      "employee_display_number": "s1-employee_",
      "employee_name": "s1-employee_",
      "shift": "s1-shiftxxxx",
      "shift_code": "s1-sh",
      "roster": "s1-rosterxxx",
      "roster_code": "s1-roster_co",
      "in_date": "2026-03-14",
      "in_time": "08:30",
      "out_date": "2026-03-14",
      "out_time": "08:30",
      "present_status": "s1-pres",
      "day_type": "s1-day_typex",
      "work_hours": "08:30",
      "no_pay_days": 12.5,
      "pre_ot_hours": "08:30",
      "post_ot_hours": "08:30",
      "late_hours": "08:30",
      "early_departure_hours": "08:30",
      "approved_late_hours": "08:30",
      "normal_ot": "08:30",
      "approved_normal_ot": "08:30",
      "pre_approved_normal_ot": "08:30",
      "double_ot": "08:30",
      "approved_double_ot": "08:30",
      "triple_ot": "08:30",
      "approved_triple_ot": "08:30",
      "ot_2_5x": "08:30",
      "ot_3_5x": "08:30",
      "ot_1_75x": "08:30",
      "break_within_shift": "08:30",
      "break_within_ot": "08:30"
    }
  ]
}

Payroll Information

Processed payroll results, one row per employee, pay period and pay item.

GET /api/payroll_information

List Payroll Information

Processed payroll results, one row per employee, pay period and pay item. Returns one page of rows; follow nextLink until it is absent to read every row.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Query parameters

All optional.

NameTypeDescription
$filterstringFilter expression. Operators eq ne gt ge lt le, combined with and, or, not and parentheses. Strings in single quotes. Example: employee_number eq 'ZZT00611'.
$selectstringComma-separated fields to return. Omit for all fields.
$orderbystringSort order: field names, each optionally followed by asc or desc.
$firstintegerPage size. Default 100, maximum 1000.
$afterstringContinuation token. Do not build it: follow nextLink from the previous page.
curl
curl -G "$BASE_URL/api/payroll_information" \
  --data-urlencode "\$select=employee_number,pay_period,pay_item_name,amount" \
  --data-urlencode "\$orderby=employee_number desc" \
  --data-urlencode "\$first=10"
Response 200 OK
{
  "value": [
    {
      "employee_number": "<string>",
      "pay_period": "<string>",
      "pay_item_name": "<string>",
      "amount": "<number>"
    }
  ],
  "nextLink": "/api/payroll_information?$select=employee_number,pay_period,pay_item_name,amount&$orderby=employee_number%20desc&$first=10&$after=<token>"
}

Values in angle brackets are placeholders: the repository has no fixed data for this area.

Response fields (8)
FieldTypeDescription
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)Employee number as shown to users (the external identifier). Not guaranteed unique across employees.
pay_periodstring (max 50)Processed pay period label.
pay_item_namestring (max 4000)Pay item (component) name.
amountnumberProcessed amount of the pay item for the period.
basic_salarynumberCurrent basic salary of the employee (not per period; repeats on each row).
vehicle_allowancenumberVehicle allowance amount; set only on the row whose pay item is the vehicle allowance.
travelling_allowancenumberTravelling allowance. Always null in the current release (the view returns NULL for this field).

GET /api/payroll_information/employee_number/{employee_number}/pay_period/{pay_period}/pay_item_name/{pay_item_name}

Get one Payroll Information row

Returns the row with the given key (employee_number, pay_period, pay_item_name). The row is still wrapped in value (an array of one row). Unknown key: 404. Percent-encode key values that contain spaces or reserved characters (for example January 2026 → January%202026).

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Path parameters

NameTypeDescription
employee_numberstring (max 10)Internal PeoplesHR employee number (the system key). Required.
pay_periodstring (max 50)Processed pay period label. Required.
pay_item_namestring (max 4000)Pay item (component) name. Required.

Query parameters

All optional.

NameTypeDescription
$selectstringComma-separated fields to return. Omit for all fields.
curl
EMPLOYEE_NUMBER='…'
PAY_PERIOD='…'
PAY_ITEM_NAME='…'
curl "$BASE_URL/api/payroll_information/employee_number/$EMPLOYEE_NUMBER/pay_period/$PAY_PERIOD/pay_item_name/$PAY_ITEM_NAME"
Response 200 OK
{
  "value": [
    {
      "employee_number": "<string>",
      "employee_display_number": "<string>",
      "pay_period": "<string>",
      "pay_item_name": "<string>",
      "amount": "<number>",
      "basic_salary": "<number>",
      "vehicle_allowance": "<number>",
      "travelling_allowance": null
    }
  ]
}

Payroll (inbound)

Send Payroll data into PeoplesHR.

Processing rules

Delivered to: the PeoplesHR.dump_payroll table in the PeoplesHR database, for the implementation team to process. Rows are copied as sent: nothing is validated or looked up, so a row is never Rejected. Applied means "copied".

POST /api/payroll_staging

Submit one Payroll row

Stores one row for background processing and returns it with status Pending. Send every row of a submission with the same batch_id and a distinct row_id, then read the results with the next endpoint. Re-posting a (batch_id, row_id) pair that was already received is refused (HTTP status 400 or above) and stores nothing.

Headers

HeaderValueNotes
Content-Typeapplication/jsonRequired. The body is JSON.
AuthenticationWhatever your API gateway requires (see Authentication).

Request body

A JSON object. Required: batch_id, row_id; every other field is optional (null or omitted means "not supplied"). Do not send staging_id, status, error_message, received_at, claimed_at, processed_at: the server sets them.

Body fields (10)
FieldTypeRequiredDescription
batch_idstring (max 50)yesSender-chosen identifier that groups the rows of one submission (max 50 characters). Use a new value for every submission and read results back by it.
row_idintegeryesSender-chosen row number, unique within the batch. (batch_id, row_id) is unique: re-posting the same pair is refused, which makes a retried POST safe.
employee_numberstring (max 50)noInternal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)noEmployee number as shown to users (the external identifier). Not guaranteed unique across employees.
pay_periodstring (max 50)noProcessed pay period label.
pay_item_namestring (max 4000)noPay item (component) name.
amountnumbernoProcessed amount of the pay item for the period.
basic_salarynumbernoCurrent basic salary of the employee (not per period; repeats on each row).
vehicle_allowancenumbernoVehicle allowance amount; set only on the row whose pay item is the vehicle allowance.
travelling_allowancenumbernoTravelling allowance.
curl
curl -X POST "$BASE_URL/api/payroll_staging" \
  -H "Content-Type: application/json" \
  -d '{
  "batch_id": "example-0001",
  "row_id": 1,
  "employee_number": "s1-employee_",
  "employee_display_number": "s1-employee_",
  "pay_period": "s1-pay_perio",
  "pay_item_name": "s1-pay_item_",
  "amount": 12.5,
  "basic_salary": 12.5,
  "vehicle_allowance": 12.5,
  "travelling_allowance": 12.5
}'
Response 201 Created
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Pending",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": null,
      "processed_at": null,
      "employee_number": "s1-employee_",
      "employee_display_number": "s1-employee_",
      "pay_period": "s1-pay_perio",
      "pay_item_name": "s1-pay_item_",
      "amount": 12.5,
      "basic_salary": 12.5,
      "vehicle_allowance": 12.5,
      "travelling_allowance": 12.5
    }
  ]
}

Example values follow the generator the repository's API tests post for this feed (New-InboundSampleValues in tests/Common.ps1): they show each field's type and size, not real data.

GET /api/payroll_staging

Read Payroll submission results

Returns received rows with their status and error_message. Filter by your batch_id. Rows stay Pending until the background job runs (every minute) and the batch has been quiet for 2 minutes; poll until no row is Pending or Processing.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Query parameters

All optional.

NameTypeDescription
$filterstringFilter expression. Operators eq ne gt ge lt le, combined with and, or, not and parentheses. Strings in single quotes. Example: employee_number eq 'ZZT00611'.
$selectstringComma-separated fields to return. Omit for all fields.
$orderbystringSort order: field names, each optionally followed by asc or desc.
$firstintegerPage size. Default 100, maximum 1000.
$afterstringContinuation token. Do not build it: follow nextLink from the previous page.
curl
curl -G "$BASE_URL/api/payroll_staging" \
  --data-urlencode "\$filter=batch_id eq 'example-0001'" \
  --data-urlencode "\$orderby=row_id"
Response 200 OK
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Applied",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "employee_number": "s1-employee_",
      "employee_display_number": "s1-employee_",
      "pay_period": "s1-pay_perio",
      "pay_item_name": "s1-pay_item_",
      "amount": 12.5,
      "basic_salary": 12.5,
      "vehicle_allowance": 12.5,
      "travelling_allowance": 12.5
    }
  ]
}

After processing. Example values follow the generator the repository's API tests post for this feed (New-InboundSampleValues in tests/Common.ps1): they show each field's type and size, not real data.

Response fields (16)
FieldTypeDescription
staging_idintegerServer-assigned identifier of the staging row. Read only.
batch_idstring (max 50)Sender-chosen identifier that groups the rows of one submission (max 50 characters). Use a new value for every submission and read results back by it.
row_idintegerSender-chosen row number, unique within the batch. (batch_id, row_id) is unique: re-posting the same pair is refused, which makes a retried POST safe.
statusstring (max 10)Processing state of the row. Pending: received, not yet picked up. Processing: claimed by the background job. Applied: written to PeoplesHR (or copied to the dump table for dump feeds). Rejected: not applied, see error_message. Read only. One of: Pending, Processing, Applied, Rejected.
error_messagestring (max 2000)Why the row was rejected (several reasons are joined with ; ). Null when the row was applied. Read only.
received_atdate-time (UTC)UTC time the row was received. Read only.
claimed_atdate-time (UTC)UTC time the background job claimed the row. Read only.
processed_atdate-time (UTC)UTC time the row reached Applied or Rejected. Read only.
employee_numberstring (max 50)Internal PeoplesHR employee number (the system key).
employee_display_numberstring (max 25)Employee number as shown to users (the external identifier). Not guaranteed unique across employees.
pay_periodstring (max 50)Processed pay period label.
pay_item_namestring (max 4000)Pay item (component) name.
amountnumberProcessed amount of the pay item for the period.
basic_salarynumberCurrent basic salary of the employee (not per period; repeats on each row).
vehicle_allowancenumberVehicle allowance amount; set only on the row whose pay item is the vehicle allowance.
travelling_allowancenumberTravelling allowance.

GET /api/payroll_staging/staging_id/{staging_id}

Get one received Payroll row

Returns one received row by its staging_id (from the POST response). Unknown id: 404.

Headers

HeaderValueNotes
AuthenticationWhatever your API gateway requires (see Authentication).

Path parameters

NameTypeDescription
staging_idintegerServer-assigned identifier of the staging row. Read only. Required.

Query parameters

All optional.

NameTypeDescription
$selectstringComma-separated fields to return. Omit for all fields.
curl
STAGING_ID='…'
curl "$BASE_URL/api/payroll_staging/staging_id/$STAGING_ID"
Response 200 OK
{
  "value": [
    {
      "staging_id": "<integer>",
      "batch_id": "example-0001",
      "row_id": 1,
      "status": "Applied",
      "error_message": null,
      "received_at": "<YYYY-MM-DDThh:mm:ss>",
      "claimed_at": "<YYYY-MM-DDThh:mm:ss>",
      "processed_at": "<YYYY-MM-DDThh:mm:ss>",
      "employee_number": "s1-employee_",
      "employee_display_number": "s1-employee_",
      "pay_period": "s1-pay_perio",
      "pay_item_name": "s1-pay_item_",
      "amount": 12.5,
      "basic_salary": 12.5,
      "vehicle_allowance": 12.5,
      "travelling_allowance": 12.5
    }
  ]
}

GraphQL

Every entity above is also available through one GraphQL endpoint.

Entity (REST path)Query fieldMutation
employee_informationemployeeInformations—
employee_bank_informationemployeeBankInformations—
absence_leave_informationabsenceLeaveInformations—
attendance_informationattendanceInformations—
dependant_detailsdependantDetails—
payroll_informationpayrollInformations—
employee_information_stagingemployeeInformationStagingscreateEmployeeInformationStaging
leave_application_stagingleaveApplicationStagingscreateLeaveApplicationStaging
leave_balance_stagingleaveBalanceStagingscreateLeaveBalanceStaging
attendance_stagingattendanceStagingscreateAttendanceStaging
payroll_stagingpayrollStagingscreatePayrollStaging
dependant_details_stagingdependantDetailsStagingscreateDependantDetailsStaging
employee_bank_information_stagingemployeeBankInformationStagingscreateEmployeeBankInformationStaging

POST /graphql

Run a GraphQL query or mutation

Lists accept filter, orderBy, first and after arguments and return items. Inbound entities have a create… mutation only (no update or delete). Errors are returned in an errors array.

Headers

HeaderValueNotes
Content-Typeapplication/jsonRequired. The body is JSON.
AuthenticationWhatever your API gateway requires (see Authentication).

Request body

{"query": "<GraphQL document>", "variables": { … }} (variables optional).

curl
# Read dependants
curl -X POST "$BASE_URL/graphql" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "{ dependantDetails { items { employee_number employee_display_number dependant_number dependant_name dependant_type } } }"
}'

# Submit an employee row
curl -X POST "$BASE_URL/graphql" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "mutation { createEmployeeInformationStaging(item: { batch_id: \"example-gql\", row_id: 1, employee_display_number: \"ZZT-GQL\", first_name: \"Gq\", surname: \"L\" }) { batch_id row_id status } }"
}'

# Read the row back by batch_id
curl -X POST "$BASE_URL/graphql" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query { employeeInformationStagings(filter: { batch_id: { eq: \"example-gql\" } }) { items { batch_id row_id status } } }"
}'
Response 200 OK
{
  "data": {
    "createEmployeeInformationStaging": {
      "batch_id": "example-gql",
      "row_id": 1,
      "status": "Pending"
    }
  }
}

Response to the second command.