# United States

## IDMatchPLUS5.0.MULTI

<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 has provided valid identity attributes and to receive the quiz to present. You will receive a synchronous response in 2-3 seconds with a **result** object that includes an **action, detail** and **issues object**. If any of the provided identity attributes provided did not match you will know during this initial call.\
\
Then present the quiz to the user and take their answers and populate them in the **template** object provided and make a second POST request to get the final result with quiz score.

#### 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 name (IDMatchPLUS5.0.MULTI)                            |
| 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                                             |
| addr<mark style="color:red;">\*</mark>    | string | The target's street address (line 1 and line 2)                    |
| city                                      | string | the target's city                                                  |
| state                                     | string | The target's state                                                 |
| zip<mark style="color:red;">\*</mark>     | string | The target's zip                                                   |
| dob                                       | string | The target's Date of Birth (YYYYMMDD format)                       |
| ssn                                       | string | The target's SSN (either 4 or 9)                                   |
| phone                                     | string | The target's phone number                                          |
| email                                     | string | The target's email address                                         |
| age                                       | 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
{
  "output": {
    "questions": {
      "questions": [
        {
          "prompt": "With which of the following states are you or have you been associated?",
          "type": "state",
          "id": "state1",
          "answers": [
            {
              "text": "VERMONT"
            },
            {
              "text": "NORTH DAKOTA"
            },
            {
              "text": "SOUTH DAKOTA"
            },
            {
              "text": "WISCONSIN"
            },
            {
              "text": "None of the above"
            }
          ]
        },
        {
          "prompt": "Which of the following addresses are in Green Bay?",
          "type": "address",
          "id": "address3",
          "answers": [
            {
              "text": "11 157 STREET"
            },
            {
              "text": "170 WEAVER ST"
            },
            {
              "text": "87 EAST BROADWAY BLVD"
            },
            {
              "text": "6 PRICE ROAD"
            },
            {
              "text": "None of the above"
            }
          ]
        },
        {
          "prompt": "With which of the following zip codes are you or have you been associated?",
          "type": "zip5",
          "id": "zip52",
          "answers": [
            {
              "text": "54420"
            },
            {
              "text": "54155"
            },
            {
              "text": "54551"
            },
            {
              "text": "54807"
            },
            {
              "text": "None of the above"
            }
          ]
        },
        {
          "prompt": "With which of the following cities are you or have you been associated?",
          "type": "city",
          "id": "city0",
          "answers": [
            {
              "text": "STREETSBORO"
            },
            {
              "text": "SAINT JOHN"
            },
            {
              "text": "FORT MORGAN"
            },
            {
              "text": "WEST ALLIS"
            },
            {
              "text": "None of the above"
            }
          ]
        }
      ]
    }
  },
  "meta": {
    "confirmation": 21185214,
    "reference": "12345",
    "service": "IDMatchPLUS5.0.MULTI",
    "timestamp": "2017-08-08 14:25:02",
    "company": "Veratad Technologies, LLC",
    "user": "user@veratad.com"
  },
  "result": {
    "action": "PENDING",
    "detail": "MORE INFORMATION IS REQUIRED",
    "issues": []
  },
  "continuations": {
    "questions": {
      "url": "/process/continue",
      "template": {
        "token": "2nypwsj51mzhjvm7cr1hbyaabqm67qcc",
        "answers": {
          "zip52": [],
          "state1": [],
          "address3": [],
          "city0": []
        }
      },
      "instructions": "Add the text of the answers into the empty list for the appropriate question (case sensitive)."
    }
  }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Use the test\_key attribute to test the service. 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. The below sample request is one of the available test cases. To access more click the link below.
{% endhint %}

{% content-ref url="../testing-1/additional-test-cases" %}
[additional-test-cases](https://api.veratad.com/testing-1/additional-test-cases)
{% endcontent-ref %}

## Sample Request Body

{% hint style="info" %}
This is the initial query to get the quiz. See below example of how to submit the answers for final scoring and evaluation.
{% endhint %}

```javascript
{
      "user": "USERNAME",
      "pass": "PASSWORD",
      "service": "IDMatchPLUS5.0.MULTI",
      "rules": "A_RULESET_ID",
      "reference": "12345 {A UNIQUE ID}",
      "target":{
            "fn":"Barbara",
            "ln": "Miller",
            "addr": "123 Main St",
            "city": "Stratford",
            "state": "CT",
            "zip": "06614",
            "dob": "19740821",
            "ssn": "854125698",
            "phone": "2015106000",
            "email": "bmiller@veratad.com",
            "age": "21+",
            "test_key": "general_identity"
          }
  }
```

## Request with Quiz Answers

Once your user has answered the questions, send those answers back to the system for scoring and a final evaluation.

## Submit Answers

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

Sending a POST request with the below body will give you the final evaluation of the quiz and other identity attributes.

#### Request Body

| Name    | Type   | Description                                                                             |
| ------- | ------ | --------------------------------------------------------------------------------------- |
| token   | string | The token that was returned in the initial response that relates to this specific quiz. |
| answers | object | The answers object should include each question asked and the user's answer.            |

{% tabs %}
{% tab title="200 The result of the question and identity evaluation. " %}

```javascript
{
  "final": {
    "template": {
      "token": "euwd6q5a8b4c0vwc0zy0s6ms1mjh5p0s"
    },
    "url": "/process/status"
  },
  "output": {
    "answers": {
      "asked": 4,
      "correct": 0
    }
  },
  "result": {
    "action": "REVIEW",
    "detail": "TRANSACTION REQUIRES FURTHER ATTENTION",
    "issues": [
      "QUESTION CHECK FAILED"
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## Sample Request Body - Quiz Score

```javascript
{
  "answers": {
    "state3": ["NEW YORK"],
    "mothers_maiden0": ["None of the above"],
    "phone1": ["(206) 393-4478"],
    "county2": ["FAIRFIELD"]
  },
  "token": "1bauxkpczhdiyy3vqm15ais8ue12u7zw"
}
```

## Action and Detail Responses

{% hint style="info" %}
The following are all values that will be returned in the result object of the response.
{% endhint %}

| 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                                                                                                                                                                          |
| FAIL    | TARGET IS DECEASED                     | Target found as a deceased identity                                                                                                                                                                                     |
| FAIL    | POSSIBLE MINOR                         | Target found, but a minor age detected                                                                                                                                                                                  |
| REVIEW  | TRANSACTION REQUIRES FURTHER ATTENTION | Target found and not deceased, but at least one identity attribute provided does not match. This will also populate the "issues" object with a list of the identity attributes that did not match. See full list below. |
| PENDING | MORE INFORMATION IS REQUIRED           | Target was found is not deceased and meets the age requirement, but they have not yet answered the quiz.                                                                                                                |
| PASS    | ALL CHECKS PASSED                      | Target was found is not deceased and meets the age requirement                                                                                                                                                          |

## Issues Responses

{% hint style="info" %}
When a transaction returns as REVIEW or PENDING then there will be a list of issues. This list can include any of the below values.
{% endhint %}

| Issue                       | Description                                                              |
| --------------------------- | ------------------------------------------------------------------------ |
| ADDRESS CHECK FAILED        | The address provided does not match any on file                          |
| DATE OF BIRTH CHECK FAILED  | The Date of Birth provided does not match any on file                    |
| YEAR OF BIRTH CHECK FAILED  | The Year of Birth provided does not match any on file                    |
| MONTH OF BIRTH CHECK FAILED | The Month of Birth provided does not match any on file                   |
| DAY OF BIRTH CHECK FAILED   | The Day of Birth provided does not match any on file                     |
| SSN CHECK FAILED            | The SSN provided does not match any on file                              |
| MULTIPLE SSNS FOUND         | The identity located has more than one SSN associated                    |
| PHONE CHECK FAILED          | The Phone Number provided does not match any on file                     |
| EMAIL CHECK FAILED          | The Email Address provided does not match any on file                    |
| AGE CHECK FAILED            | The target does not meet the minimum age requirement                     |
| POSSIBLE MINOR              | A DOB detected that indicates the user may be under your age requirement |
| QUESTION CHECK FAILED       | The user did not answer at least 3/4 questions correct                   |

## Rules

IDMatch+PLUS will process with the default base ruleset:

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

* A match is found
* The target is not deceased
* The target has provided all valid identity attributes
* The user has answered at least 3/4 questions correct
  {% endhint %}

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

* A match is found
* The target is not deceased
* The target's identity attributes do not all match or they failed the quiz
  {% endhint %}

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

* A match found
* The target is not deceased
* Questions are returned, but not answered yet
  {% endhint %}

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

* A match is not found or
* The target is deceased

In this case no questions will be provided.
{% endhint %}

## API Processing Error Returns

{% hint style="info" %}
Each token is only valid for 90 seconds with this service. See the error responses to get information on what happens if a token is bad or expired.
{% endhint %}

{% content-ref url="../api-processing-errors/error-returns" %}
[error-returns](https://api.veratad.com/api-processing-errors/error-returns)
{% endcontent-ref %}
