# Enhance Record Plus

`POST /enhance_record_plus`

- Live: `POST https://gdapi.globaldata.net.au/api/v2/enhance_record_plus`
- Sandbox: `POST https://sandbox-gdapi.globaldata.net.au/api/v2/enhance_record_plus`

The Enhance Record call will perform a record enhancement on the supplied person and associated contact details.
This version of the endpoint will also conduct a court check and social check on the results.

## Minimum search requirements

In order to perform a valid lookup, a minimum of the following fields are required:
- first_name, last_name and at least one of dob or address
- phone
- email

If less than the minimum requirements are supplied, the API will return a 400 error with the message
"Insufficient information to perform the request"

## Opt-in

By default, the results will include all available records. If you would like to limit the results to only those that have opted in to marketing or public records (eg whitepages), you can set the `opt-in` parameter to `true`. Note that any social records returned are NOT checked for opt-in status and must not be used for marketing purposes.

## Social Records Warning

The social records are included based on the emails or phone numbers appearing in social media records, and must not
be taken to directly represent the person from this search record or be used for marketing purposes. Organisations must make their own enquiries as to the accuracy and appropriate use of this information.

## Court Records Warning

The records are included based on the name and state appearing in public court records, and must not
be taken to directly represent the person from this search record. Organisations must make their own
enquiries as to the accuracy and appropriate use of this information.

## Sandbox environment data

When simulating queries in the sandbox environment, the following records will return a match:

| First Name | Last Name | Street Address    | Suburb           | Postcode | State | Phone                  | Email                         | Result Type          |
|:-----------|:----------|:------------------|:-----------------|:---------|:------|:-----------------------|:------------------------------|:---------------------|
| Michael    | Raymond   | 12 Conestoga Way  | Upper Coomera    | 4209     | QLD   |                        | michael.raymond@example.com   | Match, Social, Court |
| Emma       | Russell   | 4 Westmill Dr     | Hoppers Crossing | 3029     | VIC   | 0427519643             |                               | Match                |
| Owen       | Wyllie    | 4 Butcherbird Cl  | Eli Waters       | 4655     | QLD   | 0741241873             | bc68@pardswit.org.au          | Match                |
| Deanna     | Price     | 45/3 Spurway Dr   | Baulkham Hills   | 2153     | NSW   | 0298389934             |                               | Match                |
| Peter      | Jenkin    | 2 Tanami Cl       | Belrose          | 2085     | NSW   | 0294511557, 0294511557 | peter508@moraitive.net.au     | Match                |
| Christian  | Wessels   | PO Box 280        | Camden           | 2570     | NSW   | 0246571285             | vzchristian52@bittomizess.net | Match                |
| Julie      | Spivey    | 34/12 Melville Rd | Salisbury East   | 5109     | SA    | 0410093241             | spivey93@namithusly.net       | Match                |

## Request body

The details of the record to enhance

| Field | Type | Description |
|-------|------|-------------|
| `first_name` | string | The first name of the individual Example: `Michael` |
| `middle_name` | string | The middle name of the individual Example: `John` |
| `last_name` | string | The last name of the individual Example: `Raymond` |
| `dob` | string (date) | The date of birth of the individual Example: `1969-06-21` |
| `phone` | string | The phone number in 0NSN format Example: `0412345678` |
| `email` | string | The email address Example: `michael.raymond@example.com` |
| `street_address` | string | The street/postal address component (Address line 1) Example: `12 Conestoga Way` |
| `suburb` | string | The suburb component of the address Example: `Upper Coomera` |
| `state` | string | The Australian state of the individual's address Enum: `ACT`, `NSW`, `NT`, `QLD`, `SA`, `TAS`, `VIC`, `WA` Example: `QLD` |
| `postcode` | string | The postcode component of the address Example: `4209` |
| `opt-in` | boolean | Limit the results to only those that have opted in to marketing or public records (eg whitepages). Note that any social records returned are NOT checked for opt-in status and must not be used for marketing purposes. * `true` - Limit the results to only those that have opted in to marketing or public records (eg whitepages). * `false` - Include all records. Example: `false` |

**Sample request**

```json
{
    "first_name": "Michael",
    "middle_name": "John",
    "last_name": "Raymond",
    "dob": "1969-06-21",
    "phone": "0412345678",
    "email": "michael.raymond@example.com",
    "street_address": "12 Conestoga Way",
    "suburb": "Upper Coomera",
    "state": "QLD",
    "postcode": "4209",
    "opt-in": false
}
```

