Contacts API

External integration

Contacts are the primary record type for managing individuals on the Altafid platform. The API supports standard CRUD operations, filtered list views, optional compliance payloads, associations to organisations and other contacts, and client-portal credential flows.

Access model: most read and write operations are available to tenant, partner, and system roles. Deletion and some destructive compliance operations require elevated permissions.

List and search endpoints

EndpointPurpose
GET /api/contactsPaginated list. Pass includeCustomFields=true to include custom field values.
GET /api/contacts/{contactUuid}Single contact by UUID.
GET /api/contacts/search?searchTerm=Name or email search (accent-insensitive).
GET /api/contacts/type/{contactType}List contacts by type (ACTIVE or SUBSCRIBER).
GET /api/contacts/firm/{firmType}/{firmUuid}Contacts under a firm, with optional searchTerm.
GET /api/contacts/manager/{managerType}/{managerUuid}Contacts under a manager.
GET /api/contacts/{contactUuid}/householdsHouseholds linked to a contact.
GET /api/contacts/{contactUuid}/existsBoolean existence check.
GET /api/contacts/stats/count-by-type/{contactType}Count contacts by type.
curl "https://api.altafid.dev.altafid.net/api/contacts/search?searchTerm=jane&page=0&size=20" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "x-tenant-uuid: YOUR_TENANT_UUID" \
  -H "x-user-email: YOUR_EMAIL" \
  -H "x-user-id: YOUR_USER_ID" \
  -H "x-user-type: TENANT_STAFF"

Create and update contacts

POST/api/contacts accepts core identity, firm, and communication fields and can optionally include compliance and association data.

{
  "firstName": "Jane",
  "paternalLastName": "Doe",
  "contactType": "ACTIVE",
  "firmId": "T019A16FF372A70B5A9307B00CE85E4DA",
  "firmType": "TENANT",
  "preferredEmail": "jane.doe@example.com",
  "primaryEmail": "jane.doe@example.com",
  "preferredContactLanguage": "ENGLISH",
  "preferredPhoneNumber": {
    "countryCode": "+1",
    "number": "5551234567"
  },
  "stage": "Prospect",
  "segment": "Retail",
  "contactSource": "Referral"
}
Required on createNotes
firstNameMax 100 characters.
paternalLastNameMax 100 characters.
contactTypeACTIVE or SUBSCRIBER. See enum reference.
firmIdUUID of the target tenant, partner firm, or organisation.
firmTypeTENANT, PARTNER, or ORGANISATION. See enum reference.
preferredContactLanguageENGLISH or SPANISH. See enum reference.

PUT/api/contacts/{contactUuid} is partial-update oriented. Send only the fields you intend to change — null or omitted values leave existing data unchanged.

Compliance endpoints

The compliance profile stores KYC data, financial profile information, and identity documentation for a contact.

EndpointPurpose
GET /api/contacts/{contactUuid}/complianceFetch compliance profile.
PUT /api/contacts/{contactUuid}/complianceCreate or update compliance data.
DELETE /api/contacts/{contactUuid}/complianceDelete compliance data.
{
  "primaryEmail": "jane.doe@example.com",
  "phoneNumber": {
    "countryCode": "+1",
    "number": "5551234567"
  },
  "gender": "FEMALE",
  "dateOfBirth": "1990-01-15",
  "primaryCountryOfCitizenship": "USA",
  "countryOfBirth": "USA",
  "maritalStatus": "SINGLE",
  "preferredContactLanguage": "ENGLISH",
  "liquidNetWorth": 100000.00,
  "annualIncome": 85000.00,
  "identityDocuments": []
}

The compliance payload also supports legal addresses, employment history, identity documents (see identityType enum below), PEP entries, and additional disclaimer fields.

Association endpoints

Associations link a contact to other contacts (e.g. spouse, child) or to organisations (e.g. employer, beneficial owner). Associations are stored as a list and can be replaced in full or added incrementally.

EndpointPurpose
GET /api/contacts/{contactUuid}/associationsRetrieve current associations.
PUT /api/contacts/{contactUuid}/associations?replace=falseAdd or replace association data.
DELETE /api/contacts/{contactUuid}/associationsDelete all associations.
DELETE /api/contacts/{contactUuid}/associations/{associationUuid}Delete one association.
[
  {
    "associatedContacts": [
      {
        "contactUuid": "C019B9D0FD0E5772F9E8ED189895D40C4",
        "role": "SPOUSE"
      }
    ],
    "associatedOrganisations": [],
    "externalContacts": []
  }
]

Client portal credential flow

Contacts can be given access to the Altafid client portal. The credential flow must be completed in sequence: initialise, then create the password.

EndpointPurposeResponse
POST /api/contacts/{contactUuid}/credentials/initInitialise credentials for a contact.200 with updated contact, or 409 if already initialised.
PUT /api/contacts/{contactUuid}/credentials/createCreate password credentials.204 No Content
POST /api/contacts/{contactUuid}/credentials/resetStart password reset flow.202 Accepted
GET /api/contacts/client-portal/access/{contactUuid}Direct portal access helper (deprecated).Available but marked deprecated.

V2 filtering

POST/api/v2/contacts supports complex filter logic with optional minimal custom field enrichment for grid rendering.

{
  "filters": [
    { "field": "contactType", "operator": "equals", "value": "ACTIVE" },
    { "field": "stageName", "operator": "in", "values": ["Prospect", "Client"] }
  ],
  "page": 0,
  "size": 20,
  "sort": ["createdAt,desc"]
}

Use POST /api/v2/contacts/filter-values to retrieve distinct values for a field within the current tenant scope.

Enum reference

The following fields accept a fixed set of values defined by the platform. Pass the exact string value shown.

contactType

Indicates whether the person is an active client or a prospect.

ACTIVE SUBSCRIBER

gender

MALE FEMALE OTHER

maritalStatus

MARRIED SINGLE DIVORCED WIDOWED

preferredContactLanguage

ENGLISH SPANISH

contactMeans

The preferred communication channel.

EMAIL PHONE MESSAGE

contactPreference

CALL EMAIL SMS

firmType

Indicates which kind of entity the contact belongs to.

TENANT PARTNER ORGANISATION

identityType (for identity documents)

CHILE_RUT PASSPORT NATIONAL_ID US_EIN DRIVING_LICENSE UK_COMPANY_NUMBER BVI_COMPANY_NUMBER

addressType

HOME WORK OTHER

contactAddressType

Indicates the compliance purpose of an address record.

SALES COMPLIANCE

Dynamic fields

The following contact fields are configured per-tenant and their valid values must be retrieved from the platform at runtime. See Dynamic configuration lookups for the full list of endpoints.

FieldLookup endpoint
stageGET /api/core/platformconfigs/v1/contacts/stages
contactSourceGET /api/core/platformconfigs/v1/contacts/sources
segmentGET /api/core/platformconfigs/v1/contacts/segments
country fieldsGET /api/core/geo/v1/countries
phone country codesGET /api/core/geo/v1/phone-codes