# Retrieve reports using the API You can use the Reports API to retrieve the aggregated reports. --- ## Get all reports Call the [Get all reports](https://api-reference.checkout.com/tag/Reports/#operation/getReports) endpoint, and provide one or more of the following query parameters: - `created_after`– Filters results to include only those created on or after a specific date and time. - `created_before` – Filters results to include only those created before a specific date and time. - `entity_id` – The entity for which you want to retrieve reports. - `limit` – The number of results you want to include per page. This defaults to `100` if not specified. - `pagination_token` – A token that paginates multiple pages of results. > **Information** > > Your base URL's `{prefix}` value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see [API endpoints](https://www.checkout.com/docs/developer-resources/api/api-endpoints.md). **Production** `GET` `https://{prefix}.api.checkout.com/reports` **Sandbox** `GET` `https://{prefix}.api.sandbox.checkout.com/reports` ### Response example ```json { "count": 1, "limit": 5, "data": [ { "id": "rpt_lmmldzousk7etoqijqundqexa4", "created_on": "2025-02-18T13:00:12.357Z", "last_modified_on": "2025-02-18T13:16:12.357Z", "type": "Authentication", "description": "Reconciliation Report for X.", "account": { "client_id": "cli_bvaelhppmfiufdnatam37wrfc4", "entity_id": "ent_znj4ih5kn4fuxiaquoudv5mvwy" }, "tags": [ "payout_id:pay_123456789" ], "from": "2025-02-17T12:00:00Z", "to": "2025-02-18T12:00:00Z", "files": [ { "id": "file_7ysmgfkj4ipunduud22uf73iey", "filename": "financial-actions_ent_znj4ih5kn4fuxiaquoudv5mvwy_20250218_000000001drl_1.csv", "format": "CSV", "_links": { "self": { "href": "https://{prefix}.api.checkout.com/reports/rpt_lmmldzousk7etoqijqundqexa4/files/file_lmmldzousk7etoqijqundqexa4" } } } ], "_links": { "self": { "href": "https://{prefix}.api.checkout.com/reports/rpt_lmmldzousk7etoqijqundqexa4" } } } ], "_links": { "self": { "href": "https://{prefix}.api.checkout.com/reports?entity_id=ent_znj4ih5kn4fuxiaquoudv5mvwy&created_after=2025-02-17T00:00:00.000Z&limit=5" }, "next": { "href": "https://{prefix}.api.checkout.com/reports?pagination_token=NaZMwq3KbreYcXg0dg752Dg8ps4orkwVK9pj9WFzkXk8rPoR32Wf74QWX0EkZ&entity_id=ent_znj4ih5kn4fuxiaquoudv5mvwy&created_after=2025-02-17T00:00:00.000Z&limit=5" } } } ``` --- ## Get report details Call the [Get report details](https://api-reference.checkout.com/tag/Reports/#operation/getReportDetails) endpoint, and provide the report ID as the `{id}` path parameter. > **Information** > > Your base URL's `{prefix}` value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see [API endpoints](https://www.checkout.com/docs/developer-resources/api/api-endpoints.md). **Production** `GET` `https://{prefix}.api.checkout.com/reports/{id}` **Sandbox** `GET` `https://{prefix}.api.sandbox.checkout.com/reports/{id}` ### Response example ```json { "id": "rpt_lmmldzousk7etoqijqundqexa4", "created_on": "2025-02-18T13:00:12.357Z", "last_modified_on": "2025-02-18T13:16:12.357Z", "type": "Authentication", "description": "Reconciliation Report for X.", "account": { "client_id": "cli_bvaelhppmfiufdnatam37wrfc4", "entity_id": "ent_znj4ih5kn4fuxiaquoudv5mvwy" }, "tags": [ "payout_id:pay_123456789" ], "from": "2025-02-17T12:00:00Z", "to": "2025-02-18T12:00:00Z", "files": [ { "id": "file_7ysmgfkj4ipunduud22uf73iey", "filename": "financial-actions_ent_znj4ih5kn4fuxiaquoudv5mvwy_20250218_000000001drl_1.csv", "format": "CSV", "_links": { "self": { "href": "https://{prefix}.api.checkout.com/reports/rpt_lmmldzousk7etoqijqundqexa4/files/file_lmmldzousk7etoqijqundqexa4" } } } ], "_links": { "self": { "href": "https://{prefix}.api.checkout.com/reports/rpt_lmmldzousk7etoqijqundqexa4" } } } ``` --- ## Get report file You can retrieve a specific file from a [paginated](https://www.checkout.com/docs/platforms/for-saas/retrieve-reports.md#Pagination) report. Call the [Get report details](https://api-reference.checkout.com/tag/Reports/#operation/getReportDetails) endpoint, and provide the: - Report ID of a paginated report as the `{id}` path parameter - Specific file ID from the report as the `{fileId}` path parameter > **Information** > > Your base URL's `{prefix}` value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see [API endpoints](https://www.checkout.com/docs/developer-resources/api/api-endpoints.md). **Production** `POST` `https://{prefix}.api.checkout.com/reports/{id}/files/{fileId}` **Sandbox** `POST` `https://{prefix}.api.sandbox.checkout.com/reports/{id}/files/{fileId}` You are redirected to the report file download location.