# Match Objects

| [CustomerData](#customerdata)                   | CustomerData information.                       |
| ----------------------------------------------- | ----------------------------------------------- |
| [CustomerDataList](#customerdatalist)           | CustomerData container.                         |
| [MatchRequest](#matchrequest)                   | MatchRequest object.                            |
| [MatchRestRequest](#matchrestrequest)           | Request wrapper for match lookup REST methods.  |
| [MatchEntityResult](#matchresult)               | MatchEntityResult information.                  |
| [MatchEntityResultList](#matchentityresultlist) | MatchEntityResult container.                    |
| [MatchResult](#matchresult-1)                   | MatchResult information.                        |
| [MatchResultList](#matchresultlist)             | MatchResult container.                          |
| [MatchResultRestResponse](#companyrestresponse) | Response wrapper for match lookup REST methods. |

### CustomerData <a href="#customerdata" id="customerdata"></a>

The CustomerData object is used when sending data for the match lookup API methods.

#### id

Type: StringThe identifier for each data set.

#### addresses

Type: [AddressList ](/loqate-harmony-api/api-specification/objects/address-objects.md#addresslist)The address list in a data set. Only one address is allowed for one data set.

#### emailAddresses

Type: [EmailList ](/loqate-harmony-api/api-specification/objects/email-objects.md#emaillist)The email address list in a data set. Only one email address is allowed for one data set.

#### phones

Type: [PhoneList](/loqate-harmony-api/api-specification/objects/phone-objects.md#phonelist) The phone list in a data set. Only one phone is allowed for one data set.

#### JSON Representation

```
    {
        "id": "c1",
        "addresses": [ { "fullAddress": "level 2, 220 george street, sydney nsw 2000" } ],
        "emailAddresses": [ { "address": "test@mydomain.com" } ],    
        "phones": [ { "fullPhone": "12345678" } ]
    }
```

With address components:

```
    {
        "id": "r2",
        "addresses": [ {
            "floorLevelNumber": "2",
            "floorLevelType": "level",
            "streetName": "george",
            "streetNumber": "220",
            "streetType": "street",
            "locality":"sydney",
            "state":"nsw"
        } ], 
        "phones": [ { "fullPhone": "12345678" } ]                 
    }
```

### CustomerDataList <a href="#customerdatalist" id="customerdatalist"></a>

An array or list of [CustomerData ](#customerdata)structures.

#### JSON Representation

```
    {
        "id": "c1",
        "addresses": [ { "fullAddress": "level 2, 220 george street, sydney nsw 2000" } ],
        "emailAddresses": [ { "address": "test@mydomain.com" } ],    
        "phones": [ { "fullPhone": "12345678" } ]
    }
```

With address components:

```
    {
        "id": "r2",
        "addresses": [ {
            "floorLevelNumber": "2",
            "floorLevelType": "level",
            "streetName": "george",
            "streetNumber": "220",
            "streetType": "street",
            "locality":"sydney",
            "state":"nsw"
        } ], 
        "phones": [ { "fullPhone": "12345678" } ]                 
    }
```

### MatchRequest <a href="#matchrequest" id="matchrequest"></a>

A MatchRequest object is used when sending data from the customer match API methods.

#### from

Type: [CustomerDataList ](#customerdatalist)The list of CustomerData structures representing the Customer Record (CR) data set. Only one data set is allowed for CR.

#### to

Type: [CustomerDataList ](#customerdatalist)The list of CustomerData structures representing the Reference Record (RR) data set. Multiple data sets are allowed for RR.

#### JSON Representation

```
    {
        "from": [
            {
                "addresses": [ { "fullAddress": "220 george street, sydney nsw 2000" } ],
                "id": "c1"
            }
        ],
        "to": [
            {
                "addresses": [ { "fullAddress": "220 george street, sydney nsw 2000" } ],
                "id": "r1"
            },
            {
                "addresses": [ { "fullAddress": "level 2, 220 george street, sydney nsw 2000" } ],
                "id": "r2"
            }
        ]
    }
    
```

### MatchRestRequest <a href="#matchrestrequest" id="matchrestrequest"></a>

A MatchRestRequest object is used when invoking the match lookup REST service methods.

#### payload

Type: [MatchRequest ](#matchrequest)The MatchRequest object being passed to the REST service method.

#### featureOptions

Type: [FeatureOption ](/loqate-harmony-api/api-specification/objects/address-objects.md#featureoption)An Object containing the values for the feature options available for Match Lookup. Currently is not implemented.

#### JSON Representation

```
    {
        "payload": {
            "from": [
                {
                    "addresses": [ { "fullAddress": "220 george street, sydney nsw 2000" } ],			
                    "id": "c1"
                }
            ],
            "to": [
                {
                    "addresses": [ { "fullAddress": "220 george street, sydney nsw 2000" } ],			
                    "id": "r1"
                },
                {
                    "addresses": [ { "fullAddress": "level 2, 220 george street, sydney nsw 2000" } ],			
                    "id": "r2"
                }
            ]
        }
    }
    
```

### MatchEntityResult <a href="#matchresult" id="matchresult"></a>

The MatchEntityResult object is used when receiving data for the match lookup API methods.

#### addressPairIdx

Type: List of IntegerThe indexes of the matched addresses.

#### emailAddressPairIdx

Type: List of IntegerThe indexes of the matched email addresses.

#### phonePairIdx

Type: List of IntegerThe indexes of the matched phones.

#### assignedMatchClass

Type: StringThe assigned match class.

#### confidenceLevel

Type: StringThe match confidence level.

#### description

Type: StringThe description of the match class.

#### matchCategory

Type: StringThe match category.

#### JSON Representation

```
    {
        "addressPairIdx": [ 0, 0 ],
        "emailAddressPairIdx": [],
        "phonePairIdx": [ 0, 0 ],
        "assignedMatchClass": "H1",
        "confidenceLevel": "10",
        "description": "Household Match Class H1",
        "matchCategory": "MATCH_CLASS"
    }
```

### MatchEntityResultList <a href="#matchentityresultlist" id="matchentityresultlist"></a>

An array or list of [MatchEntityResult ](#matchresult)structures. Currently will only return one [MatchEntityResult ](#matchresult)in the list.

#### JSON Representation

```
    "entityResults": [ 
        {
            "addressPairIdx": [ 0, 0 ],
            "emailAddressPairIdx": [],
            "phonePairIdx": [ 0, 0 ],
            "assignedMatchClass": "H1",
            "confidenceLevel": "10",
            "description": "Household Match Class H1",
            "matchCategory": "MATCH_CLASS"
        }, 
        {
            . . . .
        }
    ]
    
```

### MatchResult <a href="#matchresult" id="matchresult"></a>

The MatchResult object is used when receiving data for the match lookup API methods.

#### fromId

Type: StringThe identifier for Customer Record (CR) data set.

#### toId

Type: StringThe identifier for Reference Record (RR) data set.

#### entityResults

Type: [MatchEntityResultList](#matchentityresultlist) The MatchEntityResult list for the corresponding fromId and toId.

#### JSON Representation

```
    {
        "fromId": "c1",
        "toId": "r1",
        "entityResults": [ {
            "addressPairIdx": [ 0, 0 ],
            "emailAddressPairIdx": [],
            "phonePairIdx": [ 0, 0 ],
            "assignedMatchClass": "H1",
            "confidenceLevel": "10",
            "description": "Household Match Class H1",
            "matchCategory": "MATCH_CLASS"
        } ]
    }
```

### MatchResultList <a href="#matchresultlist" id="matchresultlist"></a>

An array or list of [MatchResult ](#matchresult-1)structures.

#### JSON Representation

```
    {
        "fromId": "c1",
        "toId": "r1",
        "entityResults": [ {
            "addressPairIdx": [ 0, 0 ],
            "emailAddressPairIdx": [],
            "phonePairIdx": [ 0, 0 ],
            "assignedMatchClass": "H1",
            "confidenceLevel": "10",
            "description": "Household Match Class H1",
            "matchCategory": "MATCH_CLASS"
        } ]
    },
    {
        "fromId": "c1",
        "toId": "r2",
        "entityResults": [ {
            "addressPairIdx": [ 0, 0 ],
            "emailAddressPairIdx": [],
            "phonePairIdx": [],
            "assignedMatchClass": "G2",
            "confidenceLevel": "8",
            "description": "Address Match Class G2",
            "matchCategory": "MATCH_CLASS"
        } ]
    }
```

### MatchResultRestResponse <a href="#companyrestresponse" id="companyrestresponse"></a>

A [MatchResultRestResponse ](#companyrestresponse)object is returned from the match lookup REST service methods.

#### payload

Type: [MatchResultList ](#matchresultlist)The list of MatchResult structures being returned from the REST service method.

#### status

Type: StringThe status of the request (i.e. 'SUCCESS' or 'ERROR').

#### messages

Type: String\[]Any error messages generated during the REST service method invocation (e.g. '\[ "Access is denied" ]')

#### JSON Representation

```
    {
        "status": "SUCCESS",
        "messages": [],
        "payload": [
            {
                "fromId": "c1",
                "toId": "r1",
                "entityResults": [ {
                    "addressPairIdx": [ 0, 0 ],
                    "emailAddressPairIdx": [],
                    "phonePairIdx": [ 0, 0 ],
                    "assignedMatchClass": "H1",
                    "confidenceLevel": "10",
                    "description": "Household Match Class H1",
                    "matchCategory": "MATCH_CLASS"
                } ]
            },
            {
                "fromId": "c1",
                "toId": "r2",
                "entityResults": [ {
                    "addressPairIdx": [ 0, 0 ],
                    "emailAddressPairIdx": [],
                    "phonePairIdx": [],
                    "assignedMatchClass": "G2",
                    "confidenceLevel": "8",
                    "description": "Address Match Class G2",
                    "matchCategory": "MATCH_CLASS"
                } ]
            }
        ]
    }
    
```


---

# 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://docs.mastersoftgroup.com/loqate-harmony-api/api-specification/objects/match-objects.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.
