---
title: "Create a general ledger report"
method: POST
path: "/v1/payrolls/{payroll_uuid}/reports/general_ledger"
tags: ["Reports"]
---

# Create a general ledger report

`POST /v1/payrolls/{payroll_uuid}/reports/general_ledger`

## Request

- Base URL: `https://api.gusto-demo.com`
- URL: `https://api.gusto-demo.com/v1/payrolls/{payroll_uuid}/reports/general_ledger`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/gusto/apis/gusto-api/docs/v1/payrolls/:payroll_uuid/reports/general_ledger/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a general ledger report for a payroll. The report can be aggregated by different dimensions such as job or department.

Use the `request_uuid` in the response with the [report GET endpoint](../reference/get-reports-request_uuid) to poll for the status and report URL upon completion. The retrieved report will be generated in a JSON format.

scope: `company_reports:write`

## Path parameters

- `payroll_uuid` string, required

## Headers

- `X-Gusto-API-Version` '2026-06-15'

## Request body

- GeneralLedgerReportBody: Request body for generating a general ledger report. The report can be aggregated by different dimensions such as job or department.
  - `aggregation` 'default' | 'job' | 'department' | 'integration', required: The breakdown of the report. Use 'default' for no split.
  - `integration_type` 'xero' | 'qbo', nullable: The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'.

## Response `200`

OK

- GeneralLedgerReport: A request for a general ledger report. The report is generated asynchronously and the URL is available via the report GET endpoint using the returned `request_uuid`.
  - `payroll_uuid` string, uuid: The UUID of the payroll record for which the report was generated.
  - `aggregation` 'default' | 'job' | 'department' | 'integration': The breakdown level used for the report.
  - `integration_type` string, nullable: The `integration_type` used for the report when `aggregation` is 'integration' (e.g., `xero`, `qbo`). Otherwise, this will be null or an empty string.
  - `request_uuid` string, uuid: UUID to use for polling the report status.

## Other responses

- `404`: Not Found The requested resource does not exist. Make sure the provided UUID is valid.
- `422`: Unprocessable Entity This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details.

---

[API](https://skmtc.dev/gusto/apis/gusto-api.md) - [All operations](https://skmtc.dev/gusto/apis/gusto-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gusto/apis/gusto-api/revisions/f98575fa2a5e?raw)
