Contact Models
Contact models for the ACPortal API.
- class ab.api.models.contacts.ContactSimple(*, id=None, firstName=None, lastName=None, fullName=None, email=None, phone=None, companyId=None, companyName=None, addressesList=None, assistant=None, birthDate=None, bolNotes=None, careOf=None, company=None, contactDisplayId=None, contactTypeId=None, department=None, editable=None, emailsList=None, fax=None, fullNameUpdateRequired=None, isActive=None, isBusiness=None, isEmpty=None, isPayer=None, isPrefered=None, isPrimary=None, isPrivate=None, jobTitle=None, jobTitleId=None, legacyGuid=None, ownerFranchiseeId=None, phonesList=None, primaryEmail=None, primaryPhone=None, rootContactId=None, taxId=None, webSite=None, **extra_data)[source]
Bases:
ResponseModel,IdentifiedModelLightweight contact — GET /contacts/{id} and GET /contacts/user.
The
/contacts/userendpoint returnsfullName,companyId,companyNameinstead offirstName/lastName— all fields are optional to accommodate both shapes.- Parameters:
firstName (str | None)
lastName (str | None)
fullName (str | None)
email (str | None)
phone (str | None)
companyId (str | None)
companyName (str | None)
assistant (str | None)
birthDate (str | None)
bolNotes (str | None)
careOf (str | None)
company (dict | None)
contactDisplayId (str | None)
contactTypeId (int | None)
department (str | None)
editable (bool | None)
fax (str | None)
fullNameUpdateRequired (bool | None)
isActive (bool | None)
isBusiness (bool | None)
isEmpty (bool | None)
isPayer (bool | None)
isPrefered (bool | None)
isPrimary (bool | None)
isPrivate (bool | None)
jobTitle (str | None)
jobTitleId (int | None)
legacyGuid (str | None)
ownerFranchiseeId (str | None)
primaryEmail (str | None)
primaryPhone (str | None)
rootContactId (int | None)
taxId (str | None)
webSite (str | None)
extra_data (Any)
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.EmailDetails(*, id=None, email=None, invalid=None, dontSpam=None, **extra_data)[source]
Bases:
ResponseModelInner email object within ContactEmailEntry — maps to C# EmailDetails.
- Parameters:
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.PhoneDetails(*, id=None, phone=None, **extra_data)[source]
Bases:
ResponseModelInner phone object within ContactPhoneEntry — maps to C# PhoneDetails.
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactEmailEntry(*, id=None, isActive=None, deactivatedReason=None, metaData=None, editable=None, email=None, **extra_data)[source]
Bases:
ResponseModelEmail list entry — maps to C# ContactEmailEditDetails (DetailBindingBase).
- Parameters:
- email: EmailDetails | None
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactPhoneEntry(*, id=None, isActive=None, deactivatedReason=None, metaData=None, editable=None, phone=None, **extra_data)[source]
Bases:
ResponseModelPhone list entry — maps to C# ContactPhoneEditDetails (DetailBindingBase).
- Parameters:
- phone: PhoneDetails | None
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactAddressEntry(*, id=None, isActive=None, deactivatedReason=None, metaData=None, editable=None, address=None, **extra_data)[source]
Bases:
ResponseModelAddress list entry — maps to C# ContactAddressEditDetails (DetailBindingBase).
- Parameters:
- address: CompanyAddress | None
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactDetailedInfo(*, isActive=None, createdDate=None, modifiedDate=None, createdBy=None, modifiedBy=None, id=None, firstName=None, lastName=None, email=None, phone=None, contactDisplayId=None, fullName=None, contactTypeId=None, careOf=None, bolNotes=None, taxId=None, isBusiness=None, isPayer=None, isPrefered=None, isPrivate=None, isPrimary=None, companyId=None, rootContactId=None, ownerFranchiseeId=None, company=None, legacyGuid=None, assistant=None, department=None, webSite=None, birthDate=None, jobTitleId=None, jobTitle=None, emailsList=None, phonesList=None, addressesList=None, fax=None, primaryPhone=None, primaryEmail=None, editable=None, addresses=None, phones=None, emails=None, companyInfo=None, contactDetailsCompanyInfo=None, fullNameUpdateRequired=None, isEmpty=None, **extra_data)[source]
Bases:
ResponseModel,FullAuditModelFull editable contact details — GET /contacts/{id}/editdetails.
Maps to C# ContactEditDetails → ContactExtendedDetails<T> → ContactBaseDetails.
- Parameters:
isActive (bool | None)
createdDate (datetime | None)
modifiedDate (datetime | None)
createdBy (str | None)
modifiedBy (str | None)
firstName (str | None)
lastName (str | None)
email (str | None)
phone (str | None)
contactDisplayId (str | None)
fullName (str | None)
contactTypeId (int | None)
careOf (str | None)
bolNotes (str | None)
taxId (str | None)
isBusiness (bool | None)
isPayer (bool | None)
isPrefered (bool | None)
isPrivate (bool | None)
isPrimary (bool | None)
companyId (str | None)
rootContactId (int | None)
ownerFranchiseeId (str | None)
company (dict | None)
legacyGuid (str | None)
assistant (str | None)
department (str | None)
webSite (str | None)
birthDate (str | None)
jobTitleId (int | None)
jobTitle (str | None)
emailsList (List[ContactEmailEntry] | None)
phonesList (List[ContactPhoneEntry] | None)
addressesList (List[ContactAddressEntry] | None)
fax (str | None)
primaryPhone (str | None)
primaryEmail (str | None)
editable (bool | None)
companyInfo (dict | None)
contactDetailsCompanyInfo (dict | None)
fullNameUpdateRequired (bool | None)
isEmpty (bool | None)
extra_data (Any)
- emails_list: List[ContactEmailEntry] | None
- phones_list: List[ContactPhoneEntry] | None
- addresses_list: List[ContactAddressEntry] | None
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactPrimaryDetails(*, id=None, fullName=None, email=None, phone=None, company=None, companyId=None, companyName=None, cellPhone=None, fax=None, address=None, **extra_data)[source]
Bases:
ResponseModelPrimary contact info — GET /contacts/{id}/primarydetails.
The live API returns
companyas a nested dict (full company object) rather than a plain string as swagger implies.- Parameters:
- address: CompanyAddress | None
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.SearchContactEntityResult(*, contactID=None, customerCell=None, contactDisplayId=None, contactFullName=None, contactPhone=None, contactHomePhone=None, contactEmail=None, masterConstantValue=None, contactDept=None, address1=None, address2=None, city=None, state=None, zipCode=None, countryName=None, companyCode=None, companyID=None, companyName=None, companyDisplayId=None, isPrefered=None, industryType=None, totalRecords=None, **extra_data)[source]
Bases:
ResponseModelSingle result row from POST /contacts/v2/search.
Maps to C#
SearchContactEntityResultentity (22 properties). Each row contains contact details, address fields, company info, and a denormalizedtotalRecordscount.- Parameters:
contactID (int | None)
customerCell (str | None)
contactDisplayId (str | None)
contactFullName (str | None)
contactPhone (str | None)
contactHomePhone (str | None)
contactEmail (str | None)
masterConstantValue (str | None)
contactDept (str | None)
address1 (str | None)
address2 (str | None)
city (str | None)
state (str | None)
zipCode (str | None)
countryName (str | None)
companyCode (str | None)
companyID (str | None)
companyName (str | None)
companyDisplayId (str | None)
isPrefered (bool | None)
industryType (str | None)
totalRecords (int | None)
extra_data (Any)
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactSearchParams(*, contactDisplayId=None, fullName=None, companyName=None, companyCode=None, email=None, phone=None, companyDisplayId=None)[source]
Bases:
RequestModelSearch filter parameters — the
mainSearchRequestsub-object of POST /contacts/v2/search.Maps to swagger
MergeContactsSearchRequestParameters. All fields are optional; omit entirely for unfiltered results.- Parameters:
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.PageOrderedRequest(*, pageNumber, pageSize, sortingBy=None, sortingDirection=None)[source]
Bases:
RequestModelPagination and sorting options — the
loadOptionssub-object of POST /contacts/v2/search.Maps to swagger
PageOrderedRequestModel/ C#PagedOrderedRequest.- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactEditParams(*, franchiseeId=None)[source]
Bases:
RequestModelQuery parameters for contact edit operations.
- Parameters:
franchiseeId (str | None)
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactHistoryParams(*, statuses=None)[source]
Bases:
RequestModelQuery parameters for contact history operations.
- Parameters:
statuses (str | None)
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactEditRequest(*, firstName=None, lastName=None, email=None, phone=None, addresses=None)[source]
Bases:
RequestModelBody for PUT /contacts/{id}/editdetails and POST /contacts/editdetails.
- Parameters:
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactSearchRequest(*, mainSearchRequest=None, loadOptions)[source]
Bases:
RequestModelBody for POST /contacts/v2/search.
Uses a nested structure with
mainSearchRequest(search filter parameters) andloadOptions(pagination/sort). The flat mixin fields (page, pageSize, searchText) are replaced by typed sub-models that match the API’s expected shape.- Parameters:
mainSearchRequest (ContactSearchParams | None)
loadOptions (PageOrderedRequest)
- main_search_request: ContactSearchParams | None
- load_options: PageOrderedRequest
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactHistory(*, events=None, totalCount=None, **extra_data)[source]
Bases:
ResponseModelContact interaction history — POST /contacts/{contactId}/history.
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactHistoryAggregated(*, summary=None, byType=None, **extra_data)[source]
Bases:
ResponseModelAggregated history — GET /contacts/{contactId}/history/aggregated.
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactGraphData(*, dataPoints=None, labels=None, **extra_data)[source]
Bases:
ResponseModelContact graph data — GET /contacts/{contactId}/history/graphdata.
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactMergePreview(*, mergeTo=None, mergeFrom=None, conflicts=None, **extra_data)[source]
Bases:
ResponseModelMerge preview result — POST /contacts/{mergeToId}/merge/preview.
- Parameters:
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactHistoryCreateRequest(*, statuses=None)[source]
Bases:
RequestModelBody for POST /contacts/{contactId}/history.
- Parameters:
statuses (str | None)
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.contacts.ContactMergeRequest(*, mergeFromId=None)[source]
Bases:
RequestModelBody for POST /contacts/{mergeToId}/merge/preview and PUT /contacts/{mergeToId}/merge.
- Parameters:
mergeFromId (str | None)
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].