Skip to content

Contacts

The Contact object represents an individual contact in the EstatePrime system. This object is returned in JSON format, containing all available values for a contact.

Object

The Contact object represents an individual contact in the EstatePrime system. Below are the fields included in a Contact object:

Example

json
{
  "id": 1489,
  "first_name": "John",
  "last_name": "Doe",
  "source_id": 2,
  "is_lead": false,
  "is_company": false,
  "company_name": null,
  "phones": [
    {
      "type": "mobile",
      "number": "1234567890",
      "notes": "Personal phone number"
    },
    {
      "type": "work",
      "number": "0987654321",
      "notes": "Work phone number"
    }
  ],
  "emails": [
    {
      "type": "personal",
      "email_address": "[email protected]",
      "notes": "Primary email"
    },
    {
      "type": "work",
      "email_address": "[email protected]",
      "notes": "Work email"
    }
  ],
  "notes": "Important client",
  "custom_fields": [
    {
      "custom_field_id": 1,
      "value": "Preferred buyer"
    },
    {
      "custom_field_id": 2,
      "value": "VIP"
    },
    {
      "custom_field_id": 3,
      "value": [2, 3]
    }
  ],
  "contact_details": [
    {
      "first_name": "Adam",
      "last_name": "Simpson",
      "mobile": "+306987411111",
      "email": null,
      "notes": "CEO"
    },
    {
      "first_name": "Diane",
      "last_name": "Blake",
      "mobile": null,
      "email": null,
      "notes": "Marketing assistant"
    }
  ],
  "tags": [1, 4],
  "date_created": "2025-01-15 18:00:05",
  "created_by": 10,
  "users": [2, 5, 7],
  "date_updated": "2025-01-15 18:00:05",
  "date_converted_to_client": null
}
  • id (int): The system id of the contact.
  • first_name (string): The first name of the contact.
  • last_name (string): The last name of the contact.
  • source_id (int): The ID of the source from which the contact originated.
  • is_lead (boolean): Indicates if the contact is a lead.
  • is_company (boolean): Indicates if the contact represents a company.
  • company_name (string, nullable): The company name associated with the contact.
  • phones (array of objects): A list of phone numbers, each object includes:
    • type (string): The type of phone (e.g., mobile, home, work).
    • number (string): The phone number.
    • notes (string): Notes about the phone number.
  • emails (array of objects): A list of email addresses, each object includes:
    • type (string): The type of email (e.g., personal, work).
    • email_address (string): The email address.
    • notes (string): Notes about the email address.
  • notes (string): General notes about the contact.
  • custom_fields (array of objects): A list of custom fields, each object includes:
    • custom_field_id (int): The ID of the custom field.
    • value (string): The value of the custom field.
  • contact_details (array of objects): A list of associated contact details, each object includes:
    • first_name (string): The first name of the associated contact.
    • last_name (string): The last name of the associated contact.
    • mobile (string, nullable): The mobile number of the associated contact.
    • email (string, nullable): The email address of the associated contact.
    • notes (string): Notes about the associated contact.
  • tags (array of integers): A list of tag IDs associated with the contact.
  • date_created (string): The date and time the contact was created in the format YYYY-MM-DD HH:MM:SS.
  • created_by (int): The user ID of the user who created the contact.
  • users (array of integers): A list of user IDs associated with the contact.
  • date_updated (string): The date and time the contact was last updated in the format YYYY-MM-DD HH:MM:SS.
  • date_converted_to_client (string, nullable): The date the contact was converted from a lead to a client, or null if not applicable.

Get contacts

/api/contacts (GET)

Fetch a list of contacts.

Request

  • Method: GET
  • Headers: Include authentication headers as described in the Authentication section.
  • Body: JSON object with the following parameters:
    • page (int): The page number to fetch. Defaults to 1.
    • date_created (object): Filter by creation date range. Must include:
      • min (string): The minimum date in YYYY-MM-DD HH:MM:SS format, or null for no lower limit.
      • max (string): The maximum date in YYYY-MM-DD HH:MM:SS format, or null for no upper limit.

Example Body

json
{
  "page": 1,
  "date_created": {
    "min": "2025-02-24 00:00:00",
    "max": null
  }
}

Response

  • 200 OK: Returns a JSON array of contact objects.

Example Response

json
{
  "status": 200,
  "page": 1,
  "total_pages": 9,
  "results_per_page": 50,
  "total_results": 428,
  "data": [
	{
	  "id": 1489,
	  "first_name": "John",
	  "last_name": "Doe",
	  "source_id": 2,
	  "is_lead": false,
	  "is_company": false,
	  "company_name": null,
	  "phones": [
		{
		  "type": "mobile",
		  "number": "1234567890",
		  "notes": "Personal phone number"
		},
		{
		  "type": "work",
		  "number": "0987654321",
		  "notes": "Work phone number"
		}
	  ],
	  //Rest of the data...
	},
	//Rest of the data...
  ]
}

