# Testing
source: https://developer.mastercard.com/flight-delay-pass/documentation/testing/index.md

## Testing {#testing}

The **Sandbox** environment utilizes the certificates generated during project creation to ensure secure connections,
but it relies on fake API call data to simulate interactions. This setup allows you to verify that your configuration is
correct and that the flow operates as expected, but it's important to note that it is **not** intended for real
production use.

## Test Data and Test Cases {#test-data-and-test-cases}

### Flight Delay Pass registration {#flight-delay-pass-registration}

Request body

```json
{
  "flightInformation": {
    "flightCode": "EY151",
    "departureAirportCode": "LHR",
    "arrivalAirportCode": "JFK",
    "departureDate": "2024-06-28"
  },
  "personalInformation": {
    "title": "Mr",
    "firstName": "John",
    "lastName": "Smith",
    "email": "john.smith@email.com",
    "phoneNumber": "+441234567890"
  },
  "additionalPassengers": [
    {
      "title": "Mrs",
      "firstName": "Jane",
      "lastName": "Smith"
    }
  ],
  "proposition": "Sales",
  "locale": "en-US",
  "userId": "myUserId"
}
```

The service of Flight Delay Pass registration will create a flight registration by including flight details, main passenger and additional passenger information. The response will return the flight registration ID.

### Flight Delay Pass registration retrieval {#flight-delay-pass-registration-retrieval}

Path Parameter

* id: a19dcf72-5052-4793-aadc-aa2c931c6eba

The service of Flight Delay Pass registration will return all the information related to the registration id requested. The response will return the flight details, main passenger and additional passenger information.

### Flight Delay Pass registration update {#flight-delay-pass-registration-update}

Path Parameter

* id: a19dcf72-5052-4793-aadc-aa2c931c6eba

Request body

```json
{
  "personalInformation": {
    "title": "Mr",
    "firstName": "John",
    "lastName": "Smith",
    "email": "john.smith@email.com",
    "phoneNumber": "+441234567890"
  },
  "additionalPassengers": [
    {
      "title": "Mrs",
      "firstName": "Jane",
      "lastName": "Smith"
    }
  ],
  "userId": "myUserId"
}
```

The service of Flight Delay Pass registration will update the passenger information related to the registration id provided.

### Flight Delay Pass registration cancellation {#flight-delay-pass-registration-cancellation}

Path Parameter

* id: a19dcf72-5052-4793-aadc-aa2c931c6eba

The service of Flight Delay Pass registration will cancel the registration provided.

### Flight Delay Pass Eligibility Check {#flight-delay-pass-eligibility-check}

Parameters

* flight_Code: EY151
* departure_airport_code: JFK
* departure_date: YYYY-MM-DD
* (optional) proposition: Sales

The Flight Delay Pass Eligibility Check endpoint provides an easy way to verify the availability of the Flight Delay Pass benefit for specific flight details. Users can quickly determine their eligibility for the benefit by simply submitting the required parameters, such as flight code, departure airport code and departure date.
