# Contacts

Represents the Contacts entity within the PMS CRM module, encompassing information about individuals or organisations associated with properties. This entity includes details such as names, contact information (e.g., phone numbers, email addresses), roles, and relationship to specific properties or bookings. It is used for managing customer relationships, tracking communication history, and facilitating operations such as guest management or corporate account handling.

## Returns a list of contacts

 - [GET /api/v3/contacts](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/retrievecontacts.md): Retrieve a paginated list of contacts from the CRM module of the PMS. This endpoint supports optional query parameters to filter the results, including email address, first name, last name, telephone number, and account ID. If no filters are provided, the endpoint returns all available contacts in the system. The response includes a paginated list of contact records with key details, such as names and contact information, making it suitable for displaying contact directories or integrating with external systems. Pagination parameters can also be used to control the size and order of the result set.

## Create a contact

 - [POST /api/v3/contacts](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/createcontact.md): Create a new contact record in the CRM module of the PMS. This endpoint accepts a JSON payload containing the contact's details, such as name, contact information (e.g., email, phone), role, and any related metadata. The authenticated user's details are used to associate the creation with an authorised account. Upon successful creation, the response returns the newly created contact's data, including its unique identifier. This endpoint is essential for adding new individuals or organisations to the contact database for guest management or operational purposes.

## Merge two contacts

 - [POST /api/v3/contacts/merge](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/mergecontacts.md): Merge the secondary contact into the primary contact. Related records (e.g., activities, bookings, notes, attachments, keys) are reassigned to the primary contact. Noop if any of the contacts are null. Returns a success flag with a human-readable message.

## Retrieve contact using contact ID

 - [GET /api/v3/contacts/{id}](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/getcontactbyid.md): Fetch detailed information about a specific contact in the CRM module of the PMS using their unique contact ID. The response includes key details such as the contact's name, contact information (e.g., email, phone), role, associated organisation, and any linked properties or bookings. This endpoint is essential for accessing and managing individual contact records for guest management, corporate accounts, or operational purposes.

## Update a contact record

 - [PUT /api/v3/contacts/{id}](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/updatecontact.md): Update an existing contact record in the CRM module of the PMS. This endpoint requires the contact's unique ID as a path variable and a JSON payload containing the updated contact details, such as name, contact information, role, or related metadata. The system verifies the existence of the contact and applies locking mechanisms to prevent concurrent modifications during the update process. Upon successful completion, the updated contact record is saved, and the response includes the latest contact details. This endpoint is essential for maintaining up-to-date contact information and ensuring data integrity in the CRM module.

## deleteContactById

 - [DELETE /api/v3/contacts/{id}](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/deletecontactbyid.md)

## Add an address to a contact

 - [POST /api/v3/contacts/{id}/addresses](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/addaddress.md): Creates a new address and associates it with the specified contact.

## Update an address for a contact

 - [PUT /api/v3/contacts/{id}/addresses/{addressId}](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/updateaddress.md): Updates an existing address associated with the specified contact.

## Delete an address from a contact

 - [DELETE /api/v3/contacts/{id}/addresses/{addressId}](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/deleteaddress.md)

## Set an address as Primary

 - [PUT /api/v3/contacts/{id}/addresses/{addressId}/primary](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/setprimaryaddress.md)

## Get custom fields for a contact

 - [GET /api/v3/contacts/{id}/customFields](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/getcustomfieldsforcontact.md): Retrieve all custom fields associated with a specific contact record in the CRM module of the PMS. The response includes a list of custom fields, each containing details such as field name, type, and value. This endpoint is useful for accessing additional information stored in custom fields that are not part of the standard contact attributes.

## Add an email address to a contact

 - [POST /api/v3/contacts/{id}/emailAddresses](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/addemailaddress.md): Creates a new email address and associates it with the specified contact.

## Update an email address for a contact

 - [PUT /api/v3/contacts/{id}/emailAddresses/{emailId}](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/updateemail.md): Updates an existing email address associated with the specified contact.

## Delete an email address from a contact

 - [DELETE /api/v3/contacts/{id}/emailAddresses/{emailId}](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/deleteemail.md)

## Set an email as Primary

 - [PUT /api/v3/contacts/{id}/emailAddresses/{emailId}/primary](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/setprimaryemail.md)

## Get all or a specific note from a contact record

 - [GET /api/v3/contacts/{id}/notes](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/getcontactnotes.md): Retrieve all or a specified note associated with a specific contact record in the CRM module of the PMS. The response includes a list of notes, each containing details such as the note's content, creation date, author, and any associated tags or categories. This endpoint is useful for tracking communication history, documenting interactions, and maintaining a comprehensive record of engagements with contacts.

## Record a note against a specified contact

 - [POST /api/v3/contacts/{id}/notes](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/createnote.md): Record a note against a specified contact within the Property Management System (PMS). This endpoint allows you to add comments, updates, or additional information related to a booking. Notes provide detailed context and history for the booking, ensuring comprehensive tracking and management of reservations.

## Add a telephone number to a contact

 - [POST /api/v3/contacts/{id}/telephones](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/addtelephonenumber.md): Creates a new telephone number and associates it with the specified contact.

## Update a telephone number for a contact

 - [PUT /api/v3/contacts/{id}/telephones/{phoneId}](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/updatetelephone.md): Updates an existing telephone number associated with the specified contact.

## Delete a telephone number from a contact

 - [DELETE /api/v3/contacts/{id}/telephones/{phoneId}](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/deletetelephone.md)

## Set a telephone number as Primary

 - [PUT /api/v3/contacts/{id}/telephones/{phoneId}/primary](https://apidocs.resharmonics.com/apis/resharmonics-pms/contacts/setprimarytelephone.md)