Get single contact

/api/contacts/{id} (GET)

Get a single contact by its id.

Request

  • Method: GET
  • Headers: Include authentication headers.
  • Path Params: The contact id to be fetched.

Example Response

json
{
  "status": 200,
  "data": {
    "id": 1489,
    "first_name": "John",
    "last_name": "Doe",
    "source_id": 2,
    "is_lead": false,
    "is_company": false,
    "company_name": null,
    "phones": [
	  {
	    "type": "mobile",
	    "number": "1234567890",
	    "notes": "Personal phone number"
	  },
	  {
	    "type": "work",
	    "number": "0987654321",
	    "notes": "Work phone number"
	  }
    ],
	//Rest of the data...
  }
}

Response

  • 200 OK: Returns the JSON object of the contact.

Create contact

/api/contacts (POST)

Create a new contact.

Request

  • Method: POST
  • Headers: Include authentication headers.
  • Body: JSON object with the contact details to be inserted.

Example Body

json
{

  "first_name": "John",
  "last_name": "Doe",
  "source_id": 2,
  "is_lead": false,
  "is_company": false,
  "company_name": null,
  "phones": [
	{
	  "type": "mobile",
	  "number": "1234567890",
	  "notes": "Personal phone number"
	},
	{
	  "type": "work",
	  "number": "0987654321",
	  "notes": "Work phone number"
	}
  ],
  //Rest of the data...
}

Response

  • 200 OK: Returns the created contact ID.

Example Response

json
{
  "status": 200,
  "created_id": 789
}

Delete contact

/api/contacts/{id} (DELETE)

Delete a contact from the system.

Request

  • Method: DELETE
  • Headers: Include authentication headers.
  • Path Params: The contact id to be deleted.

Response

  • 200 OK: Returns a success message.

Example Response

json
{
  "status": 200,
  "deleted_id": 789
}

Get contact sources

/api/contacts/sources (GET)

Fetch the available contact sources.

Request

  • Method: GET
  • Headers: Include authentication headers.

Response

  • 200 OK: Returns a JSON array of available contact sources.

Example Response

json
{
  "status": 200,
  "data": [
    {
	  "id": 1,
	  "name": "Referred by another client",
	},
	{
	  "id": 2,
	  "name": "Social Media",
	},
	{
	  "id": 3,
	  "name": "Company Website",
	}
  ]
}

Get contact tags

/api/contacts/tags (GET)

Fetch the available contact tags.

Request

  • Method: GET
  • Headers: Include authentication headers.

Response

  • 200 OK: Returns a JSON array of available contact tags.

Example Response

json
{
  "status": 200,
  "data": [
    {
	  "id": 1,
	  "name": "VIP client",
	},
	{
	  "id": 2,
	  "name": "Lost",
	}
  ]
}

Get contact custom fields

/api/contacts/custom-fields (GET)

Fetch the available custom fields for contacts.

Request

  • Method: GET
  • Headers: Include authentication headers.

Response

  • 200 OK: Returns a JSON array of available custom fields for contacts.

Example Response

json
{
  "status": 200,
  "data": [
    {
	  "id": 1,
	  "name": "Website",
	  "type": "url"
	},
	{
	  "id": 2,
	  "name": "Bank Accounts",
	  "type": "textarea"
	},
	{
	  "id": 3,
	  "name": "Preferred Contact Methods",
	  "type": "select_multi",
	  "options": [
		{
		  "id": 1,
		  "name": "Phone"
		},
		{
		  "id": 2,
		  "name": "Email"
		}
	  ]
	},
	{
	  "id": 4,
	  "name": "Available Budget",
	  "type": "currency"
	},
	{
	  "id": 5,
	  "name": "Lawyer's Phone",
	  "type": "phone"
	}
  ]
}

Available custom fields types

  • text: Text up to 255 characters.
  • textarea: Text up to 2500 characters.
  • wysiwyg: Text with html format.
  • number: Integer or decimal.
  • formatted_number: Integer or decimal that is formatted. Eg 1,000,000.25.
  • select: Single select with options.
  • select_multi: Multiple select with options.
  • checkbox: Boolean.
  • file: Single file. (As a URL)
  • file_multi: Array of multiple files. (As URLs)
  • image: Single image. (As a URL)
  • image_multi: Array of multiple images. (As URLs)
  • address: Address. (Eg Bellariastraße 6, 1010 Wien, Austria)
  • url: URL.
  • date: Date in YYYY-MM-DD format. (Eg 2025-10-18)
  • datetime: Date in YYYY-MM-DD HH:MM:SS format. (Eg 2025-10-18 18:24:10)
  • currency: Integer or decimal that is formatted like a currency. Eg 1,000,000.25€.
  • user: Application user_id.
  • user_multi: An array of application user_id.
  • contact: Another contact's id.
  • contact_multi: An array with multiple contact ids.

Last updated on May 9th, 2026.