## Responses

### 200 Result of the check

Content type: `application/json`

| Field | Type | Description |
|-------|------|-------------|
| `message` | string | A message indicating the result of the request. This will be `Ok` if the request was successful. Example: `Ok` |
| `api_reference` | string (uuid) | A unique identifier for this request. This can be used to track the request in the logs. Example: `fe4291ca-d831-4760-96df-c9cb03b3cd95` |
| `supplied_address` | array of objects | The supplied address, parsed and cleaned. |
| `supplied_address[].match_result` | string | The address match type: - address_not_found: No matching address found - address_empty: No address supplied - address_corrected: Address was corrected from supplied address - address_match: Address was matched as supplied Enum: `address_not_found`, `address_empty`, `address_corrected`, `address_match` Example: `address_match` |
| `supplied_address[].address_id` | string | The unique identifier for the address Example: `ABCDE123456789` |
| `supplied_address[].street_address` | string | The street/postal address component (Address line 1) Example: `UNIT 1/12A SAMPLE STREET` |
| `supplied_address[].suburb` | string | The suburb component of the address Example: `SAMPLEVILLE` |
| `supplied_address[].state` | string | The state from the address (2 or 3 letter abbreviation, upper case) Enum: `ACT`, `NSW`, `NT`, `QLD`, `SA`, `TAS`, `VIC`, `WA` Example: `VIC` |
| `supplied_address[].postcode` | string | The 4 digit postcode of the address Example: `3999` |
| `supplied_address[].last_sale_date` | string (date|blank) | Date property was last for sale YYYY-MM-DD (if available) Example: `2019-01-01` |
| `supplied_address[].last_rental_date` | string (date|blank) | Date property was last for rent YYYY-MM-DD (if available) Example: `2022-03-15` |
| `supplied_address[].demographic_irsad` | string | The IRSD (Index of Relative Socio-economic Advantage and Disadvantage) for the address Example: `6` |
| `supplied_address[].demographic_ier` | string | The IER (Index of Education and Occupation) for the address Example: `5` |
| `supplied_address[].demographic_ieo` | string | The IEO (Index of Economic Resources) for the address Example: `4` |
| `match_person` | object | The matched person details |
| `match_person.match_result` | string | The person match type: - no_match: No matching person found - name_dob: Full name and date of birth match - full_name_exact: Full name match - first_name_initial: First name initial and last name match - last_name: Last name match - similar_last_name: Similar last name match - name_last_phone: Last name and phone number match - name_phone: Full name and phone number match - name_initial_phone: First name initial, last name and phone number match - name_email: Full name and email match - name_initial_email: First name initial, last name and email match - name_last_email: Last name and email match - phone_only: Phone number match - email_only: Email match, - phone_email: Phone number and email match - phone_hash: Phone number hash match - email_hash: Email hash match - address: Person at address Enum: `no_match`, `name_dob`, `full_name_exact`, `first_name_initial`, `last_name`, `similar_last_name`, `name_last_phone`, `name_phone`, `name_initial_phone`, `name_email`, `name_initial_email`, `name_last_email`, `phone_only`, `email_only`, `phone_email`, `phone_hash`, `email_hash`, `address` Example: `full_name_exact` |
| `match_person.first_name` | string | The first name of the individual Example: `Jane` |
| `match_person.middle_name` | string | The middle name of the individual Example: `Sarah` |
| `match_person.last_name` | string | The last name of the individual Example: `Smith` |
| `match_person.dob` | string (date) | The date of birth of the individual Example: `1990-08-12` |
| `match_person.gender` | string | The gender of the person Enum: `MALE`, `FEMALE`, `X` Example: `FEMALE` |
| `match_person.judgements` | string | Count of any judgements associated with the person (if available) Example: `1` |
| `match_person.business` | string | List of any ABN records possibly associated with the person Example: `ABN 12345678901,ABN 9876432109` |
| `match_person.deceased` | string or null | The deceased status of the person: - Y: The person is recorded as deceased Enum: `Y` |
| `additional_address` | array of objects | Additional address associated with the record. |
| `additional_address[].address_id` | string | The unique identifier for the address Example: `ABCDE123456789` |
| `additional_address[].street_address` | string | The street/postal address component (Address line 1) Example: `UNIT 1/12A SAMPLE STREET` |
| `additional_address[].suburb` | string | The suburb component of the address Example: `SAMPLEVILLE` |
| `additional_address[].state` | string | The state from the address (2 or 3 letter abbreviation, upper case) Enum: `ACT`, `NSW`, `NT`, `QLD`, `SA`, `TAS`, `VIC`, `WA` Example: `VIC` |
| `additional_address[].postcode` | string | The 4 digit postcode of the address Example: `3999` |
| `additional_address[].last_sale_date` | string (date|blank) | Date property was last for sale YYYY-MM-DD (if available) Example: `2019-01-01` |
| `additional_address[].last_rental_date` | string (date|blank) | Date property was last for rent YYYY-MM-DD (if available) Example: `2022-03-15` |
| `additional_address[].demographic_irsad` | string | The IRSD (Index of Relative Socio-economic Advantage and Disadvantage) for the address Example: `6` |
| `additional_address[].demographic_ier` | string | The IER (Index of Education and Occupation) for the address Example: `5` |
| `additional_address[].demographic_ieo` | string | The IEO (Index of Economic Resources) for the address Example: `4` |
| `phones` | array | Additional phone numbers for this record. |
| `emails` | array | Additional email addresses for this record. |
| `court_records` | array of objects | Court records associated with the person. The records are included based on the name and state appearing in public court records, and must not be taken to directly represent the person from this search record. Organisations must make their own enquiries as to the accuracy and appropriate use of this information. |
| `court_records[].fullname` | string | The full name of the person Example: `SMITH, JOHN ANDREW` |
| `court_records[].date` | string (date) | The date of the court record Example: `2022-03-15` |
| `court_records[].court` | string | The court where the record was found Example: `MAGISTRATES COURT` |
| `court_records[].location` | string | The location of the court Example: `SYDNEY` |
| `court_records[].state` | string | The state of the court Enum: `ACT`, `NSW`, `NT`, `QLD`, `SA`, `TAS`, `VIC`, `WA` Example: `NSW` |
| `court_records[].case_no` | string | The case number of the court record Example: `123456789` |
| `court_records[].listing` | string | The listing of the court record Enum: `civil`, `criminal` Example: `civil` |
| `court_records[].case_title` | string | The title of the court case Example: `SMITH V JONES` |
| `court_records[].listing_type` | string | The type of listing Enum: `civil`, `criminal` Example: `civil` |
| `court_records[].additional_info` | string | Additional information about the court record Example: `Defence To Claim, Vehicle Property Damage (Other)` |
| `social_records` | array of objects | Social records associated with the emails or phone records. |
| `social_records[].social_reference` | string | The email address or phone number to which this social profile is linked Example: `person@example.com` |
| `social_records[].social_detail` | object |  |
| `social_records[].social_detail.person` | array of objects | The social person record |
| `social_records[].social_detail.person[].name_combined` | string | The combined name of the person Example: `John Andrew Smith` |
| `social_records[].social_detail.person[].name_first` | string | The first name of the person Example: `John` |
| `social_records[].social_detail.person[].name_middle` | string | The middle name of the person Example: `Andrew` |
| `social_records[].social_detail.person[].name_last` | string | The last name of the person Example: `Smith` |
| `social_records[].social_detail.person[].gender` | string | The gender of the person Example: `male` |
| `social_records[].social_detail.person[].dob` | string | The date (or year) of birth of the person Example: `1990` |
| `social_records[].social_detail.location` | string | The location of the social profile Example: `Queensland, Australia` |
| `social_records[].social_detail.employment` | array of objects |  |
| `social_records[].social_detail.employment[].company` | string | The company name Example: `Example Company` |
| `social_records[].social_detail.employment[].title` | string | The title at the company Example: `CEO` |
| `social_records[].social_detail.employment_history` | array of objects |  |
| `social_records[].social_detail.employment_history[].company` | string | The company name Example: `Example Company` |
| `social_records[].social_detail.employment_history[].title` | string | The title at the company Example: `CEO` |
| `social_records[].social_detail.employment_history[].date_start` | string (date) | The start date of the employment Example: `2010-01-01` |
| `social_records[].social_detail.employment_history[].date_end` | string (date) | The end date of the employment Example: `2022-03-15` |
| `social_records[].social_detail.emails` | array of strings | The email addresses associated with the person |
| `social_records[].social_detail.phones` | array of strings | The phone numbers associated with the person |
| `social_records[].social_detail.skills` | array of strings | The skills associated with the person |
| `social_records[].social_detail.interests` | array of strings | The interests associated with the person |
| `social_records[].social_detail.education` | array of objects | The education associated with the person |
| `social_records[].social_detail.education[].school` | string | The institution name Example: `Example University` |
| `social_records[].social_detail.education[].type` | string | The type of institution Example: `post-secondary institution` |
| `social_records[].social_detail.education[].url` | string | The URL of the institution Example: `sample.edu.au` |
| `social_records[].social_detail.education[].studies` | array | The studies undertaken |
| `social_records[].social_detail.education[].date_start` | string (date) | The start date of the education Example: `2010-01-01` |
| `social_records[].social_detail.education[].date_end` | string (date) | The end date of the education Example: `2014-12-31` |
| `social_records[].social_detail.socials` | array of objects | Other social profiles associated with the person |
| `social_records[].social_detail.socials[].url` | string | The URL of the social profile Example: `https://www.facebook.com/person` |
| `social_records[].social_detail.socials[].network` | string | The social network of the profile Example: `Facebook` |
| `social_records[].social_detail.socials[].username` | string | The username of the social profile Example: `person.12345` |

