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.

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

NameTypeDescription
providerQuerystring or null

Only this provider's runs.

connection_idQuerystring or null

An id that starts with conn_.

paid_fromQuerystring (date) or null

Only runs paid on or after this day.

paid_toQuerystring (date) or null

Only runs paid on or before this day.

limitQueryinteger

Page size, 1–200.

Default 50
cursorQuerystring or null

The next_cursor of the previous page.

Response

200PayrollRunPage

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
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

NameTypeDescription
run_idPath · Requiredstring

An id that starts with pay_run_.

Response

200PayrollRunOut

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
curl "https://api.ledgerit.ai/v1/payroll_runs/{run_id}" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Objects

The objects these operations take and return.

PayrollRunPage

NameTypeDescription
dataRequiredarray of PayrollRunOut
has_moreRequiredboolean
next_cursorRequiredstring or null

PayrollRunOut

NameTypeDescription
connection_idRequiredstring or null

An id that starts with conn_.

entry_noRequiredinteger

That entry's number in these books.

external_idRequiredstring

The provider's own id for the run.

idRequiredstring

An id that starts with pay_run_.

journal_entry_idRequiredstring

The entry the run was posted as.

pay_dateRequiredstring (date)

The day it was paid: its entry's date.

peopleRequiredarray of PayrollRunPersonOut or null

What it paid each person, largest gross pay first. Null for a caller without sensitive.read, and for a run with no people kept.

period_endRequiredstring (date)

The last day the run paid for.

period_startRequiredstring (date)

The first day the run paid for.

providerRequiredstring

The payroll provider, by its key: gusto, deel, rippling.

recorded_atRequiredstring (date-time)

When the run was posted.

sandboxRequiredboolean

True when it was read from the provider's demo or sandbox, not its production.

totalsRequiredPayrollRunTotalsOut 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.

NameTypeDescription
departmentRequiredstring or null

The provider's department for them, as spelled there.

employee_deductionsRequiredstring

Benefit premiums, retirement contributions and other deductions withheld from gross pay.

employee_taxesRequiredstring

Their own income and payroll taxes, withheld from gross pay.

employer_benefitsRequiredstring

Benefit contributions the company paid on top of gross pay.

employer_taxesRequiredstring

Payroll taxes the company paid on top of gross pay.

gross_payRequiredstring

Their pay before anything was withheld.

kindRequiredstring

employee or contractor.

nameRequiredstring

Their name, as the provider prints it on the paystub.

net_payRequiredstring

What reached them.

payment_methodRequiredstring or null

How they were paid, in the provider's own words (Direct Deposit, Check).

person_refRequiredstring

The provider's own id for the person or contractor.

reimbursementsRequiredstring

Expenses paid back to them with this run.

PayrollRunTotalsOut

The run's people, added up.

NameTypeDescription
employee_deductionsRequiredstring
employee_taxesRequiredstring
employer_benefitsRequiredstring
employer_taxesRequiredstring
gross_payRequiredstring
net_payRequiredstring
peopleRequiredinteger

How many people and contractors the run paid.

reimbursementsRequiredstring
total_costRequiredstring

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.