Contacts API
Manage people and organizations involved in property management — real estate agents, contractors, insurance agents, legal advisors, and other professional contacts. For tenants use Lessees, for property owners use Owners.
Quick Example
Code
Common Workflows
Add a property management company
POST /api/contacts— Create withtype_contact: "Company"andcategory: "Property Manager"- Add professional card details (carte professionnelle) for regulatory compliance
GET /api/contacts/{id}/entities— View associated properties and leases
Find contacts by role
GET /api/contacts/roles— List available rolesGET /api/contacts/category/Maintenance— Get all maintenance contactsGET /api/contacts?search=dupont&city=Paris— Search with filters
Overview
The Contacts API provides comprehensive contact management with support for:
- Personal and Business Contacts: Both individual and company contacts
- Professional Information: Special fields for property management professionals
- Banking Details: IBAN, SWIFT codes for payment processing
- Address Management: Complete address information
- Contact Categorization: Flexible categorization and search capabilities
Authentication
All endpoints require authentication with the following permissions:
- PropertiesRead: For GET operations
- PropertiesWrite: For POST and PUT operations
- PropertiesDelete: For DELETE operations
Base URL
All contact endpoints are prefixed with /api/contacts
Core Contact Operations
List Contacts
GET /api/contacts
Retrieve all contacts with optional pagination and filtering.
Query Parameters:
page(integer, optional): Page number (default: 1)per_page(integer, optional): Items per page (default: 10)sort_by(string, optional): Sort field (default: "created_at")sort_order(string, optional): "asc" or "desc" (default: "desc")type_contact(string, optional): Filter by contact typecategory(string, optional): Filter by categorysearch_term(string, optional): Search across name and email fieldscity(string, optional): Filter by citycountry(string, optional): Filter by country
Response:
Code
Create Contact
POST /api/contacts
Create a new contact.
Request Body:
Code
Response: 201 Created
Returns the created contact object with generated ID and timestamps.
Get Contact
GET /api/contacts/{id}
Retrieve a specific contact by ID.
Path Parameters:
id(UUID): The contact ID
Response: 200 OK
Returns the contact object.
Update Contact
PUT /api/contacts/{id}
Update an existing contact. All fields are optional in update requests.
Path Parameters:
id(UUID): The contact ID
Request Body:
Code
Response: 200 OK
Returns the updated contact object.
Delete Contact
DELETE /api/contacts/{id}
Delete a contact.
Path Parameters:
id(UUID): The contact ID
Response: 204 No Content
Contact Search and Filtering
Search Contacts
GET /api/contacts/search
Advanced contact search with multiple criteria.
Query Parameters:
- All parameters from the list endpoint
created_after(ISO 8601 date): Filter contacts created after datecreated_before(ISO 8601 date): Filter contacts created before date
Response: 200 OK
Returns paginated search results.
Filter Contacts
POST /api/contacts/filter
Filter contacts using a POST request for complex criteria.
Request Body:
Code
Response: 200 OK
Returns filtered contact list.
Get Contacts by Category
GET /api/contacts/category/{category}
Retrieve contacts by specific category.
Path Parameters:
category(string): The contact category
Response: 200 OK
Returns contacts in the specified category.
Get Contacts by Type
GET /api/contacts/type/{type}
Retrieve contacts by contact type.
Path Parameters:
type(string): The contact type (Individual, Company)
Response: 200 OK
Returns contacts of the specified type.
Professional Contact Management
Get Contact Roles
GET /api/contacts/roles
Retrieve all available contact roles in the system.
Response: 200 OK
Code
Get Contacts by Role
GET /api/contacts/{id}/role/{role}
Retrieve contacts that have a specific role.
Path Parameters:
id(UUID): The contact IDrole(string): The role name
Response: 200 OK
Returns contacts with the specified role.
Get Contact Entities
GET /api/contacts/{id}/entities
Retrieve all entities (properties, leases) associated with a contact.
Path Parameters:
id(UUID): The contact ID
Response: 200 OK
Code
Bulk Operations
Create Multiple Contacts
POST /api/contacts/bulk
Create multiple contacts in a single request.
Request Body:
Code
Response: 201 Created
Returns array of created contact objects.
Delete Multiple Contacts
DELETE /api/contacts/bulk
Delete multiple contacts by their IDs.
Request Body:
Code
Response: 204 No Content
Professional Fields
For professional contacts (property managers, agents, etc.), additional fields are available:
Professional Information
professional_activity: Type of professional activityprofessional_card_number: Professional license numberprofessional_card_issuing_location: Where the card was issuedprofessional_card_issuing_date: Issue dateprofessional_card_expiry_date: Expiration dateprofessional_registration_number: Registration numberprofessional_guarantor_id: ID of professional guarantorprofessional_insurance_company: Insurance company nameprofessional_insurance_policy: Policy numberprofessional_status: Professional status enum
ProfessionalStatus Enum
Active: Currently active professionalInactive: Inactive professionalSuspended: Temporarily suspendedRetired: Retired professional
Data Types
Contact Types
Individual: Personal contactCompany: Business/organization contact
Common Categories
Tenant: Property tenantOwner: Property ownerProperty Manager: Property management professionalContractor: Service contractorLegal Advisor: Legal professionalInsurance Agent: Insurance professionalMaintenance: Maintenance personnel
Error Responses
Validation Errors
400 Bad Request
Code
Not Found
404 Not Found
Code
Conflict
409 Conflict
Code
Common Use Cases
Creating a New Tenant
- Create contact with
POST /api/contacts - Set
type_contactto "Individual" andcategoryto "Tenant" - Include complete address and banking information
- Associate with lease through lease endpoints
Managing Property Manager Contacts
- Create contact with professional fields populated
- Set
professional_statusto "Active" - Include professional credentials and insurance information
- Use the contact in property assignments
Contact Search and Discovery
- Use
GET /api/contacts/searchwith search terms - Filter by category or type for specific contact groups
- Use city/country filters for location-based searches
Bulk Import of Contacts
- Prepare contact data in required format
- Use
POST /api/contacts/bulkfor batch creation - Handle validation errors for individual contacts
Notes
- Email addresses must be unique across all contacts
- Mobile numbers are required for all contacts
- Professional fields are only relevant for business contacts
- Color codes should be valid hex colors (7 characters max)
- IBAN validation follows international standards
- All date fields use ISO 8601 format
- Address information is required for all contacts