Import Contacts to Lawpractica

The Lawpractica Contact Import API allows for the efficient importation of existing contact data into Lawpractica. This functionality is specifically designed for web developers looking to integrate or migrate contact information into Lawpractica seamlessly.
Authentication Method
The API uses a Bearer token (API Key) for authentication.
Obtaining Credentials
Credentials can be obtained from the Lawpractica application under the Integration tab in the Manage Settings form. Look for the Security Key value provided in the data exchange section.
Contact Import Endpoint
  • URL:
  • Method: POST
  • Description: Imports contact data into Lawpractica.
  • Request Headers:
    • Authorization: Bearer token (API key)
    • sd: Name of the user's subdomain (instance of the user application)
Request Body
Request body contains the requestor's information and an array of contacts to be imported.

Request body schema (JSON Schema)
{
    "UserPrefix": "string",
    "UserFullName": "string",
    "UserEmail": "string",
    "ProfileCode": "string",
    "IsSendNotification": "integer",
    "NotificationEmail": "string",
    "NotificationCustomMessage": "string",
    "Contacts": [
    { 
        "ContactPrefix": "string",
        "ContactFileNumber": "string",
        "ContactFirstName": "string",
        "ContactLastName": "string",
        "ContactCompany": "string",
        "ContactType": "string",
        "ContactRole": "string",
        "ContactAddress1": "string",
        "ContactAddress2": "string",
        "ContactCity": "string",
        "ContactProvinceCode": "string",
        "ContactPostalCode": "string",
        "ContactCountryCode": "string",
        "ContactHomePhone": "string",
        "ContactWorkPhone": "string",
        "ContactCell": "string",
        "ContactFax": "string",
        "ContactEmail": "string",
        "ContactUI": "string",
        "ContactUpdDate": "string (ISO 8601 format)"
    }
  ]
}
    
Response Body
Response body contains a summary of the import operation and details of each contact processed.
  • Description:   A summary of the import operation, including the Import Request ID and the number of contacts successfully imported.
    TotalRecords: Total number of contact records processed.
    TotalInserted: Number of new contact records inserted during the import.
    TotalUpdated: Number of contact records updated during the import.
    TotalErrors:    Number of errors encountered during the import process.
    Contacts:         An array containing details of each contact processed.
    • id: Unique identifier of the contact record.
      >Other contact attributes.

      >importNotes: Descriptions of any errors encountered while importing the contact data.
      >importStatus: Indicates the status of the import operation for the contact record. It has the format "I-[id]" if the record was inserted, "U-[id]" if it was updated, where "id" is the record ID.


  • Response body schema (JSON Schema)
    {
        "RequestID": "integer",
        "TotalRecords": "integer",
        "TotalUpdated": "integer",
        "TotalInserted": "integer",
        "TotalErrors": "integer",
        "Contacts": [
        {
            "ID": "string",
            "ContactPrefix": "string",
            "ContactFileNumber": "string",
            "ContactFirstName": "string",
            "ContactLastName": "string",
            "ContactCompany": "string",
            "ContactType": "string",
            "ContactRole": "string",
            "ContactAddress1": "string",
            "ContactAddress2": "string",
            "ContactCity": "string",
            "ContactProvinceCode": "string",
            "ContactPostalCode": "string",
            "ContactCountryCode": "string",
            "ContactHomePhone": "string",
            "ContactWorkPhone": "string",
            "ContactCell": "string",
            "ContactFax": "string",
            "ContactEmail": "string",
            "ContactUI": "string",
            "ContactUpdDate": "string (ISO 8601 format)",
            "ImportNotes": "string",
            "ImportStatus": "string"                                                    
        }
      ]
    }
    
    • 400 Invalid JSON Format: The provided JSON information is invalid.
    • 411 User information cannot be empty: User information required for the operation is missing.
    • 411 API Key cannot be empty: API key required for authentication is missing.
    • 411 Subdomain cannot be empty: Subdomain information required for the operation is missing.
    • 411 Notification email cannot be empty (if IsSendNotification = 1): Notification email is required when notification is enabled.
    • 422 Invalid notification email format (if IsSendNotification=1): The format of the notification email is invalid.
    • 422 Invalid token: The provided token is invalid.
    • 500 Exception: An internal server error occurred.

    
    
    
    
    
    

    
    
    
        crossDomain: true,
        contentType: 'application/json; charset=utf-8',
        dataType: 'json',
        data: JSON.stringify(Contacts),
        headers: {
            'Authorization': 'Bearer ' + apiKey,
            'sd:' + subDomain,
            'Content-Type': 'application/json'
        }
    

    
    
    var  Contacts =
        {
        "UserPrefix": "BS",
        "UserFullName": "Brian Smith",
        "UserEmail": "info@lawpractica.com",
        "ProfileCode": "LP-DE",
        "IsSendNotification": "0",
        "NotificationEmail": "notification@example.com",
        "NotificationCustomMessage": "This is a custom notification message",
        "Contacts": [
        {
            "ContactPrefix": "Mr",
            "ContactFileNumber": "CON-2024-001",
            "ContactFirstName": "Jane",
            "ContactLastName": "Smith",
            "ContactCompany": null,
            "ContactType": "Client",
            "ContactRole": "CRole",
            "ContactAddress1": "123 Main St",
            "ContactAddress2": null,
            "ContactCity": "Cityville",
            "ContactProvinceCode": "ON",
            "ContactPostalCode": "A1B 2C3",
            "ContactCountryCode": "CA",
            "ContactHomePhone": "(555) 555-5555",
            "ContactWorkPhone": null,
            "ContactCell": null,
            "ContactFax": null,
            "ContactEmail": "jane.smith@example.com",
            "ContactUI": "JNS123",
            "ContactUpdDate": "2024-01-28T14:21:00"
        },
        {
            "ContactPrefix": "JD",
            "ContactFileNumber": null,
            "ContactFirstName": "John",
            "ContactLastName": "Doe",
            "ContactCompany": "ABC Law Firm",
            "ContactType": "Lawyer",
            "ContactRole": "CRole",
            "ContactAddress1": "456 Elm St",
            "ContactAddress2": null,
            "ContactCity": "Townville",
            "ContactProvinceCode": "BC",
            "ContactPostalCode": "K2L 3M4",
            "ContactCountryCode": "CA",
            "ContactHomePhone": null,
            "ContactWorkPhone": "(666) 666-6666",
            "ContactCell": null,
            "ContactFax": null,
            "ContactEmail": "john.doe@lawfirm.com",
            "ContactUI": "JND456",
            "ContactUpdDate": null
        }
        ]
        }
    
    

    
    
    
    200: function  () {
        console.log("200 - Success");
        },
    
    //when any of info not supplied (without json object(ajax) either in URL parameters)
    400: function (request, status, error) { alert(error); },
    //when any of supplied info is empty
    411: function (request, status, error) { alert(error); },
    //when the provided info is not invalid
    422: function (request, status, error) { alert(error); }, 500: function (request, status, error) { alert(error); }

    https://
    lawpractica.com

    Notes: Econveyance user information who is logged in and making API requests.