Updates

As we continue our development of SecurityTrax, updates and some changes are required.

New

  BULK EDIT REPORTS
/customers

We have added the ability to detect duplicate records when creating leads and customers.

To use this feature you can include the attribute "check_for_duplicates": true in the "meta":{} block of the JSON body in your POST request.

Here is an example JSON body for creating a lead.

{
    "data": {
        "meta": {
            "check_for_duplicates": true
        },
        "attributes": {
            "fname": "John",
            "lname": "Doe",
            "address1": "1712 S East Bay Blvd",
            "primary_phone": "1111111111",
            "city": "Provo",
            "record_type": "lead"
        },
        "relationships": {
            "lead_company": {
                "data": {
                    "type": "lead_companies",
                    "id": "1"
                }
            }
        },
        "type": "customers"
    }
}

When including this attribute the API will search the name, address and phone number attributes of existing records for matches. If matches are found, the API will return an error along with a list of records with matching data.

Here is an example of the JSON response when duplicates are detected.

{
    "errors": [
        {
            "detail": "{\"records\":[{\"id\":1749,\"name\":\"Walter White\",\"record_type\":\"customer\",\"address\":\"1712 S East Bay Blvd Ste E310 Provo, UT 84606\",\"phone\":\"8015049200\",\"matches\":[\"Address Match: 1712 S East Bay Blvd Ste E310 Provo\"]},{\"id\":1705,\"name\":\"John Doe\",\"record_type\":\"customer\",\"address\":\"123 Anytown, UT \",\"phone\":\"8015049200\",\"matches\":[\"Name Match: Doe, John\"]}]}",
            "status": 422,
            "code": 50004,
            "line": 169,
            "location": "Customer"
        }
    ]
}
*Note, when "check_for_duplicates": true is included in the request and duplicates are found, the record will not be created. To create duplicate records set "check_for_duplicates": false.