Field validation
Shift fields
Every field accepted by POST /shift, with its validation rule.
View as MarkdownSend one JSON object per shift or absence day to POST /shift. Only approved records may be sent. To withdraw a shift, archive it.
Machine-readable: JSON Schema · OpenAPI
Identity#
shiftIdstringRequiredYour identifier for the shift record.
- Rule
- Unique in your system. Resubmitting the same shiftId updates the record.
- Example
"SH-000481"
companystringRequiredCompany code issued by the PayCaptain team.
- Rule
- Must match your PayCaptain company code exactly.
- Example
"ABC"
hrEmployeeIdstringRequiredThe person who worked the shift.
- Rule
- Must match an employee already sent to PayCaptain.
- Example
"9876543210"
payrollCodestringRequiredThe employment the shift belongs to.
- Rule
- Must match that person's active employment.
- Example
"123"
Shift#
datestringRequiredDate of the shift.
- Format
- YYYY-MM-DD
- Example
"2026-11-02"
typestringRequiredWhat the record represents.
- Rule
- Exactly one of the allowed values.
- Allowed values
"Working""Holiday""Sickness""Unpaid Leave"- Example
"Working"
payBasisstringRequiredHow the shift is paid.
- Rule
- Exactly one of the allowed values. Decides whether units are hours or days.
- Allowed values
"Hourly""Daily"- Example
"Hourly"
unitsnumberRequiredQuantity worked.
- Rule
- Hours when payBasis is "Hourly", days when "Daily".
- Range
- minimum 0
- Example
7.5
ratenumberRequiredRate of pay for this shift.
- Rule
- Per hour or per day, matching payBasis.
- Range
- minimum 0
- Example
15.25
sicknessDayTypestringOptionalWhether a sickness day is a qualifying day.
- Rule
- Only meaningful when type is "Sickness". "Qualifying", "Q" and "Y" mean a qualifying day; "Non Qualifying" and "N" mean it is not.
- Allowed values
"Qualifying""Q""Y""Non Qualifying""N"- Example
"Qualifying"
reasonstringOptionalReason for an absence, mainly for sickness records.
- Example
"Flu"
archivedbooleanOptionalArchive the shift so it is not paid.
- Rule
- Send true with the same shiftId to remove the shift from payroll. Records are archived, never deleted.
- Default
false- Example
false
Cost allocation#
locationstringOptionalLocation worked.
- Example
"Baker Street"
departmentstringOptionalDepartment worked.
- Example
"Marketing"
teamstringOptionalTeam worked.
- Example
"Content"
jobstringOptionalJob worked.
- Example
"Content Marketing"
Minimal valid record#
{
"shiftId": "SH-000481",
"company": "ABC",
"hrEmployeeId": "9876543210",
"payrollCode": "123",
"date": "2026-11-02",
"type": "Working",
"payBasis": "Hourly",
"units": 7.5,
"rate": 15.25
}