api.v2.vendors module

API end points for vendor integration.

api.v2.vendors.build_ivans_manual_claim(data_list=None, file_date=None)[source]

Builds an XML file for specific claims and prepares it to be sent to IVANS.

Parameters:
  • data_list (list) – A list of claim numbers to be used to generate the files
  • file_date (date) – The date for which the file should be generated for
Returns:

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

api.v2.vendors.build_nxtech_initial_load(contact_id=None, file_date=None)[source]

Builds an XML file for policies for specified Contact, changing all Transaction Codes to SYN.

The build process will be done on the background cluster if available.

Parameters:
  • contact_id (str) – The id of the contact to build for
  • file_date (date) – The date for which the file should be generated for
Returns:

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

api.v2.vendors.build_nxtech_manual_transactions(data_list, file_date=None)[source]

Builds an XML file for specific policies and prepares it to be sent to NxTech.

Parameters:
  • data_list (list) –

    Objects with key-value pairs matching the following format:

    {
        "policy_number": "SOME-POLICY",
        "transaction_code": "NxTech-Trans-Code"
    }
    

    The “transaction_code” choices can be found at http://wiki.britecore.com/wiki/NxTech:_Transaction_Codes

  • file_date (date) – The date for which the manual file should be generated for.
Returns:

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

api.v2.vendors.fetch_motor_vehicle_report_for_drivers(drivers=None, store_no_hit=False)[source]

Requests and retrieves Motor Vehicle Reports (MVR) for drivers.

Parameters:drivers (list) –

Objects with key-value pairs matching the following format:

{
    "driversLicenseNumber": "123456789",
    "driversLicenseState": "MO",
    "driverFirstName": "John",
    "driverLastName": "Doe",
    "driverDateOfBirth": "1990-01-01"
}
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:
  • : – {
    “123456789”: {“accidents_count”: 0, “violations_count”: 1}, “987654321”: {“accidents_count”: 1, “violations_count”: 0}

    }

api.v2.vendors.get_prefill_services_data(property_id)[source]

Return a token to initiate a 360Value Prefill data call.

Parameters:property_id (str) – UUID of the property being valuated.
Returns:
  • success (bool) – True if successful, False if not
  • messages (list of str) – List of human readable messages
  • data (dict) – A dict containing the following data :
    token : str
    String that is used to initiate a valuation.
    script_src : str
    Location from where the 360 value script must be loaded.
    report_id : str
    UUID of the Value360Report for the current valuation.
api.v2.vendors.get_value360_token(property_id, home_type=None)[source]

Return a token to initiate a 360 Value property valuation.

Parameters:
  • property_id (str) – UUID of the property being valuated.
  • home_type (str) – The type of home we expect to show on value360 plugin form, the default is residential for 1-4 Family The value could be one of the fallowing also: condo_iu for Condo Interior Unit, manufactured_mobile for Manufactured/Mobile
Returns:

  • success (bool) – True if successful, False if not
  • messages (list of str) – List of human readable messages
  • data (dict) – A dict containing the following data :
    token : str
    String that is used to initiate a valuation.
    script_src : str
    Location from where the 360 value script must be loaded.
    report_id : str
    UUID of the Value360Report for the current valuation.

api.v2.vendors.invoice_cloud_autopay_enroll(policy_number='', enable=True)[source]

Handles enrolling or un-enrolling an account on auto-pay for Invoice Cloud.

Parameters:
  • policy_number (str value for Policy.policy_number) –
  • enable (bool) – true if setting up for autopay, false if disabling autopay
Returns:

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

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

  • data (dict) – Representation of dict result:

    {
        'success': true,
        'messages': []
    }
    

api.v2.vendors.ivans_edocs_build(date_cursor=None, file_ids=[])[source]

Builds a manual edocs file for IVANS and automatically uploads it to IVANS. The generated XML files is not like the daily automated files and can be distinguished by the name of the XML containing _manual.

Parameters:
  • date_cursor (str) – YYYY-MM-DD
  • file_ids (list) – ['UUID1', 'UUID2']
Returns:

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

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

  • data (dict) – Representation of dict result:

    {
        'data':{
            'file_name': 'britecore_edocs_manual20180601.xml',
            'success': True
            'active': True,
            'actual_print_date': None,
            'added_to_zip': False,
            'batch': '',
            'contact_id':None,
            'date_added': date,
            'date_updated': date,
            'email_only':False,
            'emailed':False,
            'esigned':False,
            'folder_id':None,
            'id': '6f22957c-de5a-426c-a819-ea94a0d25ac6',
            'isdir':False,
            'isphoto':False,
            'label':None,
            'mime_type': 'application/xml',
            'print_date':None,
            'print_location':None,
            'print_state': 'do not print',
            'private':False,
            'read_only':False,
            'received_meta_data': '',
            'reference_id':None,
            'revision_id':None,
            'size':9591,
            'sub_type':None,
            'successful_upload':False,
            'title': 'britecore_edocs_manual20180601.xml',
            'type': 'nxtech_edocs',
            'uploaded_by':None,
            'uploading_to_s3':False,
            'url': 'uploads/vendors/nxtech/edocs/britecore_edocs_manual20180601.xml',
            'vendor_upload':None,
            'virus_scan':False,
            'x_report_location_id':None
        },
        'success': True,
        'messages': []
    }
    

api.v2.vendors.ivans_file_upload(file_name=None, ivans_type=None)[source]

Uploads an XML file and all it’s related files/transactions into IVANS servers

Parameters:
  • file_name (str) – The name of the XML file record to be uploaded.
  • ivans_type (str) – The type of IVANS service. Value of type must be one of the following: claims, edocs, dbcs, transactions
Returns:

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

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

  • data (list of dict) – The data response having list of result uploads:

    {
        'data':[{
            'file_name': 'britecore_edocs_manual20180601.xml',
            'success': True
        }],
        'success': True,
        'messages': []
    }
    

api.v2.vendors.munichre_indepth_eligibility(property_id=None)[source]

Checks and returns indepth inland_flood eligibility

Parameters:property_id (str uuid) – uuid of a BriteCore property, must have core address fields defined
Returns:
  • success (bool) – True if successful, False if not
  • messages (list of str) – List of human readable messages
  • data (dict) – A dict containing the following data:
    KatRiskFloodScore: str
    1-10 score indicating how flood-prone a property is, 1 being least, 10 most
    FloodEligible: bool
    True means property is eligible for coverage, False means ineligible
    Message: str
    Human readable / user presentable message on whether / why not eligible
api.v2.vendors.update_value360_replacement_cost_value(report_id, result)[source]

Update the replacement cost value of a property from 360 Value valuation.

Parameters:
  • report_id (str) – UUID of a report that will be updated with the result received.
  • result (dict) – The replacement cost value and the valuation id are present in the result.
Returns:

  • success (bool) – True if successful, False if not
  • messages (list of str) – List of human readable messages
  • data (dict)