Edit a scheduled earning

Change the amount, note or rule of a scheduled earning that is not on a payroll yet (status: idle, state created or missed; a new date or rule on a missed one makes it created again). The worker and the earning, its code included, stay fixed: to schedule a different earning, delete this one and create another. One pending on a draft payroll cannot be edited here: delete it, which takes its line off that draft, and schedule another; a paid one cannot change. The edit is refused when it would duplicate another unpaid earning of the same worker, earning and rule. Emits scheduled_earning.updated. Requires the payroll plan or higher.

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

Unique scheduled earning identifier

Body Params

Any of the three; the worker and the earning (its code included) cannot change

number
≥ 0.01

Dollars, at most two decimal places

string | null

Free text shown beside the line

rule
object

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.

Responses

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