> For the complete documentation index, see [llms.txt](https://docs.amala.cloud/amalacloud-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amala.cloud/amalacloud-api-docs/business/international-passport-verification/advance-international-passport-verification.md).

# Advance International Passport Verification

The Advanced International Passport Verification API enables verification of an individual's passport details. This is useful for identity validation and fraud prevention.

### Base URL

```
https://acs-uat-verifications.amala.cloud/
```

```
https://acs-prod-verifications.amala.cloud/
```

### Endpoint

```swift
POST verification/api/v1/idv/advance/passport
```

### Request Headers

You can use either the API key or Bearer Token for Authorization

| Header          | Type               | Description                                        |
| --------------- | ------------------ | -------------------------------------------------- |
| `Content-Type`  | `application/json` | Specifies that the request body is in JSON format. |
| `Authorization` | `Bearer <token>`   | API Key for authentication.                        |
| `x-api-key`     | `API KEY`          | API Key for authentication                         |

### Request Body

The request body should contain **passport details** in JSON format.

#### Example Request

```json
{
  "number": "A00400000",
  "firstName": "John",
  "lastName": "test",
  "reference": "REF123456",
  "serviceProviderCode": "SPC001"
}
```

#### Request Body Schema

| Field                 | Type   | Required | Description                                |
| --------------------- | ------ | -------- | ------------------------------------------ |
| `number`              | string | ✅        | The **passport number** of the individual. |
| `firstName`           | string | ✅        | First name of the passport holder.         |
| `lastName`            | string | ✅        | Last name of the passport holder.          |
| `reference`           | string | ✅        | A unique transaction reference.            |
| `serviceProviderCode` | string | ✅        | Code identifying the service provider.     |

### Responses

#### Success Response (200 OK)

If the passport is valid, the API returns **user details** as per the `GetDetailOfPassportResponseApiResponse` schema.

```json
{
  "apiVersion": "1.0",
  "success": true,
  "code": "00",
  "message": "Verification successful",
  "requestId": "REQ-123456",
  "data": {
    "firstName": "John",
    "lastName": "Doe",
    "middleName": "Michael",
    "gender": "Male",
    "dateOfBirth": "1990-05-15",
    "mobile": "+2348012345678",
    "photo": "base64-encoded-image-data",
    "issuedAt": "Abuja",
    "issuedDate": "2015-06-20",
    "expiryDate": "2025-06-20"
  }
}

```

#### Error Responses

| Status Code | Description                           | Example Response                                                             |
| ----------- | ------------------------------------- | ---------------------------------------------------------------------------- |
| `400`       | Bad Request (Invalid Passport Number) | `{ "success": false, "message": "Invalid passport number.", "code": "400" }` |
| `401`       | Unauthorized (Invalid API Key)        | `{ "success": false, "message": "Unauthorized access.", "code": "401" }`     |
| `500`       | Internal Server Error                 | `{ "success": false, "message": "Something went wrong.", "code": "500" }`    |

### Usage Example (cURL)

```bash
curl -X POST "https://acs-uat-verifications.amala.cloud/verification/api/v1/idv/advance/passport" \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
           "number": "A12345678",
           "firstName": "John",
           "lastName": "Doe",
           "reference": "REF123456",
           "serviceProviderCode": "SPC001"
         }'

```
