## Multi Field Request

With Resolve API, the ability to match on one or many input fields is available. Map, store and resolve to individuals by sending any identifiers you may already have, such as an email address(es), Twitter handle, Linkedin URL, phone number(s), name and location(address), name and Placekey identifier, social URLs, IDs and/or usernames (except Facebook and Instagram), Mobile Advertising IDs (MAIDs) and your internal customer record IDs, person IDs and a LiveIntent nonID using Resolve API. The Customer Record ID will then be used to locate and maintain an internal mapping which can be used as an input for future requests into FullContact APIs.

The more contact data inputs you can provide either via API or Batch, the better. By providing more contact inputs, the more accurate and precise we can get with our identity resolution capabilities. If your multi-field request contains incomplete identifier combinations alongside valid inputs, the valid inputs only will be used to identify and resolve an individual. For example, if a name/address combination does not adhere to what is acceptable alongside a valid email, only the valid email will be used to lookup an individual.

When providing inputs, there’s a few helpful tips to keep in mind:

- To use MD5 emails, be sure to first lowercase and ensure any extraneous characters (e.g. extra spaces or surrounding quotation marks) are stripped off.
- To use postal address, a name is required alongside the input and vice versa.
- To use Placekey, a name is required alongside the input and vice versa.
- Only one name/address (clear text postal or Placekey) combination can be included in the API request.
- To use an international phone number, a country code is required.
- There is a maximum of 25 identifiers by type that you may use in your multi field request. A 400 Response will be returned if there are more than 25 identifiers for any given identifier type.

```shell
curl -X POST \
    https://api.fullcontact.com/v3/identity.resolve \
    -H 'Authorization: Bearer {Your API Key}' \
    -H "Content-Type: application/json" \
    -d '{
    "emails": [\
      "bart@fullcontact.com",\
      "bart.lorang@fullcontact.com"\
    ],\
    "phones": [\
      "+17202227799",\
      "+13035551234"\
    ],\
    "location": {
      "addressLine1": "123 Main Street",
      "addressLine2": "Unit 2",
      "city": "Denver",
      "region": "Colorado",
      "regionCode": "CO",
      "postalCode": "80203"
    },\
    "placekey": "226@5z4-zvy-ffz",
    "name": {
      "full": "Bart Lorang",
      "given": "Bart",
      "family": "Lorang"
    },\
    "profiles": [{\
      "service": "twitter",\
      "username": "bartlorang"\
      }, {\
      "service": "twitter",\
      "userid": "5998422"\
      }, {\
      "service": "linkedin",\
      "url": "https://www.linkedin.com/in/bartlorang"\
      }, {\
      "service": "github",\
      "url": "https://www.github.com/lorangb"\
      }],\
    "maids": ["ape2ch30-pifn-cbvi-30yy-nia-zex7aw5u"],\
    "recordId": "customer123",
    "personId": "eYxWc0B-dKRxerTw_uQpxCssM_GyPaLErj0Eu3y2FrU6py1J",
    "li_nonid": "-CmQui5eT6tqBVqQ874WGCv4DNO_taXJOAxVlQ"
}'}
```

```javascript
var fetch = require('node-fetch');

fetch('https://api.fullcontact.com/v3/identity.resolve',{ 
    method: 'POST',
    headers: {
      "Authorization": "Bearer {Your API Key}"
    },
    body: JSON.stringify({
      "emails": [\
        "bart@fullcontact.com",\
        "bart.lorang@fullcontact.com"\
      ],
      "phones": [\
        "+17202227799",\
        "+13035551234"\
      ],
      "location": {
        "addressLine1": "123 Main Street",
        "addressLine2": "Unit 2",
        "city": "Denver",
        "region": "Colorado",
        "regionCode": "CO",
        "postalCode": "80203"
      },
      "placekey": "226@5z4-zvy-ffz",
      "name": {
        "full": "Bart Lorang",
        "given": "Bart",
        "family": "Lorang"
      },
      "profiles": [{\
        "service": "twitter",\
        "username": "bartlorang"\
        }, {\
        "service": "twitter",\
        "userid": "5998422"\
        }, {\
        "service": "linkedin",\
        "url": "https://www.linkedin.com/in/bartlorang"\
        }, {\
        "service": "github",\
        "url": "https://www.github.com/lorangb"\
        }],
      "maids": ["ape2ch30-pifn-cbvi-30yy-nia-zex7aw5u"],
      "recordId": "customer123",
      "personId": "eYxWc0B-dKRxerTw_uQpxCssM_GyPaLErj0Eu3y2FrU6py1J",
      "li_nonid": "-CmQui5eT6tqBVqQ874WGCv4DNO_taXJOAxVlQ"
}).then(function(res) {
    return res.json();
}).then(function(json){
    console.log(json);
});
```

