storeRoles
Method to update Contact's aspect data for a given role.
Code
storeRoles › Request Body
contactIdroleIdagencyInactivee2ValDisallowdefaultAgencyagenciesagencyDatesagencyGroupagencyNumberagencyGroupNumbercreditScoreAccountcommissionPaymentcommissionStructuredefaultSurplusLinesProducerinterestContentloginInformationnaicNumbernoticespaymentsIssuedpersonalInformationproducerNumberquotingRestrictionsweepAccountterminationvendorNumberstoreRoles › Responses
successmessagedataadd_contact_date_remember
Add a date to remember. Body: {contact_id, date, frequency, contents, touchpoint?, alert_status, alert_time_period?, alert_time_unit?, alert_email?}; answers {contact_id, date_to_remember, meta}.
add_contact_date_remember › Request Body
datefrequencycontentsalert_statuscontact_idtouchpointalert_time_periodalert_time_unitalert_emailadd_contact_date_remember › Responses
add_contact_license
Add a producer or surplus lines producer licence (one list per contact, shown in both role box tables).
Body: {contact_id, role_id, state_id, license_number}; answers the list, or licenses none when the viewer
may write the role but not read it (the licence is added all the same). Adjuster licences are saved through
create_adjuster_license and its siblings.
add_contact_license › Request Body
contact_idrole_idstate_idlicense_numberadd_contact_license › Responses
add_contact_role
Add a role to the contact, as the classic Add Role popup does: by role id, with the popup's permission checks and notes. add_contact_to_role is the integrations' call by role name and does not change.
add_contact_role › Request Body
contact_idThe contact; the caller's own contact included, as classic.
role_idA role the contact does not hold and may be given (its type, one Primary Carrier). Needs britecore/contacts/role/
add_contact_role › Responses
add_contact_slp_agency
Associate an agency with the surplus lines producer contact_id (an agent stands for its agency), as classic's
SLP role box does. Answers {contact_id, agencies, meta}; agencies is none when the viewer may write the role
but not read it (the agency is associated all the same).
add_contact_slp_agency › Request Body
contact_idagency_idadd_contact_slp_agency › Responses
add_contact_to_role
Adds a specified contact to the given role.
Code
add_contact_to_role › Request Body
role_nameThe name of the role to add the contact to
contact_idThe unique identifier of the contact
add_contact_to_role › Responses
successarchive_contact
Archive a contact from the Contacts list; agents on current policies are refused.
Code
archive_contact › Request Body
contact_idarchive_contact › Responses
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: data | |
| type = object · requires: permissionDenied, success |
assign_policy_contact
assign_policy_contact
assign_policy_contact › Request Body
policy_idThe policy ID to assign the contact to
contact_idThe contact ID to assign to the policy
roleThe role of the contact in the policy
assign_policy_contact › Responses
successassign_quote_contact
assign_quote_contact
assign_quote_contact › Request Body
quote_idThe quote ID to assign the contact to.
contact_idThe contact ID to assign to the quote
roleThe role of the contact in the quote. Additional Interest roles are configured on Settings > Policies page.
assign_quote_contact › Responses
successassign_risk_contact
assign_risk_contact
assign_risk_contact › Request Body
risk_idThe risk ID to assign the contact to
contact_idThe contact ID to assign to the risk
roleThe role of the contact in the risk
assign_risk_contact › Responses
successcopy_company_contact_info
Replace the contact's Work phones, e-mails and website with its company's (copyContactInfoFromCompany).
copy_company_contact_info › Request Body
contact_idThe contact, which must have a company.
copy_company_contact_info › Responses
create_adjuster_license
Create a new adjuster license record.
Code
create_adjuster_license › Request Body
contact_idUUID of the contact
business_location_idUUID of the business location (state)
license_numberLicense number
effective_dateEffective date in YYYY-MM-DD format
expiration_dateExpiration date in YYYY-MM-DD format
create_adjuster_license › Responses
successWhether the request was successful
messagesAny messages or errors related to the request
create_contact
Code
create_contact › Request Body
nametypeconfirmation_email^[a-zA-Z0-9_.+-]+@[a…date_of_birthdrivers_licenseexternal_system_referencelast_synched_datesource_update_datefein_tax_idlegal_entity_typedate_business_starteddbaadded_bypurchase_datepositionwebsitessn_groupssnagency_inception_dateagency_termination_datefollow_agency_quoting_restrictionusernamegenderdriver_license_datelicense_state^[A-Z]{2}$date_of_deathhicn_numbercompany_idagency_group_numberagency_numberproducer_numberagency_group_idagency_idagent_idscommission_structurecreate_contact › Responses
successdelete_adjuster_license
Delete an adjuster license record.
Code
delete_adjuster_license › Request Body
license_idUUID of the license to delete
delete_adjuster_license › Responses
successWhether the request was successful
messagesAny messages or errors related to the request
delete_contact_date_remember
Remove one of the contact's dates to remember, with classic's note. Answers {contact_id, removed, meta}.
delete_contact_date_remember › Request Body
contact_iddate_iddelete_contact_date_remember › Responses
find_contact_by_params
Find insured using given params
Code
find_contact_by_params › Request Body
nameContact name to search for (full or partial). Cannot be empty.
role_nameOptional. Filter contacts by a specific role name (e.g., 'Agent', 'Administrator')
dob^(0[1-9]|1[0-2])/(0[…Optional. Contact's date of birth in mm/dd/yyyy format
exclude_rolesOptional. Array of role names to exclude from results. Mutually exclusive with role_name.
exclude_empty_usernamesOptional. If true, excludes contacts with empty usernames
requires_login_informationOptional. If true, only returns contacts whose roles have the 'loginInformation' aspect
page_sizeOptional. Maximum number of results to return
include_primary_addressOptional. If true, each result carries primary_address: the contact's preferred address when it has a street line, else its first address with one (by type order), or null
order_by_nameOptional. If true, results come back in a deterministic order: relevance first, then name (case-insensitive), then id. An empty name is therefore alphabetical. Requires page_size on ElasticSearch
find_contact_by_params › Responses
successIndicates if the request was successful
Array of contact objects matching the search criteria
get_contact_by_agency
get_contact_by_agency
get_contact_by_agency › Request Body
agency_numberAgency number
get_contact_by_agency › Responses
successget_contact_by_agency_group
get_contact_by_agency_group
get_contact_by_agency_group › Request Body
agency_group_numberAgency group number
get_contact_by_agency_group › Responses
successget_contact_by_agent
get_contact_by_agent
get_contact_by_agent › Request Body
producer_numberAgent producer number
get_contact_by_agent › Responses
successget_mfa_code
The contact's MFA key, on the Security tab's explicit Show; a contact with none gets one, as classic's tab makes one. Logged without the key, and never cached.
get_mfa_code › Request Body
contact_idget_mfa_code › Responses
get_quoting_permissions
The Configuration tab's read (classic getContactBusinessLocation and getContactBusinessLocationWithUniquePolicyTypes): the role the tab edits, the states the contact may quote in and those it may add, each state's policy types open and closed to quoting by name, and whether the viewer may change them.
get_quoting_permissions › Request Body
contact_idget_quoting_permissions › Responses
get_screening_history
Code
get_screening_history › Request Body
contact_idThe unique identifier of the contact
get_screening_history › Responses
successlist_addable_contact_roles
The roles the viewer may add to the contact (the Add Role list), by the rule add_contact_role checks: classic's
popup list (not held, the contact's type, one Primary Carrier, Tenant only with its setting), known to the page,
whose rule the viewer may read. Answers {contact_id, roles: [{id, name}]}.
list_addable_contact_roles › Request Body
contact_idlist_addable_contact_roles › Responses
list_contacts_by_role_code
List contacts by partial role code using prefix matching.
Code
list_contacts_by_role_code › Request Body
roleThe role type to search
filterThe prefix to match against the role code. Minimum 5 characters after trimming whitespace.
limitMaximum number of results to return. Defaults to 50.
list_contacts_by_role_code › Responses
List of matching contacts
successlookup_address_zip
The cities, counties and state for a zip code, as the classic address popup looks them up.
lookup_address_zip › Request Body
zipFor the USA, 5 digits or ZIP+4.
lookup_address_zip › Responses
modify_contact
Code
modify_contact › Request Body
idnametypeconfirmation_email^[a-zA-Z0-9_.+-]+@[a…date_of_birthdrivers_licenseexternal_system_referencelast_synched_datesource_update_datefein_tax_idlegal_entity_typedate_business_starteddbaadded_bypurchase_datepositionwebsitessn_groupssnagency_inception_dateagency_termination_datefollow_agency_quoting_restrictionusernamegenderdriver_license_datelicense_state^[A-Z]{2}$date_of_deathhicn_numbercompany_idagency_group_numberagency_numberagent_idscommission_structuremodify_contact › Responses
successnew_contact
Creates a new Contact record and optionally related phones/emails/addresses.
Code
new_contact › Request Body
namedoing_buiness_astypedate_of_birthssnfein_taxlegal_entity_typedate_business_startedgendervalidate_purchase_datephonesemailsaddresseswebsitecognito_usernameis_godrolesusernameconfirmation_emailbackground_informationdates_to_rememberpositionname_aliasescompanyorganization_contactsagency_administratorsrelated_tois_relatedexternal_system_referencenew_contact › Responses
successmessagedataoverride_screening_check_result
Code
override_screening_check_result › Request Body
screening_check_result_idID of the screening check result to override
override_reasonReason for the override
override_screening_check_result › Responses
successrandomize_portal_code
A new BriteApps portal enrollment code, drawn on the server (classic's Randomize Code).
randomize_portal_code › Request Body
contact_idrandomize_portal_code › Responses
regenerate_security_key
A new MFA key for the contact (classic getNewMFACode), returned once and never cached.
regenerate_security_key › Request Body
contact_idregenerate_security_key › Responses
remove_contact_from_role
Removes a specified contact from the given role.
Code
remove_contact_from_role › Request Body
role_nameThe name of the role to add the contact to
contact_idThe unique identifier of the contact
remove_contact_from_role › Responses
successremove_contact_license
Remove one of the contact's producer or surplus lines producer licences. Body: {contact_id, role_id, license_id}; answers the list, or licenses none when the viewer may write the role but not read it (the
licence is removed all the same).
remove_contact_license › Request Body
contact_idrole_idlicense_idremove_contact_license › Responses
remove_contact_photo
Remove the contact's photo, as classic's removeAvatar does; the page shows the placeholder again.
remove_contact_photo › Request Body
contact_idremove_contact_photo › Responses
remove_contact_role
Remove one of the contact's roles, as classic Delete This Role does: by role id, with its permission checks and notes. remove_contact_from_role is the integrations' call by role name and does not change.
remove_contact_role › Request Body
contact_idThe contact; the caller's own contact included, as classic.
role_idA role. As classic, no rule on the role itself is needed to remove it.
remove_contact_role › Responses
remove_contact_slp_agency
Drop the surplus lines producer's association with the agency. Answers {contact_id, agencies, meta};
agencies is none when the viewer may write the role but not read it (the association is dropped all the
same).
remove_contact_slp_agency › Request Body
contact_idagency_idremove_contact_slp_agency › Responses
remove_policy_contact
remove_policy_contact
remove_policy_contact › Request Body
policy_idThe policy ID to remove the contact from
contact_idThe contact ID to remove from the policy
roleThe role of the contact in the policy
remove_policy_contact › Responses
dataThe data object is empty for this endpoint
successremove_quote_contact
remove_quote_contact
remove_quote_contact › Request Body
quote_idThe quote ID to remove the contact from
contact_idThe contact ID to remove from the quote
roleThe role of the contact in the quote
remove_quote_contact › Responses
dataThe data object is empty for this endpoint
successremove_risk_contact
remove_risk_contact
remove_risk_contact › Request Body
risk_idThe risk ID to remove the contact from
contact_idThe contact ID to remove from the risk
roleThe role of the contact in the risk
remove_risk_contact › Responses
dataThe data object is empty for this endpoint
successretrieve_address_suggestions
Code
retrieve_address_suggestions › Request Body
policy_type_idaddress_line1address_line2address_cityaddress_stateaddress_zipaddress_countryrevision_idclaim_idretrieve_address_suggestions › Responses
successmessagedataretrieve_adjuster_licenses
Retrieve all adjuster licenses for a contact.
Code
retrieve_adjuster_licenses › Request Body
contact_idUUID of the contact whose adjuster licenses to retrieve
retrieve_adjuster_licenses › Responses
successWhether the request was successful
messagesAny messages or errors related to the request
List of adjuster license records
retrieve_contact
Code
retrieve_contact › Request Body
idThe unique identifier of the contact
external_system_referenceThe external identifier of the contact
retrieve_contact › Responses
successretrieve_contact_information
The contact as the Information page shows it to this viewer.
Code
retrieve_contact_information › Request Body
contact_idretrieve_contact_information › Responses
ContactInformationModel (lib/domain/contact_information.py): the contact as the Information page reads it. Keys shared with retrieve_contact keep its names and types; the fields of boxes the viewer may not read are absent.
retrieve_contact_information_page_settings
The Information page's config: what it shows for this site and this viewer, whichever contact is open.
Code
retrieve_contact_information_page_settings › Request Body
retrieve_contact_information_page_settings › Responses
retrieve_contact_login
The User Management card: the contact's one login, read through its first role with Login Information (or
BriteAuth's panel alone). role_id is null when the contact has no login to show.
retrieve_contact_login › Request Body
contact_idretrieve_contact_login › Responses
The User Management card: role_id and role_name it reads through (null when the contact has no login to show), kind (login or user_management), login, own_contact, editable.
retrieve_contact_role
One of the contact's roles as the Role box shows it (classic retrieveAspectData): its sections, the numbers, and what this viewer may write in it. Refused for a role the viewer may not read.
retrieve_contact_role › Request Body
contact_idrole_idretrieve_contact_role › Responses
One role's box: its sections in classic's order, their contents, and what the viewer may change in it.
retrieve_contact_security
The Security tab's read: whether MFA is on for the site and the contact, whether a key exists, and what the viewer may do there. Never the key itself.
retrieve_contact_security › Request Body
contact_idretrieve_contact_security › Responses
retrieve_portal_code
The BriteApps portal enrollment code, on the page's explicit Show (classic getBriteAppsData's code).
retrieve_portal_code › Request Body
contact_idretrieve_portal_code › Responses
retrieve_user_management
The BriteAuth username the Role box's User Management panel addresses; never cached.
retrieve_user_management › Request Body
contact_idrole_idretrieve_user_management › Responses
revoke_screening_override
Code
revoke_screening_override › Request Body
screening_check_result_idID of the screening check result to revoke override from
revoke_screening_override › Responses
successsearch_agency_admins
The contacts the agency administrator picker offers for this agency, by name.
search_agency_admins › Request Body
contact_idThe agency.
search_stringPart of the name.
search_agency_admins › Responses
search_contacts
Contacts list search with the classic syntax, plus single_match_id for the exact-match jump.
Code
search_contacts › Request Body
Classic Contacts list search syntax. A leading # suppresses the exact-match jump.
Role name filter; empty means all roles.
Results page, 1-based.
Results per page (default 25).
active_onlyActive contacts only, as the classic contact pickers search.
contact_typeOnly contacts of this type, as the classic pickers filter (the company picker searches organizations).
Contacts holding any of these role names; takes the place of role when given.
Only contacts who can sign in (a username or Cognito login, not terminated, a role that can sign in). Answers page 1 only; a later page is refused.
Order the whole result by a column; absent for the default order. An unknown key or direction is refused.
search_contacts › Responses
search_names_emails
Search for emails and usernames using ElasticSearch.
Code
search_names_emails › Request Body
querySearch query for email addresses or usernames. Must be at least 2 characters long.
limitMaximum number of results to return
search_names_emails › Responses
successIndicates if the request was successful
Array of search results containing contact information
set_aspect_data
Set a contact's aspect data
Code
set_aspect_data › Request Body
idrole_idagenciesagency_datesagency_groupagency_group_numberagency_numbercredit_score_accountcommission_paymentcommission_structureinterest_contentlogin_informationnaic_numbernoticespayments_issuedpersonal_informationproducer_numbersweep_accountterminationvendor_numberis_1099_reportabledefault_surplus_lines_producerquoting_restrictiondefault_agencyinactive_agencydisallow_e2_valueset_aspect_data › Responses
successmessagedataset_contact_agency_billing
Turn "Agency is on Agency Billing" on or off, as classic's switch (updateAgencyBillingSettingForAgency) does.
set_contact_agency_billing › Request Body
contact_idThe agency.
role_idThe Agency role whose Notices box shows the switch.
enabledset_contact_agency_billing › Responses
set_contact_flag
Flag the contact, as classic's header flag (storeFlag) does: its policies and their claims too.
set_contact_flag › Request Body
contact_idThe contact.
flagset_contact_flag › Responses
set_phrase
Set the pass phrase (classic setPassphrase): the one sent, checked against the site's password rules, or one drawn on the server and returned once. Never cached.
set_phrase › Request Body
contact_idcurrentThe current pass phrase, required on one's own contact.
phraseThe pass phrase to set: typed, or a suggestion from suggest_phrase kept as shown. Checked against the site's password rules.
set_phrase › Responses
set_quoting_policy_types
The policy types open to quoting at one of the contact's states (classic storeContactPolicyTypes), by id. Needs configuration/updateConfiguration (rw) where protect-agency-contacts allows. Returns the tab's read.
set_quoting_policy_types › Request Body
contact_idlocation_idOne of the contact's states.
policy_type_idsPolicy types of that state; each id stands for every policy type of its name there, as classic stores by name.
set_quoting_policy_types › Responses
set_quoting_states
The states the contact may quote in (classic storeContactBusinessLocation), by id. Needs configuration/updateConfiguration (rw) where protect-agency-contacts allows. Returns the tab's read.
set_quoting_states › Request Body
contact_idlocation_idsStates the site writes in, or states the contact already has.
set_quoting_states › Responses
store_contact_legal_entity_type
Set a contact's Legal Entity Type.
Code
store_contact_legal_entity_type › Request Body
contact_idThe unique identifier of the contact whose Legal Entity Type is being set.
legal_entity_typeLegal Entity Type value to set. A literal empty string clears the field. Null/omitted, non-string, and whitespace-only values are rejected. Surrounding whitespace on a real value is trimmed.
store_contact_legal_entity_type › Responses
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: messages, data, success | |
| type = object · requires: permissionDenied, success |
Empty object on success (the value is persisted server-side); an empty array on error responses, per the standard_error envelope.
successsuggest_phrase
A pass phrase drawn on the server for the page to show before it is set, as classic's Generate shows one. Nothing is stored; never cached.
suggest_phrase › Request Body
contact_idsuggest_phrase › Responses
toggle_mfa
Turn MFA on or off for the contact (the Security tab's switch). The contact may switch their own; another contact needs security/updateSecurity (rw) where protect-agency-contacts allows. Sending the stored value changes nothing.
toggle_mfa › Request Body
contact_idenabledTrue turns MFA on, false turns it off.
toggle_mfa › Responses
update_adjuster_license
Update an existing adjuster license record.
Code
update_adjuster_license › Request Body
License update data object
update_adjuster_license › Responses
successWhether the request was successful
messagesAny messages or errors related to the request
update_contact_date_remember
Change one of the contact's dates to remember. Body: {contact_id, date_id, <the fields that change>}; the
fields left out keep their stored values. Answers {contact_id, date_to_remember, meta}.
update_contact_date_remember › Request Body
contact_iddate_iddatefrequencycontentstouchpointalert_statusalert_time_periodalert_time_unitalert_emailupdate_contact_date_remember › Responses
update_contact_information
Saves the contact as the Information page sends it, in one transaction, and answers it as the page reads it.
Code
update_contact_information › Request Body
idThe contact to save, as retrieve_contact_information answers it in id.
nametypedbafein_tax_idssnwebsitepositiongenderlegal_entity_typeexternal_system_referencedot_numbermotor_carrier_numberstate_motor_carrier_numberbackgroundis_approved_vendordata_studio_enabledThe individual's company. An id links that organization; a name links the first active contact of that name (the match ignores letter case, as the database compares names), as classic storeContactCompany does, or creates an organization when no active contact has it. Either way it is refused unless it is an active organization the viewer may update; null unlinks it. Send the id or the name, not both.
update_related_addressesCopy the new or changed addresses to the contact's related contacts.
copy_related_infoCopy this contact's address and Home phone to the contacts it is related to.
update_contact_information › Responses
ContactInformationModel (lib/domain/contact_information.py): the contact as the Information page reads it. Keys shared with retrieve_contact keep its names and types; the fields of boxes the viewer may not read are absent.
update_contact_login
Save the contact's login (the User Management card), through the login role the viewer may write.
Code
update_contact_login › Request Body
contact_idThe contact.
usernameconfirmation_emailpasswordretype_passwordcurrent_passwordupdate_contact_login › Responses
update_contact_role
Save one role's box, as classic's storeRoles does. Body: {contact_id, role_id, contents}, contents
keyed by section as retrieve_contact_role reads them; only the sections sent are saved. Classic's rules apply:
storeRoles rw, the role's own rule rw or one's own account under its setting, each section's own rule, and the
protect-agency-contacts rule. Answers the role as retrieve_contact_role reads it, with meta.save.warnings:
classic's own messages about the save (a duplicate SSN not saved, a duplicate confirmation e-mail). A viewer who
may save the role but not read its box gets contact_id, role_id and meta only: the save has committed.
update_contact_role › Request Body
contact_idrole_idThe sections to save, keyed by section as retrieve_contact_role reads them; a section left out is not saved. A section sent as an object takes only its own fields, and the sections that list required fields refuse one left out. A section the role does not have, or the viewer may not change, is refused.
update_contact_role › Responses
One role's box: its sections in classic's order, their contents, and what the viewer may change in it.
upload_contact_photo
Set the contact's photo (a data URL), checked and stored by classic's uploadAvatar.
upload_contact_photo › Request Body
contact_idphotoThe image as a data URL (data:image/png;base64,...). PNG, JPEG or GIF; classic's uploadAvatar checks its size, extension and content.
filenameThe file name, for the extension check; one without an extension takes the image type's.
