# International

## What countries are covered?

Click this link to see what countries are covered for the AgeMatch International Service.

{% content-ref url="../coverage/international" %}
[international](https://api.veratad.com/coverage/international)
{% endcontent-ref %}

## AgeMatch5.0.{CountryName}

<mark style="color:green;">`POST`</mark> `https://production.idresponse.com/process/comprehensive/gateway`

Make an **HTTPS POST** request with the following body parameters to find out if the target meets your age requirement. You will receive a synchronous response in 2-3 seconds with a **result** object that includes an **action** and a **detail**.

#### Request Body

| Name                                      | Type   | Description                                                                                                              |
| ----------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------ |
| user<mark style="color:red;">\*</mark>    | string | Your account's API username                                                                                              |
| pass<mark style="color:red;">\*</mark>    | string | Your account's API password                                                                                              |
| service<mark style="color:red;">\*</mark> | string | The service nameAgeMatch5.0.{CountryName}The "CountryName" should match the value in the international coverage section. |
| reference                                 | string | A unique identifier for your customer                                                                                    |
| target                                    | object | The individual being sent for verification                                                                               |
| fn<mark style="color:red;">\*</mark>      | string | The target's first name                                                                                                  |
| ln<mark style="color:red;">\*</mark>      | object | The target's last name                                                                                                   |
| addr1                                     | string | The target's house number or name, plus street                                                                           |
| addr2                                     | string | the target's apt, flat or floor                                                                                          |
| addr3                                     | string | The target's further address details                                                                                     |
| addr4                                     | string | The target's further address details                                                                                     |
| addr5                                     | string | The target's city                                                                                                        |
| addr6                                     | string | The target's locality (e.g. county)                                                                                      |
| addr7                                     | string | The target's state or UK county                                                                                          |
| zip<mark style="color:red;">\*</mark>     | string | The target's zip/postal code                                                                                             |
| dob                                       | string | The target's Date of Birth (YYYYMMDD format)                                                                             |
| international\_id                         | string | The target's international id number.This is sometimes required. Check the international coverage page for more details. |
| phone                                     | string | The target's phone number                                                                                                |
| age<mark style="color:red;">\*</mark>     | string | The age to check (must be sent like "age+" i.e. "18+", "21+" etc.)                                                       |
| test\_key                                 | string | The test key value that you are using to test                                                                            |

{% tabs %}
{% tab title="200 Transaction processed and result returned" %}

```javascript
{
    "meta": {
        "confirmation": 71483084,
        "reference": "12345",
        "service": "AgeMatch5.0",
        "timestamp": "2019-10-17 14:29:48",
        "company": "Company ABC, Inc.",
        "user": "user@company.com"
    },
    "result": {
        "action": "PASS",
        "detail": "ALL CHECKS PASSED",
        "issues": []
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
When setting the service name you must view the data coverage section (linked above) and use the country name for your query. Therefore, in the majority of cases the service name will be something like:

**AgeMatch5.0.Canada**

But in certain cases where a country name has spaces i.e. the United Kingdom the service name will be like:

**AgeMatch5.0.UK**

You will find all of the countries where there is an exception in the data coverage section of the documentation.
{% endhint %}

## Sample Request Body

```javascript
{
      "user": "user@company.com",
      "pass": "PASSWORD",
      "service": "AgeMatch5.0.{CountryName}",
      "reference": "12345",
      "target":{
            "fn":"Barbara",
            "ln": "Miller",
            "addr1": "123 Main St",
            "addr2": "TORONTO",
            "addr3": "ON",
            "zip": "M4B 1B3",
            "dob": "19740821",
            "international_id": "854125698",
            "phone": "2015106000",
            "age": "21+",
            "test_key": "international_pass"
          }
  }
```

## Action and Detail Responses

The following are all values that will be returned in the result object of the response.

| Action | Detail                      | Description                                                                                    |
| ------ | --------------------------- | ---------------------------------------------------------------------------------------------- |
| FAIL   | NO MATCH                    | No matching identity found in the data sources                                                 |
| FAIL   | AGE NOT VERIFIED            | Target found, but no DOB information available or the DOB did not match                        |
| FAIL   | POSSIBLE MINOR              | Input DOB is under the age to check                                                            |
| FAIL   | SERVICE CANNOT BE COMPLETED | The underlying data sources are having a processing issue. Resubmit this query at a later time |
| PASS   | ALL CHECKS PASSED           | Target was found and meets the age requirement                                                 |

## Service Testing

When the test\_key is provided the system will dynamically drop the live data sources and use the testing database. These transactions are free of charge. To access live data do not send this attribute. Here are available test cases for the international service:

| test key                                   | description                                               |
| ------------------------------------------ | --------------------------------------------------------- |
| international\_pass                        | Will return a `PASS - ALL CHECKS PASSED` result           |
| international\_fail\_no\_match             | Will return a `FAIL - NO MATCH` result                    |
| international\_fail\_age\_not\_verified    | Will return a `FAIL - AGE NOT VERIFIED` result            |
| international\_fail\_possible\_minor       | Will return a `FAIL - POSSIBLE MINOR` result              |
| international\_fail\_cannot\_be\_completed | Will return a `FAIL - SERVICE CANNOT BE COMPELTED` result |

{% hint style="info" %}
The above are all "canned responses", so the target input will not matter if a valid test key is provided.
{% endhint %}

## Rules

AgeMatch International will process with the following rules by default

{% hint style="info" %}
The base ruleset will return a PASS when:

* A match is found
* The target meets the minimum age requirement
  {% endhint %}

{% hint style="warning" %}
The base ruleset will return a FAIL when:

* No Match Found
* The target's age has not been verified
* The service can not be completed
  {% endhint %}
