post
https://sandbox.checkhq.com/payrolls//approve
Approves a payroll.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
The payroll must have a completed preview (indicated by a preview.status of succeeded) before it can be approved.
{
...,
"preview": {
"status": "succeeded",
"started_at": "2019-06-29T18:26:56.848920Z"
},
...
}Approving a preview approves the most recent preview of the payroll and moves the payroll status to pending, and the payroll must be reopened before it can be further modified.
Optionally, pass preview_started_at to guard against approving a stale preview. If provided, it's compared against the payroll's current preview.started_at; if they don't match, the request fails with a 409 preview_superseded error instead of approving. This lets a client detect that someone else (or another tab) re-previewed the payroll after it last fetched it. Omitting the parameter preserves the current behavior.