```python
import urllib.request, json

req = urllib.request.Request('https://api.fullcontact.com/v3/identity.resolve')
req.add_header('Authorization', 'Bearer {Your API Key}')
data = json.dumps({
    "emails": [\
      "bart@fullcontact.com",\
      "bart.lorang@fullcontact.com"\
    ],
    "phones": [\
      "+17202227799",\
      "+13035551234"\
    ],
    "location": {
      "addressLine1": "123 Main Street",
      "addressLine2": "Unit 2",
      "city": "Denver",
      "region": "Colorado",
      "regionCode": "CO",
      "postalCode": "80203"
    },
    "placekey": "226@5z4-zvy-ffz",
    "name": {
      "full": "Bart Lorang",
      "given": "Bart",
      "family": "Lorang"
    },
    "profiles": [{\
      "service": "twitter",\
      "username": "bartlorang"\
      }, {\
      "service": "twitter",\
      "userid": "5998422"\
      }, {\
      "service": "linkedin",\
      "url": "https://www.linkedin.com/in/bartlorang"\
      }, {\
      "service": "github",\
      "url": "https://www.github.com/lorangb"\
    }],
"maids": ["ape2ch30-pifn-cbvi-30yy-nia-zex7aw5u"],
"recordId": "customer123",
"personId": "eYxWc0B-dKRxerTw_uQpxCssM_GyPaLErj0Eu3y2FrU6py1J",
"li_nonid": "-CmQui5eT6tqBVqQ874WGCv4DNO_taXJOAxVlQ"
})

response = urllib.request.urlopen(req,data)
```

```ruby
require 'rest-client'
require 'json'

response = RestClient.post("https://api.fullcontact.com/v3/identity.resolve",
    {
      "emails": [\
        "bart@fullcontact.com",\
        "bart.lorang@fullcontact.com"\
      ],
      "phones": [\
        "+17202227799",\
        "+13035551234"\
      ],
      "location": {
        "addressLine1": "123 Main Street",
        "addressLine2": "Unit 2",
        "city": "Denver",
        "region": "Colorado",
        "regionCode": "CO",
        "postalCode": "80203"
      },
      "placekey": "226@5z4-zvy-ffz",
      "name": {
        "full": "Bart Lorang",
        "given": "Bart",
        "family": "Lorang"
      },
      "profiles": [{\
        "service": "twitter",\
        "username": "bartlorang"\
        }, {\
        "service": "twitter",\
        "userid": "5998422"\
        }, {\
        "service": "linkedin",\
        "url": "https://www.linkedin.com/in/bartlorang"\
        }, {\
        "service": "github",\
        "url": "https://www.github.com/lorangb"\
      }],
     "maids": ["ape2ch30-pifn-cbvi-30yy-nia-zex7aw5u"],
     "recordId": "customer123",
     "personId": "eYxWc0B-dKRxerTw_uQpxCssM_GyPaLErj0Eu3y2FrU6py1J",
     "li_nonid": "-CmQui5eT6tqBVqQ874WGCv4DNO_taXJOAxVlQ"
    }.to_json,
    {
      :authorization => "Bearer {Your API Key}"
    })

JSON.parse(response.body)
```

