Skip to content

Create contact association

Request

Creates a new Contact Association record. Contact Association resource in the Animal Health Data Store

Security
bearer
Path
siteIdnumberrequired

Site identifier

Bodyapplication/jsonrequired
associatedContactIdstringrequired

Associated/related contact.

Example:"123e4567-e89b-12d3-a456-426614174000"
associationClassstringrequired

Classification of the relationship between the contacts.

Enum:"family""other"
Example:"family"
contactAssociationIdstring

Canonical identifier for this contact association.

Example:"123e4567-e89b-12d3-a456-426614174000"
contactIdstringrequired

Primary contact in the association.

Example:"123e4567-e89b-12d3-a456-426614174000"
extensionsobject

Vendor- or practice-specific extension fields.

isActivebooleanrequired

Whether this association is currently active.

Example:true
associationTypeobject(CodeableConceptDto)required

Directionality/role of this contact in the association (e.g., owner-of, emergency-contact-for).

curl -i -X POST \
  'https://docs.axiomera.com/_mock/apis/animal-health/openapi/site/{siteId}/ahds/v1/contact-association' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "associatedContactId": "123e4567-e89b-12d3-a456-426614174000",
    "associationClass": "family",
    "contactAssociationId": "123e4567-e89b-12d3-a456-426614174000",
    "contactId": "123e4567-e89b-12d3-a456-426614174000",
    "extensions": {},
    "isActive": true,
    "associationType": {
      "code": "12345",
      "system": "http://example.com/codesystem",
      "display": "Example Display Name"
    }
  }'

Responses

Contact Association created successfully

Bodyapplication/json
associatedContactIdstringrequired

Associated/related contact.

Example:"123e4567-e89b-12d3-a456-426614174000"
associationClassstringrequired

Classification of the relationship between the contacts.

Enum:"family""other"
Example:"family"
contactAssociationIdstringrequired

Canonical identifier for this contact association.

Example:"123e4567-e89b-12d3-a456-426614174000"
contactIdstringrequired

Primary contact in the association.

Example:"123e4567-e89b-12d3-a456-426614174000"
createdAtstring, (date-time)required

Timestamp when the association was created.

Example:"2025-01-01T00:00:00.000Z"
extensionsobjectrequired

Vendor- or practice-specific extension fields.

isActivebooleanrequired

Whether this association is currently active.

Example:true
updatedAtstring, (date-time)required

Timestamp when the association was last updated.

Example:"2025-01-01T00:00:00.000Z"
associationTypeobject(CodeableConceptDto)required

Directionality/role of this contact in the association (e.g., owner-of, emergency-contact-for).

Response
{ "associatedContactId": "123e4567-e89b-12d3-a456-426614174000", "associationClass": "family", "contactAssociationId": "123e4567-e89b-12d3-a456-426614174000", "contactId": "123e4567-e89b-12d3-a456-426614174000", "createdAt": "2025-01-01T00:00:00.000Z", "extensions": {}, "isActive": true, "updatedAt": "2025-01-01T00:00:00.000Z", "associationType": { "code": "12345", "system": "http://example.com/codesystem", "display": "Example Display Name" } }