# Scanning Basic

## What is the difference between basic and enhanced?

Please see the table below for a list of features to decide which option fits your business best.

| Feature                                  | basic | enhanced |
| ---------------------------------------- | ----- | -------- |
| Data Extraction                          | yes   | yes      |
| Expiration Check                         | yes   | yes      |
| Age Check                                | yes   | yes      |
| Target Data Matching                     | yes   | yes      |
| Automatically Recognizes Document Type   | no    | yes      |
| Automatically Recognizes Document Region | no    | yes      |
| Enhanced Security Checks                 | no    | yes      |
| Selfie Matching                          | no    | yes      |
| Expanded International Coverage          | no    | yes      |

## DCAMSPLUS5.0

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

Send a POST request with target parameters along with the document image(s) to receive the verification result.

#### 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 (DCAMSPLUS5.0)                                                                                                                                                                                                                                                               |
| rules                                     | string | The rule set name (if left empty then the base rule set will be used)                                                                                                                                                                                                                         |
| reference                                 | string | A unique identifier for your customer                                                                                                                                                                                                                                                         |
| target                                    | object | The individual being sent for verification                                                                                                                                                                                                                                                    |
| fn                                        | string | The target's first name                                                                                                                                                                                                                                                                       |
| ln                                        | object | The target's last name                                                                                                                                                                                                                                                                        |
| addr                                      | string | The target's street address (line 1 and line 2)                                                                                                                                                                                                                                               |
| city                                      | string | the target's city                                                                                                                                                                                                                                                                             |
| state                                     | string | The target's state                                                                                                                                                                                                                                                                            |
| zip                                       | string | The target's zip                                                                                                                                                                                                                                                                              |
| dob                                       | string | The target's Date of Birth (YYYYMMDD format)                                                                                                                                                                                                                                                  |
| license                                   | object | The target's document images and other parameters.*This is not required if you send the passport object*                                                                                                                                                                                      |
| front<mark style="color:red;">\*</mark>   | string | The target's front document image                                                                                                                                                                                                                                                             |
| back                                      | string | The target's back document image                                                                                                                                                                                                                                                              |
| state                                     | string | The document's state.Only applicable for US documents. If included it can speed up processing times.                                                                                                                                                                                          |
| region                                    | string | <p>The document's region. If this is left empty then United States will be assumed. To verify a document outside of the United States you must include this attribute. Acceptable values are:Asia<br>Australia<br>Africa<br>Canada<br>Europe<br>Oceania<br>South America<br>United States</p> |
| passport                                  | object | The target's passport image.*Only required if you are not sending the license object*                                                                                                                                                                                                         |
| 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": {
        "documents": { //this is the test case data in the system. So, when you use the test_key dcams_pass this si what will be returned.
            "FirstName": "LOUISA",
            "LastName": "SAMPLE",
            "MiddleName": "ANNA",
            "Address": "109 S FOSTER RD",
            "City": "BATON ROUGE",
            "State": "LA",
            "Zip": "70808",
            "DateOfBirth": "19720629",
            "Height": "5-08",
            "Sex": "F",
            "EyeColor": "BRN",
            "DocumentNumber": "003009381",
            "IssueDate": "20140714",
            "ExpirationDate": "20300629",
            "CountryCode": "USA", // (ISO Alpha 2 or 3)
            "DocumentType": "DRIVERS LICENSE", // other values are PASSPORT, IDENTITY CARD and UNKNOWN
            "Confidence": 100
        }
    },
    "meta": {
        "confirmation": 96095474,
        "reference": "12345",
        "service": "DCAMSPLUS5.0",
        "timestamp": "2020-07-08 14:49:19",
        "company": "Company ABC, Inc.",
        "user": "user@company.com"
    },
    "result": {
        "action": "PASS",
        "detail": "ALL CHECKS PASSED",
        "issues": []
    }
}
```

{% endtab %}
{% endtabs %}

## Sample Request Body

```javascript
{
  "user": "user@company.com",
  "pass": "PASSWORD",
  "service": "DCAMSPLUS5.0",
  "reference": "12345",
  "rules": "additional matching rules",
  "target": {
    "license": { // this object will accept any identity document except a passport i.e. driving license or identity card.
      "front": "base64 encoded image file",
      "back": "base64 encoded image file",
      "state": "CT",
      "region": "United States"
    },
    "passport":{
      "front": "base64 encoded image file"
    },
    "age": "21+",
    "fn": "John",
    "ln": "Smith",
    "dob": "19870621",
    "test_key": "dcams_pass"
  }
}
```

{% hint style="info" %}
If you send both the `license` and `passport` objects the system will prefer the `license` and ignore the `passport.`If you want to verify a passport please remove the `license` object and only send the `passport` object.
{% endhint %}

## Test Keys

Use the `test_key` attribute to test the service. When the `test_key` is provided the system will return a known canned response (regardless of the image submitted) and these transactions are free of charge.

| test\_key            | description                        |
| -------------------- | ---------------------------------- |
| dcams\_pass          | Will return a `PASS` action result |
| dcams\_fail\_expired | Will return a `FAIL` action result |

{% hint style="info" %}
If you are using one of the matching rule sets and want to force a REVIEW then use the `dcams_pass` case and change the input target attributes to something other than the target returned.

For example, the test case's first name is LOUISA, so to get a `FIRST NAME DOES NOT MATCH THE DOCUMENT` issue just change the target's first name to something other than LOUISA.
{% endhint %}

## Action and Detail Responses

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

| action | detail                                 | description                                                                                                                          |
| ------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| FAIL   | NOT A VALID DOCUMENT                   | We can not detect the image as a valid identity document                                                                             |
| FAIL   | DOCUMENT NOT VERIFIED                  | We have detected an identity document, but the confidence level is below the threshold                                               |
| FAIL   | DOCUMENT IS EXPIRED                    | The document's expiration date is in the past                                                                                        |
| FAIL   | DOCUMENT AGE CHECK FAILED              | The Date of Birth on the document does not meet the minimum age requirement                                                          |
| REVIEW | TRANSACTION REQUIRES FURTHER ATTENTION | One of the matching rules was not met (this only happens when using an additional rule set)                                          |
| PASS   | ALL CHECKS PASSED                      | The document is valid, is not expired, the Date of Birth meets the minimum age requirement and additional matching rules all passed. |

## Issues Responses

{% hint style="info" %}
When a transaction returns as REVIEW then there will be a list of issues. This list can include any of the below values. For this service the REVIEW action will only return if you are not using the base rule set.
{% endhint %}

| Issue                                  | Description                                                                      |
| -------------------------------------- | -------------------------------------------------------------------------------- |
| FIRST NAME DOES NOT MATCH THE DOCUMENT | The target's first name does not match the first name discovered on the document |
| LAST NAME DOES NOT MATCH THE DOCUMENT  | The target's last name does not match the last name discovered on the document   |
| DOB DOES NOT MATCH THE DOCUMENT        | The target's DOB does not match the DOB discovered on the document               |
| ADDRESS DOES NOT MATCH THE DOCUMENT    | The target's address does not match the address discovered on the document       |
| STATE DOES NOT MATCH THE DOCUMENT      | The target's state does not match the state discovered on the document           |

## Rules

DCAMSPLUS5.0 will process with the default base ruleset unless a below rule set value is supplied:

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

* The document is valid
* The document is not expired
* The Date of Birth on the document meets the age requirement
  {% endhint %}

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

* The base rule set is not used
* One or more of the target attributes do not match the document.
  {% endhint %}

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

* The document is not valid
* The document is expired
* The Date of Birth on the document does not meet the age requirement
  {% endhint %}

## Additional Rule Sets

You can set a new rule set.

| Rule Set Name                        | Description                                                                      |
| ------------------------------------ | -------------------------------------------------------------------------------- |
| DCAMS5\_0\_RuleSet\_NAME\_DOB        | Base Ruleset + Name and DOB on target must match the document                    |
| DCAMS5\_0\_RuleSet\_NAME             | Base Ruleset + Name on target must match the document                            |
| DCAMS5\_0\_RuleSet\_NAME\_ADDR       | Base Ruleset + Name and Address on target must match the document                |
| DCAMS5\_0\_RuleSet\_NAME\_STATE      | Base Ruleset + Name and State on target must match the document                  |
| DCAMS5\_0\_RuleSet\_NAME\_STATE\_DOB | Base Ruleset + Name, State and Date of Birth on target must match the document   |
| DCAMS5\_0\_RuleSet\_NAME\_ADDR\_DOB  | Base Ruleset + Name, Address and Date of Birth on target must match the document |

{% hint style="success" %}
If you do not see a rule set that you would like to use -- please just ask. We can always create a new rule set for your business purpose.
{% endhint %}

## Helpful Information

* The total payload may not exceed 10 MB in size.
* The minimum image size is 400 pixels on each side of the document
* For the best results ensure:
  * The image is not blurry
  * There is no glare
  * The document takes up at least 80% of the image
  * The edges are not cut off
  * The document is on a flat surface


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.veratad.com/id-document-verification/overview/dcamsplus.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