```java
import org.apache.http.client.fluent.Request;
import org.apache.http.entity.StringEntity;

Request.Post("https://api.fullcontact.com/v3/identity.resolve")
      .addHeader("Authorization","Bearer {Your API Key}")
      .body(new StringEntity("{\n  \"emails\": [\n    \"bart@fullcontact.com\",\n    \"bart.lorang@fullcontact.com\"\n  ],\n  \"phones\": [\n    \"+17202227799\",\n    \"+13035551234\"\n  ],\n  \"location\": {\n    \"addressLine1\": \"123 Main Street\",\n    \"addressLine2\": \"Unit 2\",\n    \"city\": \"Denver\",\n    \"region\": \"Colorado\",\n    \"regionCode\": \"CO\",\n    \"postalCode\": \"80203\"\n  },\n  \"placekey\": \"226@5z4-zvy-ffz\",\n  \"name\": {\n    \"full\": \"Bart Lorang\",\n    \"given\": \"Bart\",\n    \"family\": \"Lorang\"\n  },\n  \"profiles\": [{\n    \"service\": \"twitter\",\n    \"username\": \"bartlorang\"\n  }, {\n    \"service\": \"twitter\",\n    \"userid\": \"5998422\"\n  }, {\n    \"service\": \"linkedin\",\n    \"url\": \"https://www.linkedin.com/in/bartlorang\"\n  }, {\n    \"service\": \"github\",\n    \"url\": \"https://www.github.com/lorangb\"\n  }],\n  \"maids\": [\"ape2ch30-pifn-cbvi-30yy-nia-zex7aw5u\"],\n  \"recordId\": \"customer123\",\n  \"personId\": \"eYxWc0B-dKRxerTw_uQpxCssM_GyPaLErj0Eu3y2FrU6py1J\",\n  \"li_nonid\": \"-CmQui5eT6tqBVqQ874WGCv4DNO_taXJOAxVlQ\"\n}")")
      .execute()
      .returnContent();
```

| Input Fields | 
| --- | 
| email stringQueryable | One email address of the contact. Can accept cleartext, an MD5 or SHA-256 hash representation of the email address to query. Be certain to lowercase and trim the email address prior to hashing. | 
| emails arrayQueryable | One or many email addresses of the contact. Can accept cleartext, an MD5 or SHA-256 hash representation of the email address to query. Be certain to lowercase and trim the email address prior to hashing. | 
| phone stringQueryable | Phone number of the contact. For international numbers a country code is required. | 
| phones arrayQueryable | One or many phone numbers of the contact. For international numbers a country code is required. | 
| profiles objectQueryable | URLs, IDs and usernames to the profiles on the social platform. | 
| name.full stringQueryable | Full name of the contact (givenName, familyName). Only queryable when provided in conjunction with postal address. | 
| name.given stringQueryable | The given name (first name) of the individual. Only queryable when provided in conjunction with postal address. | 
| name.family stringQueryable | The family name (last name) of the individual. Only queryable when provided in conjunction with postal address. | 
| location.addressLine1 stringQueryable | The first address line for each location. Only queryable when provided in conjunction with name. | 
| location.addressLine2 stringQueryable | The second address line for each location. Only queryable when provided in conjunction with name. | 
| location.city stringQueryable | The city of each location. Only queryable when provided in conjunction with name. | 
| location.region stringQueryable | The region of each location. This is often the state or province. Only queryable when provided in conjunction with name. | 
| location.regionCode stringQueryable | The region code of each location. Only queryable when provided in conjunction with name. | 
| location.postalCode stringQueryable | The postal or ZIP code for each location. Can accept Zip + 4 or Zip. Only queryable when provided in conjunction with name. | 
| placekey stringQueryable | The universal standard identifier for any physical place. Only queryable when provided in conjunction with name. | 
| maids listQueryable | One or more Mobile Advertising IDs (MAIDs) for an individual. | 
| recordId stringQueryable | The client-driven record id attached to a customer. | 
| personId stringQueryable | The unique, persistent FullContact person id attached to a customer that is scoped per account. | 
| li_nonid stringQueryable | The LiveIntent pre-authenticated digital nonID.
