ReconSmiths Developers Your API keys

Reference

Staff and payroll

Employees, hours, leave and payslips.

This page as plain text: staff.md

PUT/v1/employees/{externalRef}

Create or update an employee

PUT, not POST: you name the person, so the same call repeated is the same person and no Idempotency-Key is needed. null leaves a field alone — a caller that does not hold salaries sends a null gross on every sync, and a null that overwrote would zero the payroll.

Parameters

NameInRequiredWhat it is
externalRefpathyesYour own id for this person, e.g. TM-4471.

Body

FieldTypeRequiredWhat it is
namestringRequired on first push. A later change is recorded as a dated rename, so a payslip already issued keeps the name it was issued in.
emailstring
employeeNostringA label, printed on the payslip. Not the key: companies renumber staff.
startedOnstring (date)Leave cycles run from this date, not from January.
endedOnstring (date)
grossnumberPer period. Omit if you do not hold salaries.
periodsinteger: 12, 13, 26, 52Default 12.
employmentTypestring: EMPLOYEE, DIRECTOR, CONTRACTOR
sourceSystemstringYour system's name, the same on every call (for example shop). Identifies your references.

Answers

200employeeId, partyId, accountCode, created
409This API key has no default company
422Refused, with the reason in words

Example

curl -X PUT 'https://api.reconsmith.com/v1/employees/EXTERNALREF' \
  -H 'Authorization: Bearer $RECONSMITH_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "email": "string",
  "employeeNo": "string",
  "startedOn": "2026-12-01"
}'

GET/v1/leave-types

The kinds of leave this company has

ReconSmith's codes, not yours. Seeded from the company's country — for South Africa, the BCEA minimums — and editable, because a contract may give more and never less.

Answers

200leaveTypes: [{ code, name, unit, daysPerCycle, cycleMonths, accrues, minServiceMonths, tracksBalance, isPaid, basis }]

Example

curl -X GET 'https://api.reconsmith.com/v1/leave-types' \
  -H 'Authorization: Bearer $RECONSMITH_KEY'

GET/v1/employees/{externalRef}/leave

What this person has left

Worked out every time from accrual, adjustments and leave taken. Never a stored number. Cycles run from the person's start date: somebody who started in March has an annual cycle ending in February.

Parameters

NameInRequiredWhat it is
externalRefpathyes
asAtqueryDefaults to today in the company's own time zone.
sourceSystemqueryYour system's name, the same on every call (for example shop). Identifies your references.

Answers

200employeeRef, asAt, balances: [{ code, name, unit, cycleStart, cycleEnd, entitlement, accrued, adjustments, taken, balance, availableFrom, basis }]. balance is null where the type tracks none, such as unpaid leave.
404Nobody here is known by that reference

Example

curl -X GET 'https://api.reconsmith.com/v1/employees/EXTERNALREF/leave' \
  -H 'Authorization: Bearer $RECONSMITH_KEY'

POST/v1/employees/{externalRef}/leave

Record approved leave

You own the request and the approval; this records what was taken. Idempotent on externalRef, so a retry after a timeout cannot deduct the same week twice — the second post returns the same leaveId with created = false. days is sent, never derived: ReconSmith does not know your working week, shift patterns or public holidays.

unpaid_days (136): with code ANNUAL, days - unpaid_days come off the annual balance and unpaid_days are recorded as unpaid leave (external_ref + '-UNPAID'). The answer carries annual_days, unpaid_days, recounted and recount_note.

Parameters

NameInRequiredWhat it is
externalRefpathyes

Body

FieldTypeRequiredWhat it is
externalRefstringyesYour id for the leave request, e.g. APP-LR-9912. The idempotency key.
codestringyesFrom GET /v1/leave-types.
firstDaystring (date)yes
lastDaystring (date)yes
daysnumberyesWorking days, as you count them.
halfDaybooleanDefault false.
notestring
sourceSystemstringYour system's name, the same on every call (for example shop). Identifies your references.
unpaid_daysnumberAnnual leave only (136). How many of days went over the annual balance when the person applied; recorded as unpaid leave and taken off the pay. The balance is counted again when the leave is posted, and if it allows a different split the answer says so (recounted, recount_note).

Answers

200leaveId, created, balanceAfter
404Nobody here is known by that reference
422Refused: no such leave type, service not yet served, or the balance would go negative

Example

curl -X POST 'https://api.reconsmith.com/v1/employees/EXTERNALREF/leave' \
  -H 'Authorization: Bearer $RECONSMITH_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "externalRef": "string",
  "code": "string",
  "firstDay": "2026-12-01",
  "lastDay": "2026-12-01",
  "days": 100
}'

