api.v2.insured module

api.v2.insured.change_billing_schedule(policy_id=None, billing_schedule_id=None, policy_term_id=None)[source]

Change policy billing schedule

Parameters:
  • policy_id (str) – Policy id
  • billing_schedule_id (str) – Schedule to switch to
  • policy_term_id (str) – Policy Term whose billing schedule is being changed
Returns:

  • success (bool) – True if completely successful, false if not
  • messages (list of str) – List of human-readable error messages

api.v2.insured.get_agent_and_agencies_from_contact(contact_id=None)[source]

Return agents and agencies related to insured’s policies

Parameters:contact_id (str) – Insured’s id
Returns:
  • success (bool) – True if completely successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (dict) – Agents/Agencies data { “agents”: {}, “agencies”: {
    “agency_id1”: {
    “photo_id”: null, “addresses”: [
    {
    “address_line2”: null, “address_city”: “WELLSTON”, “address_line1”: “PO BOX 314”, “type_label”: null, “date_updated”: null, “address_country”: “USA”, “address_county”: “”, “contact_id”: “8a403b5b-fb57-4b29-9524-53f431651da6”, “longitude”: null, “attention”: null, “address_state”: “OK”, “latitude”: null, “type”: “Mailing/Billing”, “id”: “6d5cc731-c5fb-11e5-8667-12a91c8c3ac7”, “address_zip”: “74881”

    }

    ], “phones”: [

    {
    “date_updated”: null, “phone”: “(405)356-2477”, “type”: “Work”, “id”: “6d4a9d49-c5fb-11e5-8667-12a91c8c3ac7”, “contact_id”: “8a403b5b-fb57-4b29-9524-53f431651da6”

    }

    ], “emails”: [

    {
    “date_updated”: null, “type”: “Work”, “id”: “1261aac2-aad2-486f-9509-1b59f66dc58c”, “contact_id”: “8a403b5b-fb57-4b29-9524-53f431651da6”, “email”: “steffenson06@sbcglobal.net

    },

    ], “id”: “8a403b5b-fb57-4b29-9524-53f431651da6”, “name”: “Steffenson Ins. Agy. [356]”

    }

    }

  • }
api.v2.insured.get_complete_contact_information(contact_id=None, policy_params=None, filter_values=None)[source]

Retrieves insured data accroding to input param.

Parameters:
  • contact_id (str) – Filter notes by contact_id
  • policy_params (dict) – Values that will be sent to appropriate function
  • filter_values (array) – Array of strings defining values list to return. For all values should be empty [] F.e. [‘contact’, ‘policies’]
Returns:

  • success (bool) – True if successful, false if not

  • messages (list of str) – List of human-readable error messages

  • data (dict) – The data response having the form:

    {
        "contact": {},
        "policies": "{}"
    }
    

api.v2.insured.get_primary_carrier()[source]

Retrieve contact information for carrier

Returns:
  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (dict contains carrier’s contact data)
api.v2.insured.get_property_information_and_photos(property_id=None)[source]

Get property data

Parameters:property_id (str) – Property id
Returns:
  • success (bool) – True if completely successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (dict) – A dict containing results
api.v2.insured.is_email_available(email=None, contact_id=None)[source]

Check if email not belong to another contact

Parameters:
  • email (str) – Email to check
  • contact_id (str) – Contact id that we want to assign email
Returns:

  • success (bool) – True if available, false if not
  • messages (list of str) – List of human-readable error messages

api.v2.insured.new_claim_information(policy_id=None, property_id=None)[source]

Create claim.

Parameters:
  • policy_id (str) – Policy id
  • property_id (str) – Property id
Returns:

  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (dict containing claim details)

api.v2.insured.retrieve_contact_information(contact_id=None, additional_policy_list=None)[source]

Get contact data

Parameters:
  • contact_id (str) – Contact id
  • additional_policy_list (list of str) – UUID list of additional policy IDs to be retrieved