**Sample response**

```json
{
    "message": "Ok",
    "api_reference": "fe4291ca-d831-4760-96df-c9cb03b3cd95",
    "supplied_address": [
        {
            "match_result": "address_match",
            "address_id": "ABCDE123456789",
            "street_address": "UNIT 1/12A SAMPLE STREET",
            "suburb": "SAMPLEVILLE",
            "state": "VIC",
            "postcode": "3999",
            "last_sale_date": "2019-01-01",
            "last_rental_date": "2022-03-15",
            "demographic_irsad": "6",
            "demographic_ier": "5",
            "demographic_ieo": "4"
        }
    ],
    "match_person": {
        "match_result": "full_name_exact",
        "first_name": "Jane",
        "middle_name": "Sarah",
        "last_name": "Smith",
        "dob": "1990-08-12",
        "gender": "FEMALE",
        "judgements": "1",
        "business": "ABN 12345678901,ABN 9876432109",
        "deceased": "Y"
    },
    "additional_address": [
        {
            "address_id": "ABCDE123456789",
            "street_address": "UNIT 1/12A SAMPLE STREET",
            "suburb": "SAMPLEVILLE",
            "state": "VIC",
            "postcode": "3999",
            "last_sale_date": "2019-01-01",
            "last_rental_date": "2022-03-15",
            "demographic_irsad": "6",
            "demographic_ier": "5",
            "demographic_ieo": "4"
        }
    ],
    "phones": [
        "0299995000",
        "0299995001"
    ],
    "emails": [
        "person@example.com",
        "person@example.edu"
    ],
    "court_records": [
        {
            "fullname": "SMITH, JOHN ANDREW",
            "date": "2022-03-15",
            "court": "MAGISTRATES COURT",
            "location": "SYDNEY",
            "state": "NSW",
            "case_no": "123456789",
            "listing": "civil",
            "case_title": "SMITH V JONES",
            "listing_type": "civil",
            "additional_info": "Defence To Claim, Vehicle Property Damage (Other)"
        }
    ],
    "social_records": [
        {
            "social_reference": "person@example.com",
            "social_detail": {
                "person": [
                    {
                        "name_combined": "John Andrew Smith",
                        "name_first": "John",
                        "name_middle": "Andrew",
                        "name_last": "Smith",
                        "gender": "male",
                        "dob": "1990"
                    }
                ],
                "location": "Queensland, Australia",
                "employment": [
                    {
                        "company": "Example Company",
                        "title": "CEO"
                    }
                ],
                "employment_history": [
                    {
                        "company": "Example Company",
                        "title": "CEO",
                        "date_start": "2010-01-01",
                        "date_end": "2022-03-15"
                    }
                ],
                "emails": [
                    "person@example.com",
                    "person@example.edu"
                ],
                "phones": [
                    "0299995000",
                    "0299995001"
                ],
                "skills": [
                    "Python",
                    "Java"
                ],
                "interests": [
                    "Gardening",
                    "Cooking"
                ],
                "education": [
                    {
                        "school": "Example University",
                        "type": "post-secondary institution",
                        "url": "sample.edu.au",
                        "studies": [
                            "mathematics"
                        ],
                        "date_start": "2010-01-01",
                        "date_end": "2014-12-31"
                    }
                ],
                "socials": [
                    {
                        "url": "https://www.facebook.com/person",
                        "network": "Facebook",
                        "username": "person.12345"
                    }
                ]
            }
        }
    ]
}
```

Standard error responses: 400, 401, 402, 403, 429, 5XX (see [Common error responses](/docs/reference/general/common-error-responses.md))

