Skip to content

Apply the Gusto payroll reconciliation

POST/api/v1/payroll/gusto/reconcile/apply

Recomputes the preview's plan from the same inputs and applies it: splits each NET lump one leg per employee (each leg names the employee), creates the per-pay-period Gusto bills for tax and reimbursement debits and pays them with the bank rows (or pays an open Gusto bill of the same amount), renames and categorizes contractor and fee rows, and saves the register as pay runs. Each row is applied on its own; failures are listed. Rows already applied are skipped, so repeating the call is safe. Pass plan_hash from the preview to refuse a plan that changed since.

Operation ID: gusto_reconcile_apply·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

reportsarray · GustoReportInputGustoReportInput

Gusto exports: Payroll Journal (or Payroll Register), Contractor Payments and/or Bank Transactions. Without any, only the bank lines' own descriptors are used (contractor payee, fee).

3 fields
s3_keystring

S3 key from POST /uploads (or generate_upload_url) of a CSV/XLSX exported from Gusto > Reports.

contentstring

The report pasted as CSV / tab-separated text.

filenamestring

Original file name (format hint).

bank_ledger_idstring

Bank account Gusto debits. Omit to consider every bank account of the business.

start_datestring · daterequired

First bank date considered

end_datestring · daterequired

Last bank date considered

ledger_overridesGustoLedgerOverrides
amount_tolerance_centsinteger

Largest difference accepted between a payroll lump and the register total; the difference becomes a rounding leg.

create_billsboolean

Book tax and reimbursement debits as an accrual bill per pay period (vendor Gusto) paid by the bank row. False categorizes them directly instead.

plan_hashstring

plan_hash from the preview. When given, apply refuses if the plan it computes now differs (books changed since the preview).

transaction_idsarray · string

Apply only these bank rows of the plan (default: all).

Responses

200Successful Response

successboolean
messagestring
codestring
dataGustoReconcileApplyResponse

400Bad Request - Invalid input

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

401Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

403Forbidden - Insufficient permissions

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

422Validation Error

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.