> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nmbr.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Reporting

Nmbr supports asynchronous reports for payroll, remittance, accounting, tax form, and jurisdiction workflows.

The example below creates a Liability Report, which can encompass liabilities across payrolls within a single business entity, a specific pay schedule, or a single payroll. Liability reports categorize liabilities by type and associated [Remittance Accounts](/api-reference/remittance-accounts/create-a-remittance-account).

**Generate Report**

Generate a Liability Report using the [Create Reports](/api-reference/reports/create-liability-report) endpoint.

```bash theme={null}
curl --request POST \
     --url https://sandbox.nmbr.co/services/payroll/reports/liability \
     --header 'Authorization: Bearer <access_token>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
        "pay_schedule_id": "<pay_schedule_id>",
        "filters": {
            "payroll_type":"regular",
            "payroll_status":["paid"],
            "pay_date_from":"2024-01-31",
            "pay_date_to":"2024-12-31"
        }
    }'
```

The response includes a Report ID (`report_ulid`), which is necessary to retrieve the completed report.

```json theme={null}
{
  "id": "<report_ulid>",
  "object": "report",
  "data": {
    "type": "liability",
    "business_entity": null,
    "pay_schedule": {
      "id": "<pay_schedule_id>",
      "object": "pay_schedule",
      "links": {
        "self": "https://sandbox.nmbr.co/services/payroll/pay_schedules/<pay_schedule_id>"
      }
    },
    "payroll": null,
    "filters": {
      "payroll_type": ["regular"],
      "payroll_status": ["paid"],
      "pay_date_from": "2024-01-31",
      "pay_date_to": "2024-12-31"
    },
    "has_results": false,
    "created_at": "2024-06-25T20:53:33.000000Z",
    "updated_at": "2024-06-25T20:53:35.000000Z"
  },
  "links": {
    "self": "https://sandbox.nmbr.co/services/payroll/reports/<report_ulid>"
  }
}
```

**Retrieving a Report**

The report results will be generated shortly after the report was created. Once it is ready (`has_results` is `true`), it can be retrieved through the [Retrieve Report](/api-reference/reports/retrieve-a-report) endpoint. The report data can be accessed as a CSV file by specifying the `Accept: text/csv` header.

```bash theme={null}
curl --request GET \
     --url https://sandbox.nmbr.co/services/payroll/reports/<report_ulid> \
     --header 'Authorization: Bearer <access_token>' \
     --header 'Accept: text/csv'
```
