Export Payroll Data
Pull paychecks, payroll runs, and GL journal entries for a date range.
This guide walks through exporting payroll runs, paychecks, and general ledger journal entries for a date range — a common pattern for pushing data into an accounting or ERP system.
Overview
Three v3 endpoints power the export workflow:
GET /payroll-runs— list payroll runs within a date rangeGET /paychecks— fetch individual paychecksGET /general-ledger-transactions— GL journal entries per payroll run
Step 1 — Query payroll runs
GET https://external-api.netchexonline.net/payroll-runs?company-ids=101&paycheck-date-from=2024-01-01&paycheck-date-to=2024-03-31&api-version=3.0
Authorization: ApiKey YOUR_API_KEYKey parameters:
| Parameter | Type | Description |
|---|---|---|
company-ids | integer[] | Filter to one or more companies |
organization-id | GUID | Filter by organization (mutually exclusive with company-ids) |
paycheck-date-from | date | Start of paycheck date range |
paycheck-date-to | date | End of paycheck date range |
page-number / page-size | integer | 1-based pagination |
{
"pageNumber": 1,
"pageSize": 100,
"totalItemsCount": 3,
"items": [
{
"payrollNumber": 550,
"companyId": 101,
"payPeriodStart": "2024-01-01",
"payPeriodEnd": "2024-01-14",
"paycheckDate": "2024-01-19",
"status": "Completed"
}
]
}Note payrollNumber — this is the identifier used to fetch GL transactions, not an id field.
Step 2 — Retrieve paychecks
GET https://external-api.netchexonline.net/paychecks?company-ids=101&paycheck-date-from=2024-01-01&paycheck-date-to=2024-03-31&api-version=3.0
Authorization: ApiKey YOUR_API_KEYKey parameters:
| Parameter | Type | Description |
|---|---|---|
company-ids | integer[] | Filter to one or more companies |
organization-id | GUID | Filter by organization |
paycheck-date-from / paycheck-date-to | date | Date range filter |
employeeIds | integer[] | Filter to specific employees |
payrollKeys | integer[] | Filter to specific payroll run keys |
Step 3 — Fetch GL journal entries
For each completed payroll run, fetch GL journal entries using payrollNumber:
GET https://external-api.netchexonline.net/general-ledger-transactions?company-id=101&payroll-number=550&api-version=3.0
Authorization: ApiKey YOUR_API_KEYUse company-id (singular) and payroll-number — not payrollRunId or companyIds. The payroll number comes from the payrollNumber field on payroll run objects.
{
"pageNumber": 1,
"pageSize": 100,
"totalItemsCount": 12,
"items": [
{
"accountCode": "5000",
"description": "Salaries Expense",
"debit": 35000.00,
"credit": 0
}
]
}Map accountCode to your chart of accounts before importing. Optional boolean parameters (salary-expenses, employer-tax-expenses, workers-compensation, etc.) let you include only specific GL account categories to reduce response size.
Try it in the playground
Test these endpoints interactively in the API reference: