# Create report

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.

Endpoint: POST /v1/reports
Security: Bearer

## Description:

  - `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.

## Security:

  - `Bearer` (unknown)
    http bearer JWT

## Request body:

  - `application/json` (unknown)
    Parameters defining the requested report

## Request fields (application/json):

  - `reportName` (string, required)
    User defined name of the report.
    Example: My custom report

  - `startDate` (string, required)
    The [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) start date (inclusive) for requested report.
    Example: 2018-04-06T19:33:35Z

  - `endDate` (string, required)
    The [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) end date (inclusive) for a requested report.
**Note**: Must be after `startDate`, but no more than 90 days after.
    Example: 2018-04-06T20:33:35Z

  - `reportType` (string, required)
    The report type of the downloadable report.
    Enum: "PAYMENT_OPS", "RECON", "FAILURE_CONVERSION_SSA"

  - `reportFormat` (string, required)
    The report format of the downloadable report.
    Enum: "CSV", "JSON"

## Response 200:

  - `200` (unknown)
    Returns the JSON record for the posted report

## Response 200 fields (application/json):

  - `reportId` (string, required)
    Unique identifier for a report.
    Example: 497f6eca-6276-4993-bfeb-53cbbbba6f08

  - `reportName` (string)
    User defined name of the report.
    Example: My custom report

  - `reportType` (string, required)
    The report type of the downloadable report.
    Enum: "PAYMENT_OPS", "RECON", "FAILURE_CONVERSION_SSA"

  - `reportFormat` (string, required)
    The report format of the downloadable report.
    Enum: "CSV", "JSON"

  - `reportStatus` (string, required)
    The status of the report.
    Enum: "PENDING", "READY", "FAILED", "EMPTY"

  - `startDate` (string, required)
    The [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) start date (inclusive) of the report.
    Example: 2018-04-06T19:33:35Z

  - `endDate` (string, required)
    The [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) end date (inclusive) of the report.
**Note**: Must be after `startDate`, but no more than 90 days after.
    Example: 2018-04-06T20:33:35Z

  - `createdOn` (string)
    Report creation time
    Example: 2018-04-06T20:33:35Z

## Response 400:

  - `400` (unknown)
    Bad Report Request

## Response 400 fields (application/json):

  - `type` (string, required)
    Example: https://docs.ripple.com/payments-odl/api-docs/report_service/reference/#error/RPT_1

  - `errorCode` (string, required)
    Example: RPT_1

  - `title` (string, required)
    Example: BAD_REQUEST

  - `detail` (string)
    Example: Required field missing

  - `time` (string, required)
    The [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) error timestamp.
    Example: 2018-04-06T20:33:35Z

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `type` (string, required)
    Example: https://docs.ripple.com/payments-odl/api-docs/report_service/reference/#error/RPT_1

  - `errorCode` (string, required)
    Example: RPT_1

  - `title` (string, required)
    Example: BAD_REQUEST

  - `detail` (string)
    Example: Required field missing

  - `time` (string, required)
    The [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) error timestamp.
    Example: 2018-04-06T20:33:35Z