POST/v1/employees/{externalRef}/leave/{leaveRef}/reverse

An approval that was withdrawn

Reversed, never deleted. The person asked, it was approved, and then it was cancelled — all three happened and all three stay on the record. Safe to repeat.

Parameters

NameInRequiredWhat it is
externalRefpathyes
leaveRefpathyesThe externalRef you posted the leave under.

Body

FieldTypeRequiredWhat it is
reasonstringyes
sourceSystemstringYour system's name, the same on every call (for example shop). Identifies your references.

Answers

200leaveId, reversed, balanceAfter. reversed is false if it was already reversed.
422No reason given, or no leave recorded under that reference

Example

curl -X POST 'https://api.reconsmith.com/v1/employees/EXTERNALREF/leave/LEAVEREF/reverse' \
  -H 'Authorization: Bearer $RECONSMITH_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "reason": "string"
}'

GET/v1/employees/{externalRef}/payslips

Which payslips this person has

Only issued ones. A draft pay run has no payslip, deliberately: it would put a figure in somebody's hands that the ledger has never seen.

Parameters

NameInRequiredWhat it is
externalRefpathyes
limitquery
sourceSystemqueryYour system's name, the same on every call (for example shop). Identifies your references.

Answers

200employeeRef, payslips: [{ id, periodStart, periodEnd, payDate, period, ccy, gross, deductions, net }]
404Nobody here is known by that reference

Example

curl -X GET 'https://api.reconsmith.com/v1/employees/EXTERNALREF/payslips' \
  -H 'Authorization: Bearer $RECONSMITH_KEY'

GET/v1/payslips/{id}/file

The payslip as a PDF

The official one, on the company's letterhead, carrying the leave balances as they stood at the end of that period. Proxied to the single renderer for the same reason the tax invoice is: a payslip somebody may have to show a bank or a landlord must not have two appearances.

Parameters

NameInRequiredWhat it is
idpathyesThe id from GET /v1/employees/{externalRef}/payslips.

Answers

200application/pdf
404Not an issued payslip here
502The renderer is unreachable or refused
503No renderer configured

Example

curl -X GET 'https://api.reconsmith.com/v1/payslips/ID/file' \
  -H 'Authorization: Bearer $RECONSMITH_KEY'

PUT/v1/employees/{externalRef}/hours/{periodRef}

One person's hours for one pay period

PUT, so idempotent: the same period sent again replaces it (an office correction). Once a posted pay run covers any of its dates, it is refused with 409.

How the pay run uses the days (South Africa, BCEA): the standing pay covers the ordinary hours of rostered days. On top of it: hours over the ordinary day (9) on a rostered day at 1.5x, or the day's multiplier if higher; the ordinary hours of a rostered Sunday or public holiday carry the extra (multiplier - 1); every hour of a rest day worked (rostered = false or rest_day_worked = true) at 1.5x or the multiplier if higher. Hourly rate = standing pay x periods a year / 52 / 45.

Unknown fields on a day are kept, not refused.

Parameters

NameInRequiredWhat it is
externalRefpathyesTM-{team member id}
periodRefpathyesAPP-HOURS-{from}-{to}

Body

FieldTypeRequiredWhat it is
period_fromstring (date)yes
period_tostring (date)yes
total_hoursnumber
on_truck_hoursnumber
off_truck_hoursnumber
source_systemstringYour system's name, the same on every call (for example shop). Identifies your references.
daysarray of objectyes
days[].datestring (date)yes
days[].hoursnumberyesDecimal hours, 0 to 16.
days[].on_truck_hoursnumber
days[].off_truck_hoursnumber
days[].correctedbooleanDefault false.
days[].day_typestring: ORDINARY, SATURDAY, SUNDAY, PUBLIC_HOLIDAYDefault "ORDINARY".
days[].rate_multipliernumber1.0 to 3.0. Sunday 1.5, public holiday 2.0. Default 1.0.
days[].rosteredbooleanDefault true.
days[].rest_day_workedbooleanNot rostered and worked anyway: every hour is overtime. Default false.

Answers

201Stored for the first time
200Replaced
404Employee not known: PUT /v1/employees/{externalRef} first
409A posted pay run covers this period
422A day outside the period, hours over 16, or an unknown day_type

Example

curl -X PUT 'https://api.reconsmith.com/v1/employees/EXTERNALREF/hours/PERIODREF' \
  -H 'Authorization: Bearer $RECONSMITH_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "period_from": "2026-12-01",
  "period_to": "2026-12-01",
  "days": [
    {
      "date": "2026-12-01",
      "hours": 100
    }
  ]
}'