# Report Service API
The Report Service API provides an efficient and secure way to download On-Demand Liquidity (ODL) payment transactions on the RippleNet network.
## Report types
Three report types are available in either CSV or JSON format when performing a [List reports](/products/payments-odl/api-docs/report_service/reference/openapi/reports/getreports) operation:
| Report type | Description |
| :--- | :--- |
| `PAYMENT_OPS` | This is a *Basic payment report* suitable for high-level payment investigation and reporting. |
| `RECON` | This is a *Reconciliation report* suitable for reconciliation and detailed state-by-state investigation. |
| `FAILURE_CONVERSION_SSA` | This is a *Failure conversion & SSA report* suitable for failed payments investigation. |
**Note**: These On-Demand Liquidity (ODL) statement reports do not include data on fiat payments in RippleNet.
### Basic payment report
The Basic payment report (`PAYMENT_OPS`) provides basic payment data, but not the transaction data within payments.
View the [Payment operations reports data fields](/products/payments-odl/api-docs/report_service/reference/openapi/report-data-fields/paymentopsreporttransaction).
### Reconciliation report
The Reconciliation report (`RECON`) includes all basic payment data, and also includes trade and liquidation data that may be associated with a payment.
A single payment with multiple transactions appears in multiple lines, one line per transaction. Each line includes data that has occurred during the transaction, and all subordinate transactions share the same Payment ID.
View the [Reconciliation reports data fields](/products/payments-odl/api-docs/report_service/reference/openapi/report-data-fields/reconciliationreporttransaction).
### Failure conversion & SSA report
The Failure conversion & SSA report (`FAILURE_CONVERSION_SSA`) includes failed payments data.
View the [Failure conversion & SSA report data fields](/products/payments-odl/api-docs/report_service/reference/openapi/report-data-fields/failureconversionssatransaction).
### Report availability
Reports are available in pre-generated formats for the previous two months and the current month-to-date.
The month-to-date report is generated daily at 00:00 AM (UTC) and is generally available one minute later, at 00:01 AM.
#### Example: Report availability
On October 16th, you can get:
* Full month reports for August and September.
* A month-to-date report from October 1st to October 16th.
| Month | Example | Description |
| --- | --- | --- |
| Current | October 1, 2022 to
October 16, 2022 at 00:00 AM | Includes ODL payment data from the first day of the current month up to 00:00 AM (UTC) of the current day. |
| Previous | September
(If the current month is October) | Includes all ODL payment data for the month preceding the current month. |
| Month Before Last| August
(If the current month is October) | Includes all ODL payment data from the month preceding the last month. |
### API operations
Use these operations to view a list of reports, or download a specific report.
| API operation | Description |
| --- | --- |
| [List reports](/products/payments-odl/api-docs/report_service/reference/openapi/reports/getreports) | View a list of available reports. |
| [Create a report](/products/payments-odl/api-docs/report_service/reference/openapi/reports/postreport) | Create a report. |
| [Get a report](/products/payments-odl/api-docs/report_service/reference/openapi/reports/getreport) | View a specific report. |
| [Delete a report](/products/payments-odl/api-docs/report_service/reference/openapi/reports/deletereport) | Delete a specific report. |
| [Download a report](/products/payments-odl/api-docs/report_service/reference/openapi/reports/getreportdownload) | Download an individual report in JSON or CSV format. |
## Authentication
To use any API operation you need a valid access token. You must include a valid access token in the `Authorization` header of each request.
For more information about getting an access token, see [Authentication](/products/payments-odl/api-docs/ripplenet/best-practices/authentication/#request-the-access-token).
### Environments
You can use the Report Service API with the test and production environments by using different base URLs.
| Environment |
Base URL |
Description |
| Test |
reporting-test.rnc.ripplenet.com |
Test environment with simulated partners and simulated currency. |
| Production |
reporting.rnc.ripplenet.com |
Production environment with actual partners and actual currency. |
## Servers
Test environment
Learn about API environments
```
https://reporting-test.rnc.ripplenet.com
```
Production environment
```
https://reporting.rnc.ripplenet.com
```
## Security
### Bearer
Type: http
Scheme: bearer
Bearer Format: JWT
## Download OpenAPI description
[Report Service API](https://docs.ripple.com/_bundle/products/payments-odl/api-docs/report_service/report_service.yaml)
## Reports
The Report Service API provides `PAYMENT_OPS`, `RECON`, and `FAILURE_CONVERSION_SSA` reports in either CSV or JSON format.
### List reports
- [GET /v1/reports](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/reports/getreports.md): Returns an array of reports available for download. Each array element represents an available report, and contains the reportId, reportType, and reportFormat fields associated with that report.
To get the download link for a specific report, store the reportId for the report you want, and use it with the Get a report operation.
### Create report
- [POST /v1/reports](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/reports/postreport.md): Request the generation of a custom report based on the specified parameters.
Report duration
Reports can contain up to 90 days of transactions from the previous 9 months.
* Minimum report duration is 1 day.
* Maximum report duration is 90 days.
#### Report retention
Reports are retained for 6 months after the endDate specified in your request. After this period, the report is purged and will no longer be accessible.
### List reports
- [GET /v2/reports](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/reports/getreportsv2.md): Returns an array of reports generated by Caspian available for download. Each array element represents an available report, and contains the reportId, reportType, and reportFormat fields associated with that report.
To get the download link for a specific report, store the reportId for the report you want, and use it with the _Get a report_ operation.
### Create report
- [POST /v2/reports](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/reports/postreportv2.md): Request generation of a report. For Recon Report, Caspian will be used instead of Read Replica
### Get a report
- [GET /v1/reports/{report-id}](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/reports/getreport.md): Here, you apply the report-id from the List reports operation as the path parameter to get a downloadlink containing the report.
Download the report at the link in the downloadLink field in the response.
### Delete reports
- [DELETE /v1/reports/{report-id}](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/reports/deletereport.md): Delete a specific report with the report-id path parameter.
### Get a report
- [GET /v2/reports/{report-id}](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/reports/getreportv2.md): Here, you apply the report-id from the _List reports_ operation as the path parameter to get a downloadLink containing the report.
Download the report at the link in the downloadLink field in the response.
### Delete reports
- [DELETE /v2/reports/{report-id}](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/reports/deletereportv2.md): Delete provided report-id for the current tenant
### Download a report
- [GET /v1/reports/download/{report-id}](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/reports/getreportdownload.md): Download a transaction report. Download the report by applying the report-id from the List reports operation as a path parameter.
Note: Depending on the reportId you specified, the returned report is either a Payment operations report or a Reconciliation report.
### Get the contents of a report
- [GET /v2/reports/download/{report-id}](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/reports/getreportdownloadv2.md): Get the contents of a report
## Scheduler
### Meta data of the scheduler
- [GET /internal/scheduler/metadata](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/scheduler/getschedulermetadata.md)
### Get Scheduler jobs
- [GET /internal/scheduler/jobs](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/scheduler/getalljobs.md): Returns a JSON array of jobs in the scheduler.
### Delete all jobs of provided tenants
- [DELETE /internal/scheduler/jobs](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/scheduler/deleteschedulerjobs.md): Delete all jobs of provided tenants
### Delete all jobs of out of scope tenants
- [DELETE /internal/scheduler/jobs/out-of-scope](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/scheduler/deleteoutofscopeschedulerjobs.md): Delete all jobs of out of scope tenants
### Creates a new scheduler job
- [POST /internal/scheduler/job](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/scheduler/postjob.md)
### Creates a new scheduler job
- [POST /internal/scheduler/job/trigger](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/scheduler/createjobtrigger.md)
### Updates chron expression for scheduler jobs
- [PUT /internal/scheduler/jobs/cron-expression-update](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/scheduler/updatereportscronexpression.md)
### Get Scheduler Job
- [GET /internal/scheduler/jobs/{job-id}](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/scheduler/getschedulerjob.md): Returns a single JSON record of SchedulerJob
### Updates a existing scheduler job
- [PUT /internal/scheduler/jobs/{job-id}](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/scheduler/updatejob.md)
### Delete the scheduler job
- [DELETE /internal/scheduler/jobs/{job-id}](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/scheduler/deleteschedulerjob.md): Returns a single JSON record of SchedulerJob
### Runs the scheduler job
- [POST /internal/scheduler/job-run](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/scheduler/runjob.md)
### Pauses the scheduler job
- [POST /internal/scheduler/jobs/{job-id}/job-pause](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/scheduler/pausejob.md)
### Runs the scheduler job
- [POST /internal/scheduler/jobs/{job-id}/job-resumption](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/scheduler/resumejob.md): TBD
## InternalReports
### Get Reports
- [GET /internal/reports](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/internalreports/internalgetreports.md): Returns a JSON array of report metadata
### Update reports
- [PUT /internal/reports](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/internalreports/internalputreport.md): Request regeneration of a list of reports
### Create report
- [POST /internal/reports](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/internalreports/internalpostreport.md): Request generation of a report
### Create report
- [POST /internal/scheduler/reports](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/internalreports/internalpostreportasscheduler.md): Request generation of a report created by a SCHEDULER job
### Get Report
- [GET /internal/reports/{report-id}](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/internalreports/internalgetreport.md): Returns a single JSON record of report metadata
### Delete reports
- [DELETE /internal/reports/{report-id}](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/internalreports/internaldeletereport.md): Delete provided report-id for the current tenant
### Get the contents of a report
- [GET /internal/reports/download/{report-id}](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/internalreports/internalgetreportdownload.md): Get the contents of a report
### Delete reports
- [DELETE /internal/reports/all](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/internalreports/deleteallreports.md): Delete all reports for all tenants
### Rerun reports for all tenants for specified dates
- [PUT /internal/reports/all](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/internalreports/internalupdatereports.md): Returns a JSON array of rerun report metadata
### Get Reports list grouped by tenant id
- [GET /internal/reports/tenants](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/internalreports/internalgetreportsbytenantid.md): Returns a list of all reports grouped by tenant id. If tenant id is not supplied returns list of all tenants
### Delete reports
- [DELETE /internal/reports/tenants](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/internalreports/deletereportsfortenant.md): Delete all reports, or singular report if specified, for the tenant provided,
### Validates if tenant is enabled for reporting
- [GET /internal/validate-tenant](https://docs.ripple.com/products/payments-odl/api-docs/report_service/report_service/internalreports/validatetenant.md)