Returns:

  • success (bool) – True if completely successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (dict) – A dict containing contact

api.v2.insured.set_file_metadata(file_id=None, metadata=None)[source]

Updates file metadata

Parameters:
  • file_id (str) – Updated File id
  • metadata (dict) –

    Dict that describes new metadata {

    ‘update’: {key:value, ...}, # metadata values to be updates ‘delete’: [key1, key2,...], # metadata values to be deleted ‘key’:value , # metadata to update

    }

Returns:

  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages

api.v2.insured.set_photo_as_insurred_preferred(reference_id=None, file_id=None)[source]
Updates file received_meta_data keyword ‘preferred’
For all resource’s photos ‘preferred’ metadata key set to False except photo with file_id
Parameters:
  • file_id (str) – Updated File id
  • reference_id (str) – Insured id
Returns:

  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages

api.v2.insured.set_photo_caption(file_id=None, caption=None)[source]

Updates file received_meta_data keyword ‘caption’

Parameters:
  • file_id (str) – Updated File id
  • caption (str) – ‘Caption’ metadata value
Returns:

  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages

api.v2.insured.submit_claim(claim_id=None)[source]

Submits the claim to the carrier

Parameters:claim_id (str) – Claim id
Returns:
  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
api.v2.insured.update_claim(claim_id=None, loss_date=None, description=None, additional_information=None)[source]

Stores the loss date/description for a given claim

Parameters:
  • claim_id (str) – Claim id
  • loss_date (date YYYY_MM-DD) – Loss Date
  • description (str) – Description
  • additional_information (dict) –

    Additional information for the claim submission, with arbitrary keys and values(as strings), like:

    {
        "Insured Contact Number": "+1 (650) 321-1234",
        "Device ID": "0fe6a7bf-bca7-4757-825c-7cc9bf90cfc0"
    }
    
Returns:

  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages

api.v2.insured.update_contact_email_notices_flag(contact_id=None, enabled=False)[source]
api.v2.insured.update_contact_information(contact_id=None, contact_name=None, contact_photo=None, contact_addresses=None, contact_phones=None, contact_emails=None, dry_run=False)[source]

Updates contact values

Parameters:
  • contact_id (str) – Contact id
  • contact_name (str) – Name to update
  • contact_photo (str) – Photo in base64 format
  • contact_addresses (list of dicts) – List of address dicts
  • contact_phones (list of dicts) – List of phones dicts
  • contact_emails (list of dicts) – List of emails dicts
  • dry_run (bool) – False for apply changes, True for compare without apply
Returns:

  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (dict containing changes) – { ‘name_updated’: name_updated, ‘new_addresses’: new_addresses, ‘updated_addresses’: updated_addresses, ‘new_phones’: new_phones, ‘updated_phones’: updated_phones, ‘new_emails’: new_emails, ‘updated_emails’: updated_emails, ‘updated_photo’: update_photo
  • }

api.v2.insured.upload_property_or_claim_photo(file_type=None, reference_id=None, photo_as_base64=None, filename=None, mimetype=None)[source]

Uploads claim/property user’s photo

Parameters:
  • file_type (str) – either one of ‘properties’ or ‘claims’
  • reference_id (str) – reference id pointing to claim or property id related to file
  • photo_as_base64 (str) – photo as a data URI string – ex: ‘data:image/gif;base64,abcdefghij...’
  • filename (str) – original filename of uploaded file
  • mimetype (str) – mimetype of uploaded file
Returns:

  • success (bool) – True if successful, false if not

  • messages (list of str) – List of human-readable error messages

  • data (dict) – The data response having the form:

    {
        "file_id": uploaded_file_id
    }
    
  • Uploads claim/property user’s photo. User’s and agent’s photos stored in different folders.

  • Agent’s photos stored in None folder and user’s photos stored in %INSURED_UPLOAD_PHOTOS_DIR_NAME%

  • This way on claim/property retrieve we can distinguish user/agent photos