Async Contacts Module API
API reference for asynchronous contact workflows.
BriteCore v2 Async Contacts API endpoint wrappers.
Asynchronous (cached) counterparts to the synchronous wrappers in contacts.py. Uses AsyncBritecoreAPIClient for non-blocking, TTL-cached HTTP requests.
- Provides:
anew_contact – Async create a new contact. aadd_contact_to_role – Async assign a contact to a named role. aupdate_contact – Async update contact fields. aget_contact – Async retrieve a contact by ID (cached by default). afind_contact_by_params – Async search for contacts.
- async britecore_sdk.api.api_calls.v2.async_contacts.aadd_contact_to_role(contact_id, role='Named Insured', **kwargs)[source]
Add a contact to a named role asynchronously.
POST /api/v2/contacts/add_contact_to_role
- Parameters:
contact_id (str)
role (Literal['Additional Insured', 'Additional Interest', 'Administrator', 'Agent', 'Attorney', 'Board Member', 'Claim Administrator', 'Claimant', 'Claims Adjuster', 'Claims Supervisor', 'Contractor', 'Driver', 'Employee', 'External Claims Adjuster', 'In Care Of', 'Inspector', 'Loss Payee', 'Medical Provider', 'Named Insured', 'Public Claims Adjuster', 'Surplus Lines Producer', 'Underwriter', 'Unlisted Payor', 'Vendor'] | None)
kwargs (Unpack[RequestParameters])
- Return type:
Any
- async britecore_sdk.api.api_calls.v2.async_contacts.afind_contact_by_params(name, role_name=None, dob=None, **kwargs)[source]
Find contacts by the supported search parameters with async caching.
POST /api/v2/contacts/find_contact_by_params
- Parameters:
name (str)
role_name (Literal['Additional Insured', 'Additional Interest', 'Administrator', 'Agent', 'Attorney', 'Board Member', 'Claim Administrator', 'Claimant', 'Claims Adjuster', 'Claims Supervisor', 'Contractor', 'Driver', 'Employee', 'External Claims Adjuster', 'In Care Of', 'Inspector', 'Loss Payee', 'Medical Provider', 'Named Insured', 'Public Claims Adjuster', 'Surplus Lines Producer', 'Underwriter', 'Unlisted Payor', 'Vendor'] | None)
dob (str | None)
kwargs (Unpack[RequestParameters])
- Return type:
Any
- async britecore_sdk.api.api_calls.v2.async_contacts.aget_contact(contact_id, **kwargs)[source]
Retrieve a contact by identifier with short-lived async caching.
POST /api/v2/contacts/get_contact
- Parameters:
contact_id (str)
kwargs (Unpack[RequestParameters])
- Return type:
Any
- async britecore_sdk.api.api_calls.v2.async_contacts.alist_contacts(page=1, limit=100, client=None, **kwargs)[source]
Return a paginated list of contacts (async).
Pagination helper for
aiter_contacts. Calls/api/v2/contacts/list_all_contactsand normalises the result to{"data": [...]}.- Parameters:
page (int) – Page number (1-based).
limit (int) – Results per page.
client (AsyncBritecoreAPIClient | None) – Optional explicit async client; defaults to module-level client.
**kwargs (Any) – Additional request parameters.
- Returns:
Normalized response dict
{"data": [...]}.- Return type:
Any
- async britecore_sdk.api.api_calls.v2.async_contacts.anew_contact(name, address, phone=None, email=None, contact_type='individual', **kwargs)[source]
Create a new contact record asynchronously.
POST /api/v2/contacts/new_contact
- Parameters:
name (str)
address (list[dict[str, str]])
phone (list[dict[str, str] | None] | None)
email (list[dict[str, str] | None] | None)
contact_type (Literal['individual', 'organization'] | None)
kwargs (Unpack[RequestParameters])
- Return type:
tuple[Any, str | None]
- async britecore_sdk.api.api_calls.v2.async_contacts.aupdate_contact(contact, **kwargs)[source]
Update an existing contact asynchronously.
POST /api/v2/contacts/update_contact
- Parameters:
contact (dict[str, str | list[dict[str, str]]])
kwargs (Unpack[RequestParameters])
- Return type:
Any