# POST the TOE PDF Report Generation Request
source: https://developer.mastercard.com/riskrecon-api/documentation/testing/toe-pdf-rep-samples/order-toe-pdf-smpl/index.md

Allows you to order for a particular type of TOE PDF report.

## Pre-requisites {#pre-requisites}

Refer to the [Order TOE PDF Reports](https://developer.mastercard.com/riskrecon-api/documentation/use-cases/risk-mgmt-issue-rmdfn/toe-pdf-reports/order-toe-rep/index.md) use case.

## Request URL for Sandbox environment {#request-url-for-sandbox-environment}

    POST https://api.sandbox.riskrecon.com/v1/toe_reports

## Request URL for Production environment {#request-url-for-production-environment}

    POST https://api.riskrecon.com/v1/toe_reports

## Test Cases {#test-cases}

### Test Case: Success - Order for a particular type of TOE PDF report {#test-case-success---order-for-a-particular-type-of-toe-pdf-report}

**Request**

Here is an example of a request made to order for a particular type of TOE PDF report using the `curl` command.

```bash
curl -X 'POST' \
  'https://api.sandbox.riskrecon.com/v1/toe_reports' \
  -H 'accept: application/json' \
  -H 'Authorization: valid_JWT_token' \
  -H 'Content-Type: application/json' \
  -d '{
        "toe_id": "09918d09-8d52-4e86-a3ec-5ef4d461e2ba",
        "report_type": "detailed-report"
    
}'
```

**Response**

post:

HTTP response 200

```json
[
        {
            "analysis_id": 40791574,
            "report_key": "detailed-report-Some Company-Inc.-40791574-2024-1-30:8-14-28.pdf",
            "request_id": 2,
            "status": "pending",
            "toe_id": "09918d09-8d52-4e86-a3ec-5ef4d461e2ba",
            "toe_name": "Some Company Inc."
        }
    ]
```

### Test Case: Fail - Invalid JSON Web Token {#test-case-fail---invalid-json-web-token}

**Request**

Here is an example of a request made with an invalid JWT using a `curl` command.

```bash
curl -X 'POST' \
  'https://api.sandbox.riskrecon.com/v1/toe_reports' \
  -H 'accept: application/json' \
  -H 'Authorization: invalid_JWT_token' \
  -H 'Content-Type: application/json' \
  -d '{
        "toe_id": "09918d09-8d52-4e86-a3ec-5ef4d461e2ba",
        "report_type": "detailed-report"
    
}'
```

**Response**

HTTP Error Response 404

```json
{
  "Errors": {
    "Error": [
      {
        "Description": "Unauthorized request",
        "Details": "Invalid JWT",
        "ReasonCode": "UNAUTHORIZED",
        "Recoverable": false,
        "Source": "RISKRECON_API"
      }
    ]
  }
}
```

