Skip to main content
POST
Upload payroll lines

Authorizations

X-Auth-Token
string
header
required

Access token obtained from OAuth2 client credentials flow

X-Org-Id
string
header
required

Organisation to scope the request to. Required when the principal can access more than one organisation; optional for single-organisation principals (the authorizer resolves it automatically).

Headers

Request-Id
string

Optional. Your id for this request: it is carried into every log line about it, so quote it when you contact support.

Path Parameters

employeeId
string
required

Body

application/json
payElementId
string
required

The ID of the pay element associated with this payroll line.

date
string | null
required

The date the line applies to, in yyyy-MM-dd; required; a date on or before the end of the latest locked pay run's period is placed on the day after that period.

unitName
enum<string>
required

What one unit of the line is, such as Hour, Day or Fixed; required.

Available options:
Hour,
Day,
Week,
Month,
Year,
Fixed,
Informational,
Percentage
id
string

Optional unique identifier for the payroll line

description
string

The text shown for the line on the payslip; required.

unitType
enum<string>

The unit type for calculation. Amount uses payRate * units, Percentage uses payRate * (units / 100)

Available options:
Amount,
Percentage
units
number<decimal>

How many units the line pays; multiplied by payRate to give the line's value, or by payRate divided by 100 when unitType is Percentage.

payRate
number<decimal>

The rate per unit; multiplied by units to give the line's value, or by units divided by 100 when unitType is Percentage.

clientId
string | null

The client this line is billed to, if any.

chargeRate
number<decimal> | null

The rate the client is charged per charge unit; ignored once the line has been invoiced.

chargeUnits
number<decimal> | null

How many units the client is charged for; multiplied by chargeRate to give the charge, and ignored once the line has been invoiced.

Example:

1

chargeDescription
string | null

Charge description for billing; when not provided and clientId is set, defaults to the pay description.

tags
object[] | null

Tags to attach to the line, carried onto its payslip item.

originalValue
number<decimal> | null

The pre-adjustment value of this line, for callers that reduce a line and want the original kept for reporting. Stored as supplied.

canEdit
boolean | null

Whether the line can be edited in the product. Defaults to editable. Set it false for lines your own system owns, so nobody edits them in Flow Payroll and has the change overwritten by your next upload.

lineItemMetadata
object | null

Context for lines that come from a court order, a recurring line item or a pension; pension details are kept only on the pension lines the platform adds itself.

Example:
paymentDetails
object | null

Payment details (BACS information) that can override default employee bank account

poNumber
string | null

Purchase order number for billing purposes

Example:

"PO-2025-001"

attachments
object[] | null

Attachment metadata to include when creating the payroll line item (optional, only used during batch upload)

paymentAfterLeavingPattern
enum<string>

Which National Insurance earnings period this payment takes when it is made after the employment has ended. Only read on a payment after leaving, and ignored entirely for anyone who has not left. Irregular (accrued holiday, an unexpected bonus, arrears after a backdated pay award, a late commission or service charge) is charged on weekly thresholds; Regular (a payment they were expecting on their usual cycle, such as an expected bonus) keeps the employee's usual earnings period. Per CWG2 section 1.14 and NIM08400/NIM08410. Omitting it means Irregular, which is the safe default because the other direction understates NI. National Insurance is charged once per payslip, so a single Irregular payment puts the whole payslip on weekly thresholds.

Available options:
Irregular,
Regular
Example:

"Irregular"

Response

Payroll Uploaded

message
object
required

A readable message about the outcome and a stable token a client can branch on.

content
object

The data the request returns with its metadata; left out on a response that carries no data, such as most errors.

validationIssues
object[] | null

Each field the request was refused for and why; left out when the request was not refused for its fields.