API reference
Payroll runs
The payrolls a provider paid, each with the entry it was posted as and, for whoever may read payroll, what it paid each person.
- GET
/v1/payroll_runsList payroll runs - GET
/v1/payroll_runs/{run_id}Get a payroll run and what it paid each person
Guides: Connect Gusto
List payroll runs
GET/v1/payroll_runs
client.payrollRuns.list()
The payroll runs in these books, most recently paid first, each with its people added up, and what it paid each person for a caller who may read payroll.
Parameters
| Name | Type | Description |
|---|---|---|
providerQuery | string or null | Only this provider's runs. |
connection_idQuery | string or null | An id that starts with |
paid_fromQuery | string (date) or null | Only runs paid on or after this day. |
paid_toQuery | string (date) or null | Only runs paid on or before this day. |
limitQuery | integer | Page size, 1–200. |
cursorQuery | string or null | The |
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/payroll_runs" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Get a payroll run and what it paid each person
GET/v1/payroll_runs/{run_id}
client.payrollRuns.get()
One payroll run: where its entry came from, and what it paid each person for a caller who may read payroll.
Parameters
| Name | Type | Description |
|---|---|---|
run_idPath · Required | string | An id that starts with |
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/payroll_runs/{run_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Objects
The objects these operations take and return.
PayrollRunPage
| Name | Type | Description |
|---|---|---|
dataRequired | array of PayrollRunOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null |
PayrollRunOut
| Name | Type | Description |
|---|---|---|
connection_idRequired | string or null | An id that starts with |
entry_noRequired | integer | That entry's number in these books. |
external_idRequired | string | The provider's own id for the run. |
idRequired | string | An id that starts with |
journal_entry_idRequired | string | The entry the run was posted as. |
pay_dateRequired | string (date) | The day it was paid: its entry's date. |
peopleRequired | array of PayrollRunPersonOut or null | What it paid each person, largest gross pay first. Null for a caller without |
period_endRequired | string (date) | The last day the run paid for. |
period_startRequired | string (date) | The first day the run paid for. |
providerRequired | string | The payroll provider, by its key: |
recorded_atRequired | string (date-time) | When the run was posted. |
sandboxRequired | boolean | True when it was read from the provider's demo or sandbox, not its production. |
totalsRequired | PayrollRunTotalsOut or null | Its people, added up. Null for a run posted before LedgerIt kept them, until a sync reads it again. |
PayrollRunPersonOut
What one run paid one person, as the provider computed it.
| Name | Type | Description |
|---|---|---|
departmentRequired | string or null | The provider's department for them, as spelled there. |
employee_deductionsRequired | string | Benefit premiums, retirement contributions and other deductions withheld from gross pay. |
employee_taxesRequired | string | Their own income and payroll taxes, withheld from gross pay. |
employer_benefitsRequired | string | Benefit contributions the company paid on top of gross pay. |
employer_taxesRequired | string | Payroll taxes the company paid on top of gross pay. |
gross_payRequired | string | Their pay before anything was withheld. |
kindRequired | string |
|
nameRequired | string | Their name, as the provider prints it on the paystub. |
net_payRequired | string | What reached them. |
payment_methodRequired | string or null | How they were paid, in the provider's own words ( |
person_refRequired | string | The provider's own id for the person or contractor. |
reimbursementsRequired | string | Expenses paid back to them with this run. |
PayrollRunTotalsOut
The run's people, added up.
| Name | Type | Description |
|---|---|---|
employee_deductionsRequired | string | |
employee_taxesRequired | string | |
employer_benefitsRequired | string | |
employer_taxesRequired | string | |
gross_payRequired | string | |
net_payRequired | string | |
peopleRequired | integer | How many people and contractors the run paid. |
reimbursementsRequired | string | |
total_costRequired | string | Gross pay, employer taxes, employer benefits and reimbursements: what the paystubs cost the company. The entry can differ by up to 5 cents of the provider's rounding, which it books on a line of its own. |