Schedule an earning

Schedule one-time extra dollars for one worker (employee_id), or for every active employee and contractor the payroll can pay this earning to (everyone: true; people hired later are not added, and a worker who already has the same earning for the same rule, not yet paid, is skipped and named in skipped). earning is one of the values GET /scheduled-earnings/options lists for that worker; for custom_earning or custom_reimbursement, code is one of the company's code ids from the same read. A value the read does not list for the worker is refused.

The record is paid by the payroll that matches its rule, as its own line beside the worker's usual pay, whether or not a draft exists yet: a date by the regular payroll whose pay period includes that day (never by an off-cycle), next_payroll by the next payroll processed for the worker, regular or off-cycle. POST /payrolls/initialize reports the matches a save would pay in its scheduled_earnings block.

Which route a one-time amount takes: a bonus or other one-time amount for a future payroll is a scheduled earning; one for a named day is a date earning on that day. An amount to be paid as a separate payment, now or on a named day, outside the regular run is an off-cycle payroll (POST /payrolls) with that payday, not a scheduled earning.

A refusal because the worker already has this earning for this rule means that earning exists: the refusal names its amount, id and state. Tell the user what exists and ask; never change that earning's amount or rule unless the user asked to change that earning.

Emits scheduled_earning.created, one event per record. There is no bulk delete: list and delete the records instead. Requires the payroll plan or higher.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
integer

The worker; omit when everyone is true

boolean

Every active employee and contractor the payroll can pay this earning to, as of now; people hired later are not added. One record per worker. Not with employee_id.

string
enum
required

One of the values GET /scheduled-earnings/options lists for this worker: a standard earning (earnings[].value), or custom_earning / custom_reimbursement for one of the company's own codes (then send code)

string | null

With earning custom_earning or custom_reimbursement, the id of one of the company's codes from GET /scheduled-earnings/options (custom_earnings[].id or custom_reimbursements[].id); absent otherwise

number
required
≥ 0.01

Dollars, at most two decimal places

rule
object
required

When the earning is paid. { kind: "date", day: "YYYY-MM-DD" }: by the regular payroll whose pay period includes that day, start and end included (an off-cycle never pays a dated earning). { kind: "next_payroll" }: by the next payroll processed for the worker, regular or off-cycle, whatever its period and payday. Nothing else.

string | null

Free text shown beside the line

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json