api.v2.policies module

api.v2.policies.add_external_policies_to_existing_groups(external_policies=None)[source]

Receives a list of external_policy dictionaries and assigns it to the included policy_group_id. :param external_policies: A list with the form:

::
[
{
policy_id: uuid, policy_group_id: uuid

]

Returns:
  • success (bool)
  • messages (list) – The sql error if one occurs, or a success message.
api.v2.policies.add_line_item(revision_id=None, property_id=None, sub_line_id=None, item_id=None, link_id=None, check_for_sub_line=False)[source]

Adds a Line Item to a revision/property.

Parameters:
  • revision_id (UUID) –
  • property_id (UUID (optional if adding at the revision level)) –
  • sub_line_id (UUID (optional if adding to an existing subline)) –
  • item_id (UUID) –
  • link_id (UUID (optional if being added by another item’s Underwriting Rules)) –
  • check_for_sub_line (bool (defaults to False)) – Set this to true if this item belongs in a subline that may not exist yet.
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:

    {
        'added_items': [
            {
                'id': UUID,
                'property_id': UUID,  # Only if this is a property item
                'revision_id': UUID,  # Only if this is a revision item
                'sub_line_instance_id': UUID,  # Only if this is on a sub line
                'item_id': UUID,
                'apply_date': date,
                'limit': Decimal('0.00'),
                'deductible': Decimal('0.00'),
                'written_premium': Decimal('0.00'),
                'annual_premium': Decimal('0.00'),
                'written_fee': Decimal('0.00'),
                'annual_fee': Decimal('0.00'),
                'manual': bool,
                'loss_exposure_group': int,
                'builder_obj': {},
                'link_obj: {},
                'rating_details: {},
                'date_added': date,
                'date_added_micro': str (microseconds),
                'prev_adj_amt': Decimal('0.00')
                'persist_status': ('normal', 'copied', 'conflicted', 'rejected', 'resolved')
                'resolved': bool,
                'status_reason': str,
                'allow_multiples': bool,
                'category': ('policy', 'property'),
                'description': str,
                'limit_availability': str,
                'mandatory': bool,
                'name': str,
                'show_in_builder': bool,
                'sort_order': int,
                'type': ('coverage', 'adjustment', 'nonRate',
                         'fee', 'calculation', 'dividend')
            }, ...
        ],
        'added_subline': {
            ...
        }
    }
    

api.v2.policies.add_policies_to_existing_groups(policies=None)[source]

Receives a list of policy dictionaries and assigns it to the given policy_group_id. :param policies: A list with the form:

::
[
{
policy_id: uuid, policy_group_id: uuid

},

]

Returns:
  • success (bool)
  • messages (list) – the sql error if one occurs, or a success message.
api.v2.policies.add_policies_to_new_group(policies=None)[source]

Receives a list of policy dictionary lists and adds each element to a policy group. :param policies: A list with the form:

::
[
[
{
policy_id: uuid, external_policy: bool(optional key)

]

Returns:
  • success (bool)
  • messages (list) – The sql error if one occurs, or a success message.
api.v2.policies.add_sub_line(revision_id=None, property_id=None, sub_line_id=None, link_id=None, optional_items=None)[source]

Adds a Sub Line to a revision/property.

Parameters:
  • revision_id (UUID) –
  • property_id (UUID) –
  • sub_line_id (UUID) –
  • link_id (UUID (optional if being added by another item’s Underwriting Rules)) –
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:

    {
        'id': UUID,
        'property_id': UUID,  # Only if this is a property sub line
        'revision_id': UUID,  # Only if this is a revision sub line
        'sub_line_id': UUID,
        'inheritance_id': UUID,
        'date_added': date,
        'date_added_micro': str (microseconds),
        'category': ('policy', 'property'),
        'default': bool,
        'mandatory': bool,
        'allow_multiples': bool,
        'name': str,
        'policy_type_id': UUID,
        'sort_order': int,
        'description': str,
        'type': ('liability', 'inland marine', 'property'),
        'persist_status': ('normal', 'copied', 'conflicted', 'rejected', 'resolved')
        'resolved': bool,
        'status_reason': str
    }
    

api.v2.policies.application_signature_event_callback(policy_id=None, signer_name=None, signature_url=None, event_type=None, file_id=None)[source]

Triggers processing for a created, signed, canceled or signed-by-all Policy Application.

Parameters:
  • policy_id (str) – Policy Id of the application associated with the signature.
  • signer_name (str) – The name of the contact who signed this Policy Application.
  • signature_url (str) – An URL where the signed document can view reviewed.
  • event_type (str) – The event type (created, signed, all_signed, or canceled).
  • file_id (str) –
Returns:

  • success (bool) – True if successful, False if not
  • message (str) – ‘Event processed’ if successful, else human-readable error message
  • data (None)

api.v2.policies.apply_pnc_lockbox_payment_transactions(transactions=None)[source]

Applies a collection of transaction records as accounted BriteCore payments.

Parameters:transactions (list of dict) –

Iterable containing dicts of the following format:

{
    # Reference to an existing policy number, cleared of
    # non-numerical characters (ex: the policy "P90-2010-8" would
    # be represented here as "9020108")
    "policy": str,

    # Code identifying the check to be processed.
    "check": str,

    # The amount to be payed (with precision: 0.00).
    "payment": decimal.Decimal,
}
Returns:
  • success (bool)
  • messages (list of strings) – List of human readable error messages filled only when success != True.
  • data (list of dict) – A list of dicts, containing the results of the individual attempts to apply the payment transactions. The result list is aligned to the input transactions list, meaning it is possible to zip(transactions, results) to analyze the results in respect to its input. Each contained element has the following format:
    {
        # Either "success" when the respective payment was correctly
        # applied or "error" when it was not.
        "result": str,
    
        # A human readable message detailing the result field in case its
        # value is different from "success".
        "detail": str
    }
    
api.v2.policies.async_request_loss_analysis(revision_id=None)[source]

Asynchronous request of loss analysis @param revision_id: UUID :returns: * data (dict)

  • The data response having the form

  • : – {

    ‘job_id’ uuid: ID of the async task

    }

api.v2.policies.bind(bind_info)[source]

Bind a policy from the API

Parameters:bind_info (dict) –

A list with the form:

{
    "policy_number": "10-2017-1001",
    "policy_id": "0fe6a7bf-bca7-4757-825c-7cc9bf90cfc0"
}
Returns:
  • success (bool) – True if successful, False if not
  • message (list of str) – Human-readable messages with error.
  • data (dict) – Description of response dictionary here.
api.v2.policies.cancel_policy(policy_id=None, policy_term_id=None, cancel_reason_id=None, cancel_date=None, cancel_pending_date=None)[source]

API v2 wrapper around lib.policies.views:cancelPolicy. Note that the underlying cancelPolicy() has the following side-effects: - policy_accounting.update_invoice_print_state - creates revision row for U(policy_id, policy_term_id) with policyStatusReasonID set to cancellation_reason_id and cancel date - updates cancelDate of other future committed revisions for this U(policy_id, policy_term_id) - creates account_history row - create_deliverable() - make_note()

Parameters:
  • policy_id (str) – The UUID of an existing policy
  • policy_term_id (str) – The UUID of an existing policy term
  • cancel_reason_id (str) – The UUID of an existing cancel reason
  • cancel_date (str) – A string representing the cancel date (“YYYY-MM-DD”). If cancel_pending_date is specified, that will take precendence over cancel_date.
  • cancel_pending_date (str) – A string representing the cancellation pending date (“YYYY-MM-DD”). If this is specified, put the policy into cancellation pending instead of canceling immediately.
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:

    {
        "success": bool,
        "message": str
    }
    

api.v2.policies.cancel_signature_request(signature_request_id=None)[source]

Cancel a signature request (embedded or email) using the id.

Parameters:signature_request_id (str) – Signature Request ID to be canceled.
Returns:
  • success (bool) – True if successful, False if not
  • message (str) – Human-readable messages with error or the request signature ID generated from external vendor like HelloSign.
api.v2.policies.copy_risk(from_risk_id=None, to_risk_id=None, copy_address=True, copy_rating=True, copy_mortgagees=False)[source]

Copies risk information from one risk to another.

Parameters:
  • from_risk_id (UUID) –
  • to_risk_id (UUID) –
  • copy_address (Optionally copies the address from (from_risk_id) to (to_risk_id), DEFAULT: True) –
  • copy_rating (Optionally copies the rating from (from_risk_id) to (to_risk_id), DEFAULT: True) –
  • copy_mortgagees (Optionally copies the mortgagees from (from_risk_id) to (to_risk_id), DEFAULT: False) –
Returns:

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

api.v2.policies.copy_sub_line(revision_id=None, property_id=None, sub_line_id=None, sub_line_instance_id=None, link_id=None, optional_items=None)[source]

Adds copy of a Sub Line to a revision/property.

Parameters:
  • revision_id (UUID) –
  • property_id (UUID) –
  • sub_line_id (UUID) –
  • sub_line_instance_id (UUID) –
  • link_id (UUID (optional if being added by another item’s Underwriting Rules)) –
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:

    {
        'id': UUID,
        'property_id': UUID,  # Only if this is a property sub line
        'revision_id': UUID,  # Only if this is a revision sub line
        'sub_line_id': UUID,
        'inheritance_id': UUID,
        'date_added': date,
        'date_added_micro': str (microseconds),
        'category': ('policy', 'property'),
        'default': bool,
        'mandatory': bool,
        'allow_multiples': bool,
        'name': str,
        'policy_type_id': UUID,
        'sort_order': int,
        'description': str,
        'type': ('liability', 'inland marine', 'property'),
        'persist_status': ('normal', 'copied', 'conflicted', 'rejected', 'resolved')
        'resolved': bool,
        'status_reason': str
    }
    

api.v2.policies.create_policy(policy_number=None, inception_date=None, term_type='1 Year', expiration_date=None, renewal_term_type='1 Year', is_renewal=False, underwriting_questions=None, as_agent=False, manual_policy_number=False, underwriting_options=None)[source]

Creates a new policy.

Parameters:
  • policy_number (str - defaults to the next system generated policy number) –
  • inception_date (str - (date string) - defaults to today) –
  • term_type (str - (‘Custom’, ‘3 Years’, ‘1 Year’, ‘9 Months’, ‘6 Months’, ‘3 Months’)) –
  • expiration_date (str - (date string) - required if term_type is ‘Custom’) –
  • renewal_term_type (str - (‘3 Years’, ‘1 Year’, ‘9 Months’, ‘6 Months’, ‘3 Months’)) –
  • is_renewal (bool - optional, if the policy should be processed as a renewal) –
  • underwriting_questions (list - optional, if enforcing underwriting questions) –
  • underwriting_options (list - optional, if enforcing underwriting options) –
  • as_agent (bool - if true, creator and agent relations are based on logged in user) –
  • manual_policy_number (bool - indicates whether the policy number was manually assigned) –
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:

    {'policy_id': UUID,
     'revision_id': UUID,
     'policy_term_id': UUID,
     'policy_number': str, (System generated number if none provided)
     'revision_data': {*see retrieve_revision_details*}
     'policy_contacts' : {}}
    

api.v2.policies.create_policy_from_britequote(quote, inception_date, term_type)[source]

Creates a Policy from a BriteQuote unified risk state object.

Parameters:quote (dict) – A quote externally rated from containing data such as all risks, fields, items, and premiums.
api.v2.policies.create_quote(quote_info)[source]

Create a quote from the API

Parameters:quote_info (dict) –

A object with the form:

{
    "underwriting_questions": [
        {
            "questionId": "UUID-1",
            "yesNoAnswer": "no",
            "explanation": ""
        },
        {
            "questionId": "UUID-2",
            "yesNoAnswer": "no",
            "explanation": ""
        }
    ],
    "named_insured": "My Software Company, Inc.",
    "named_insured_type": "organization",
    "named_insured_address":
    {
        "address_line1": "30 Marion Ave",
        "address_line2": "",
        "address_city": "Albany",
        "address_state": "NY",
        "address_county": "Albany",
        "address_country": "USA",
        "address_zip": "12203",
        "latitude": 42.6652464,
        "longitude": -73.80048369999997
    },
    "line_name": "Worker's Compensation",
    "policy_type_name": "Workers' Compensation",
    "effective_date": "10/26/2017",
    "agency_id": "a389bda2-9a6e-478c-9820-6254a3fb659b",
    "agent_id": "565014b2-12b1-4678-ac52-fa6e2715cee5",
    "activated": false,
    "locations": [
        {
            "address_line1": "30 Marion Ave",
            "address_line2": "",
            "address_city": "Albany",
            "address_state": "NY",
            "address_county": "Albany",
            "address_county_specify": "",
            "address_country": "USA",
            "address_zip": "12203",
            "latitude": 42.6652464,
            "longitude": -73.80048369999997
        }
    ],
    "items": [
        {
            "name": "Policy Information",
            "questions": {
                "Market Segment": "",
                "Standard Industrial Classification (SIC)": "7371 Computer Programming Services",
                "Each Accident Limit/Disease-Policy Limit/Disease-Each Employee Limit": "$500,000/$500,000/$500,000"
            }
        },
        {
            "name": "Class Code",
            "questions":
            {
                "Payroll Amount": "100000",
                "# Full Time Employees": "1",
                "# Part Time Employees": "",
                "Occupation": "8810 Clerical Office Employees NOC",
                "If Any": "No"
            }
        },
        {
            "name": "Coverage A",
            "limit": 100000
        }
    ],
    "soft_geoservice_bypass": False,
    "hard_geoservice_bypass": False
}
Returns:
  • success (bool) – True if successful, False if not
  • message (list of str) – Human-readable messages with error.
  • data (dict) – ::
    {
    “quote_number”: “Quote-2017-0000001”, “policy_id”: “POLICY-UUID”, “total”: {
    “pro_rata_fees”: 69.00, “pro_rata_premium”: 861.00, “pro_rata_total”: 930.00, “annual_fees”: 69.00, “annual_premium”: 861.00, “annual_total”: 930.00

    }, “items”: [

    {
    “name”: “Policy Information”, “pro_rata_amount”: 0.00, “annual_amount”: 0.00

    }, {

    “name”: “Class Code”, “pro_rata_amount”: 861.00, “annual_amount”: 861.00

    }

    ]

    }

api.v2.policies.create_quote_extended(quote_info, requote=False)[source]

Create a new quote using the API.

  • Advanced settings application-future-date-bound and application-past-date-bound will be enforced if the API key used is not associated with an “Administrator” contact.
quote_info: dict:

A dict having the form:

{
    "effective_date": "MM/DD/YYYY",
    "line_name": "line name",
    "policy_type_name": "policy type name",
    "underwriting_options": [{
        "answer": "answer",
        "optionId": "option id"
    }],
    "underwriting_questions": [{
        "questionId": "question id",
        "yesNoAnswer": "no",
        "explanation": "explanation"
    }],
    "named_insureds": [{
        "name": "name",
        "type": "organization",
        "fein_tax": "1234567",
        "ssn": "001112222",
        "date_business_started": "MM/DD/YYYY", // optional
        "legal_entity_type": "legal entity type", // optional
        "phones": [{ // optional
            "number": "1234567890",
            "type": "work"
        }],
        "emails": [{ // optional
            "email": "test@example.com",
            "type": "work"
        }],
        "addresses": [
            {
                "address_line1": "address line 1",
                "address_line2": "",
                "address_city": "city",
                "address_state": "NY",
                "address_county": "county",
                "address_country": "USA",
                "address_zip": "12208",
                "type": "Mailing"
            }
        ]
    }],
    "agency_id": "uuid",
    "agent_id": "uuid",
    "locations": [{
        "address_county_specify": "",
        "address_line1": "address line 1",
        "address_line2": "",
        "address_city": "city",
        "address_state": "NY",
        "address_county": "county",
        "address_country": "USA",
        "address_zip": "12208",
        "primary": true
    }],
    "items": [{
        "name": "name",
        "questions": {
            "question 1": "answer 1",
            "question 2": "answer 2",
        },
        "rating_details": ["rating_detail_type"], // optional
        "identifier": "question 1" // optional
    }],
    "activated": false,
    "soft_geoservice_bypass": false,
    "hard_geoservice_bypass": false
}
Returns:
  • success (bool) – True if successful, False if not
  • message (list of str) – Human-readable messages with error.
  • data (dict) – A dict having the form:
    {
    
    “quote_number”: “quote number”, “items”: [{
    “annual_amount”: 0.0, “name”: “item name”, “pro_rata_amount”: 0.0, “rating_details”: [{“rating_detail_type”: running_total}] “identifier”: “identifier if the optional parameter is given”

    }], “total”: {

    “annual_fees”: 0.0, “pro_rata_premium”: 0.0, “annual_total”: 0.0, “pro_rata_total”: 0.0, “annual_premium”: 0.0, “pro_rata_fees”: 0.0

    }, “forms”: [{

    “edition_number”: “edition number”, “description”: “form description”, “form_code”: “form code”

    }], “policy_id”: “policy id”, “stp”: {

    “ran”: true, “success”: true, “details”: []

    }

    }

api.v2.policies.create_risk(revision_id=None)[source]

Creates a new risk (property) for the given revision.

Parameters:revision_id (UUID) –
Returns:
  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data – The data response having the form:
    {
        'id': UUID,
        'revision_id': UUID,
        'name': str ("Property #"),
        'address_state': str ("MO")
    }
    
api.v2.policies.delete_external_policies(policies=None)[source]

Receieves a list of external policies to be deleted.

Parameters:policies (list) – A list of policy numbers:
Returns:
  • success (bool)
  • messages (list of str)
  • data (list of external policy numbers(if an exception is raised))
api.v2.policies.get_policies(contact_id, from_date=None, to_date=None, sorting_order='asc', page_number=1, page_size=50, include_policy_photo=True)[source]

Retrieves paginated policies related to contact.

Parameters:
  • contact_id (str) – Filter policies by contact_id
  • from_date (date) – Filter policies where date_added > from_date
  • to_date (date) – Filter policies where date_added < from_date
  • sorting_order (str) – Ascending/descending order. Choices {‘asc’, ‘desc’}
  • page_number (int) – Page number,starting from 1
  • page_size (int) – Page size, must be >0
  • include_policy_photo (bool) – Include policies photo (entity size will be increased dramatically!)
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:

    {
        "include_policy_photo": true,
        "from_date": null,
        "sorting_order": "asc",
        "to_date": null,
        "policies": [
          {}
        ],
        "page_number": 1,
        "page_size": 50,
        "total_pages": 1,
        "contact_id": "7487d974-dbb5-4f8a-ab45-2f93ef92eb49"
    }
    

api.v2.policies.get_policies_by_contact_id_db_query(contact_id)[source]
api.v2.policies.get_policies_with_active_current_revision(policies)[source]
api.v2.policies.get_signable_deliverable_names()[source]
api.v2.policies.issue(issue_info)[source]

Issue a policy from the API

Parameters:issue_info (dict) –

A dict of the form:

{
    "policy_id": UUID,  # Optional if policy_number is present
    "policy_number": str,  # Optional, policy_id gets priority
}
Returns:
  • success (bool) – True if successful, False if not
  • message (list of str) – Human-readable messages with error.
  • data (dict) – A dict of the form:
    {
        "policy_number": str,
        "policy_id": UUID,
        "commission_rate": float,
        "override_commission": bool
    }
    
api.v2.policies.mark_file_as_signed(file_id)[source]

Use this function for marking file in files table signed e.g. esigned=True after all participants signed document.

Parameters:file_id – string.
Returns:None
api.v2.policies.new_policy_information()[source]

Retrieves information required to create a new policy.

Parameters:None
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:
    {
        'next_policy_number': '{PREFIX}-YEAR-{INCREMENT}',
        'effective_dates': [
            {
                'id': UUID,
                'description': str,
                'creation_date': 'YYY-MM-DD',
                'effective_date': 'YYYY-MM-DD',
                'change_history': [],
                'override_lock': bool
            }
        ]
    }
    
api.v2.policies.post_external_policies(policies=None)[source]

Inserts one or more external policy records. :param policies: The data input having the form:

:: [

{
“policy_number”: str, “policy_type_id”: UUID, “other_details”: {“some: details”}

},

]

Note

policyNumber is a required parameter. This method is intended to create new records only, if the provided policyNumber already exists the insert action will be skipped.

Returns:
  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (dict) – inserted: List of policies that were successfully inserted failed: List of policies that failed validation or were rejected by the db
api.v2.policies.rate_revision(revision_id=None)[source]

Calculates a rate for the given revision. :param revision_id: :type revision_id: str, uuid of the target revision

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:
    {
        'annual_fee': Decimal,
        'annual_premium': Decimal,
        'written_fee': Decimal,
        'written_premium': Decimal,
        'items': []
        'sub_lines': []
    }
    
api.v2.policies.rate_risk(risk_id=None)[source]

Calculates a rate for the given risk. :param ‘risk_id’: :type ‘risk_id’: UUID

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:
    {
        'annual_fee': Decimal,
        'annual_premium': Decimal,
        'written_fee': Decimal,
        'written_premium': Decimal,
        'items': []
        'sub_lines': []
    }
    
api.v2.policies.request_deliverable_signature(policy_id=None, sign_mode=None)[source]

Creates a new request for electronic signature of a Policy Application via email.

Parameters:
  • policy_id (str) – Policy ID of application to be emailed for electronic signature.
  • sign_mode (str) – The sign mode either ‘embedded’ or ‘mail’.
Returns:

  • success (bool) – True if successful, False if not
  • message (str) – Human-readable messages with error or the request signature ID generated from an external vendor like HelloSign.
  • data (list of str) – Signature Request generated from an external vendor like HelloSign.

api.v2.policies.requote_extended(quote_info)[source]

Delete a previous quote and create a new quote.

Parameters:quote_info (dict:) –

A dict having the form:

{
    "policy_number": "policy number",
    "effective_date": "MM/DD/YYYY",
    "line_name": "line name",
    "policy_type_name": "policy type name",
    "underwriting_options": [{
        "answer": "answer",
        "optionId": "option id"
    }],
    "underwriting_questions": [{
        "questionId": "question id",
        "yesNoAnswer": "no",
        "explanation": "explanation"
    }],
    "named_insureds": [{
        "name": "name",
        "type": "organization",
        "fein_tax": "1234567",
        "ssn": "001112222",
        "date_business_started": "MM/DD/YYYY", // optional
        "legal_entity_type": "legal entity type", // optional
        "phones": [{ // optional
            "number": "1234567890",
            "type": "work"
        }],
        "emails": [{ // optional
            "email": "test@example.com",
            "type": "work"
        }],
        "addresses": [
            {
                "address_line1": "address line 1",
                "address_line2": "",
                "address_city": "city",
                "address_state": "NY",
                "address_county": "county",
                "address_country": "USA",
                "address_zip": "12208",
                "type": "Mailing"
            }
        ]
    }],
    "agency_id": "uuid",
    "agent_id": "uuid",
    "locations": [{
        "address_county_specify": "",
        "address_line1": "address line 1",
        "address_line2": "",
        "address_city": "city",
        "address_state": "NY",
        "address_county": "county",
        "address_country": "USA",
        "address_zip": "12208"
    }],
    "items": [{
        "name": "name",
        "questions": {
            "question 1": "answer 1",
            "question 2": "answer 2",
        },
        "identifier": "question 1" // optional
    }],
    "activated": false
}
Returns:
  • success (bool) – True if successful, False if not
  • message (list of str) – Human-readable messages with error.
  • data (dict) – Description of response dictionary here.
    {
    “quote_number”: “quote number”, “items”: [{
    “annual_amount”: 0.0, “name”: “item name”, “pro_rata_amount”: 0.0, “identifier”: “identifier if the optional parameter is given”

    }], “total”: {

    “annual_fees”: 0.0, “pro_rata_premium”: 0.0, “annual_total”: 0.0, “pro_rata_total”: 0.0, “annual_premium”: 0.0, “pro_rata_fees”: 0.0

    }, “forms”: [{

    “edition_number”: “edition number”, “description”: “form description”, “form_code”: “form code”

    }], “policy_id”: “policy id”

    }

api.v2.policies.reset_revision_premium(revision_id=None)[source]

Clears the calculated premium for the given revision

Parameters:revision_id (UUID) –
Returns:
  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (dict) – The data response, currently empty
api.v2.policies.reset_risk_premium(risk_id=None)[source]

Clears the calculated premium for the given risk

Parameters:risk_id (UUID) –
Returns:
  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (dict) – The data response, currently empty
api.v2.policies.retrieve_account_history(policy_id=None, policy_term_id=None, filter_dict=None, current_page=1, page_size=50)[source]
Retrieves account payment history details for a given policy_id and policy_term_id,
optionally taking in filter paramaters.
Parameters:
  • policy_id (str) – The UUID of an existing policy. Either this parameter or policy_term_id must be provided. If only a policy_id is provided, the currently active term (inferred based on today’s date) will be used. If a policy_term_id is provided, a policy_id can be provided but is never needed because a term associates with only one policy.
  • policy_term_id (str) – The UUID of an existing policy term. Either this parameter or policy_id must be provided. If only a policy_id is provided, the currently active term (inferred based on today’s date) will be used. If a policy_term_id is provided, a policy_id can be provided but is never needed because a term associates with only one policy.
  • filter_dict (dict) – Optional. A dictionary passed to the underlying function core.db.filter_by_date() containing date parts to filter by; keys in the form ‘(from|to)(Day|Month|Year)’. Example: ‘fromDay’.
  • current_page (int) – Default is 1. An integer of representing the set to view if results are paginated.
  • page_size (int) – Default is 50. An integer representing the number of results to show per page.
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:

    {
        "activePage": int,
        "maxPages": int,
        "records": [
              {
                "fileKey": uuid,
                "amount": float,
                "icon": str,
                "date": date,
                "data": {
                      "amount": float,
                      "schedule": {
                            "Premium": float,
                            "Installment Fee": float,
                            "Custom Fees": float
                      },
                      "details": {
                            "showDelete": bool,
                            "cancelDate": date,
                            "paidInFull": bool,
                            "billDate": date,
                            "description": str,
                            "generatedBy": str,
                            "policyStatus": str,
                            "showEditAndReprint": bool,
                            "dirty": bool,
                            "showWaive": bool,
                            "dueDate": date
                      }
                },
                "balance": float,
                "type": str,
                "id": uuid,
                "summary": str
              }
          ]
    }
    

api.v2.policies.retrieve_billing_schedule_options(policy_number)[source]

Retrieves the list of billing schedules associated to a given policy through its policy life cycle.

Parameters:policy_number (str) – Policy number of the target policy
Returns:
  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (list of dict) – A list containing information on the related billing schedules
    {
        "installments": [{    # preview of billing schedule installments
            "amountDue": decimal,
            "billDate": str,
            "dueDate": str,
            "details": [
                {
                    "amount": decimal,
                    "type": "Premium"
                },
                {
                    "amount": decimal,
                    "type": "Premium Fully Earned"
                },
                {
                    "amount": decimal,
                    "type": "Premium Fully Billed"
                },
                {
                    "amount": decimal,
                    "type": "Custom Fee Fully Earned"
                },
                {
                    "amount": decimal,
                    "type": "Custom Fee Fully Billed"
                },
                {
                    "amount": decimal,
                    "type": "Custom Fee Prorata"
                },
                {
                    "amount": decimal,
                    "type": "Installment Fee"
                }
            ]
        }],
        "id": str,          # UUID of the billing schedule
        "label": str        # name of the billing schedule
    }
    
api.v2.policies.retrieve_files_pending_signature(policy_id=None)[source]

Retrieve files that should be signed.

Retrieves all signable custom deliverables pending signature for given policy. :param policy_id: string. :return: json-encoded dict

api.v2.policies.retrieve_pnc_lockbox_matchfile_info()[source]

Retrieves the required data to generate PNC’s lockbox matchfile

Returns:
  • success (bool)
  • messages (list of strings) – List of human readable error messages filled only when success != True.
  • data (list of dict) – A list of dicts, in the following format:
    {
        # The policy number, target of the respective payment.
        "policy_number": str,
    
        # The amount due for the given policy, in pennies.
        "current_due_amount": int,
    
        # The minimum acceptable payment amount for the given policy, in pennies.
        "minimum_acceptable_amount": int,
    
        # A flag to inform PNC whether to reject the given payment without questioning.
        "always_reject_flag": bool,
    }
    
api.v2.policies.retrieve_policy(policy_id=None, policy_number=None)[source]

Retrieves top-level information about a policy

Parameters:
  • policy_id (str) – The UUID of the existing Policy
  • policy_number (str) – The policy number of the existing Policy
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:

    {
        'id': 'UUID',
        'policy_number': '2015-01-01',
        'active': boolean,
        'rewritten': boolean,
        'date_added': 'MM/DD/YYYY',
        'show_app': boolean,
        'policy_group_id': 'UUID',
        'copied_from_rev_id': 'UUID',
        'copied_to_rev_id': 'UUID',
        'flag': 'white/orange/black',
        'inception_date': 'MM/DD/YYYY',
        'system_tags': [
            {'id': 'UUID',
             'name': 'System Tag Name',
             'value': 'System Tag Value'},
        ],
        'submit_bound': boolean,
        'submit_receipt_email': 'email',
        'submit_receipt_name': 'name',
        'submit_confirm_email': 'email',
        'submit_confirm_name': 'name',
        'active_revision': {},
        'active_policy_term': {},
        'britecore_claims': [],
        'policy_contacts' : {}
    }
    

api.v2.policies.retrieve_policy_terms(policy_id=None, policy_number=None)[source]

Retrieves policy terms and their revisions for a policy :param policy_id: The UUID of an existing Policy. :type policy_id: str :param policy_number: The policy number of an existing Policy. Looks up the revisions by

this parameter if policy_id is not given.
Returns:
  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (list) – The data response having the form:
    [
        {
            'id': UUID,
            'policy_id': UUID,
            'effective_date': 'YYYY-MM-DD',
            'expiration_date': 'YYYY-MM-DD',
            'is_renewal': bool
            'term_length': int,
            'term_type': ('3 Years', '1 Year', 'Annual', '9 Months',
                          '6 Months', '3 Months', '1 Month', 'Monthly', 'Custom'),
            'renewal_type': ('3 Years', '1 Year', 'Annual', '9 Months',
                             '6 Months', '3 Months', '1 Month', 'Monthly'),
            'renewal_status': '',
            'renewal_status_reason_id': UUID,
            'renewal_status_description': '',
            'manual_reason': '',
            'revisions': [{
                'id': 'UUID',
                'policy_id': 'UUID',
                'policy_term_id': 'UUID',
                'cancel_date': 'YYYY-MM-DD',
                'commission_rate': 0.0,
                'commit_date': 'YYYY-MM-DD',
                'create_date': 'YYYY-MM-DD',
                'date_archived': 'YYYY-MM-DD HH:MM:SS',
                'end_date': 'YYYY-MM-DD',
                'dec_description': '',
                'description': '',
                'written_fee': 0.0,
                'written_premium': 0.0,
                'annual_fee': 0.0,
                'annual_premium': 0.0,
                'grant_mortgagee_extension': Boolean,
                'override_commission': Boolean,
                'policy_status': '',
                'policy_status_reason_id': 'UUID',
                'print_dec': Boolean,
                'revision_date': 'YYYY-MM-DD',
                'revision_state': ('open', 'committed', 'archived', 'pending'),
                'underwriting_questions': [],
                'underwriting_contacted': Boolean,
                'underwriting_contacted_date': 'YYYY-MM-DD',
                'builder_pending': Boolean,
                'credit_report_permissions': {}
            }]
        }
    ]
    
api.v2.policies.retrieve_potential_policies_payors(policy_numbers)[source]

Retrieves a list of of potential payors for the given set of policies.

Parameters:policy_numbers (list of str) – List containing the policy numbers of the target policies
Returns:
  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (list of dict) – A list containing information on the related contact
    {
        "policy_id": str,      # the respective policy id
        "policy_number": str,  # the respective policy number
        "contact_id": str,     # id of the contact
        "contact_name: str,    # name of the contact
        "contact_role": str,   # str pointing out the nature of the relationship between
                               #  the policy and the contact, from the following alternative
                               #  list: ['named_insured', 'finance_company', 'addtl_interest',
                               #  'mortgagee' ]
    }
    
api.v2.policies.retrieve_rates_for_quote(revision_id=None, rating_specs=None)[source]

Rates the given revision multiple times parametrizing calculations according to the given collection of rating specifications. Does not mutate the revision.

Experimental Endpoint: specific to velocity, CPU intensive, not generic for all clients.

Parameters:
  • revision_id (str) – Revision ID (UUID)
  • rating_specs (list of dict) – Parametrization instructions to build the array of calculated premiums. Format: WIP
api.v2.policies.retrieve_revision_analysis(revision_id=None)[source]

Return straight through processing info like status and the details if failed. @param revision_id: UUID

Returns:
  • data (dict)
  • The data response having the form
  • : – {
    “stp_success”: bool, “stp_details”: list of dictionaries like
    [{“rule_name”:”rule_name-test1a”, “details”:”details-test2a”},
    {“rule_name”:”rule_name-test1b”, “details”:”details-test2b”}]

    }

api.v2.policies.retrieve_revision_details(revision_id=None)[source]

Retrieves details for a specified revision

Parameters:revision_id (str) – The UUID of an existing Policy
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:
    {
        'id': 'UUID',
        'policy_id': 'UUID',
        'policy_term_id': 'UUID',
        'policy_term_start': 'YYYY-MM-DD',
        'policy_term_end': 'YYYY-MM-DD',
        'cancel_date': 'YYYY-MM-DD',
        'commission_rate': 0.0,
        'commit_date': 'YYYY-MM-DD',
        'create_date': 'YYYY-MM-DD',
        'date_archived': 'YYYY-MM-DD HH:MM:SS',
        'dec_description': '',
        'description': '',
        'written_fee': 0.0,
        'written_premium': 0.0,
        'annual_fee': 0.0,
        'annual_premium': 0.0,
        'grant_mortgagee_extension': Boolean,
        'override_commission': Boolean,
        'policy_status': '',
        'policy_status_reason_id': 'UUID',
        'policy_type': '',
        'print_dec': Boolean,
        'revision_date': 'YYYY-MM-DD',
        'revision_state': ('open', 'committed', 'archived', 'pending'),
        'underwriting_questions': [],
        'underwriting_contacted': Boolean,
        'underwriting_contacted_date': 'YYYY-MM-DD',
        'builder_pending': Boolean,
        'credit_report_permissions': {},
        'additional_interests': [],
        'agents': [],
        'mortgagees': [],
        'named_insureds': []
    }
    
api.v2.policies.retrieve_risk_details(risk_id=None)[source]
Retrieves risk details similar to details in retrieve_risks,
but with the addition of extra details like mortgagees and rating information
Parameters:risk_id (str) – The UUID of an existing risk
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:
    {
        'id': 'UUID',
        'address_accuracy': ('poor', 'fair', 'great'),
        'address_city': 'City Name',
        'address_line1': 'Line 1',
        'address_line2': 'Line 2',
        'address_state': 'NY',
        'address_zip': '12345',
        'county': {'name': '', 'code': '', 'id': 'UUID'},
        'county_specification': {'name': '', 'code': '', 'id': 'UUID'},
        'copy_address': bool,
        'date_added': datetime,
        'fire_district': '',  # only if manual protection classes are used
        'fire_district_distance': decimal,
        'flag': ('white', 'orange'),
        'gross_area': '',
        'hydrant_distance': int,
        'inspection_requested_date': date,
        'latitude': decimal,
        'longitude': decimal,
        'loss_history_report_content': '',
        'loss_history_report_number': '',
        'name': 'Property Nickname',
        'next_inspection_date': date,
        'property_val': '',
        'iso_pc_data': {},
        'replace_contents': '',
        'replace_loss': '',
        'replace_other': '',
        'approved_limits': {},
        'revision_id': 'UUID',
        'stories': '',
        'type': '',
        'year_built': '',
        'items': [],
        'sub_lines': [],
        'question_groups': {},
        'mortgagees': [],
        'inspectors': [],
        'photos': [],
        'disclosures': [],
        'loss_history': [],
        'loss_history_date_pulled': '',
        'britecore_claims': [],
        'flood_zone_code': '',
        'distance_to_coast': ''
    }
    
api.v2.policies.retrieve_risks(revision_id=None, page=0, page_size=10, retrieve_remaining=False, order_by='name')[source]

Retrieves paginated/filtered risks for a revision

Parameters:
  • revision_id (str) – The UUID of an existing Revision
  • page (int) – The page number of results, defaults to 0
  • page_size (int) – The maximum number of results per page, defaults to 10
  • retrieve_remaining (bool) – Override page_size and get all remaining properties
  • order_by (str) – The attribute used to sort properties, defaults to ‘name’
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:

    {
        'page': int,
        'page_size': int,
        'total_size': int
        'results': [
            {
                'id': 'UUID',
                'address_accuracy': ('poor', 'fair', 'great'),
                'address_city': 'City Name',
                'address_line1': 'Line 1',
                'address_line2': 'Line 2',
                'address_state': 'NY',
                'address_zip': '12345',
                'address_county': 'UUID',
                'county_specify': 'UUID',
                'county': {'name': '', 'code': '', 'id': 'UUID'},
                'county_specification': {'name': '', 'code': '', 'id': 'UUID'},
                'copy_address': bool,
                'date_added': datetime,
                'fire_district_distance': decimal,
                'flag': ('white', 'orange'),
                'gross_area': '',
                'hydrant_distance': int,
                'inspection_requested_date': date,
                'latitude': decimal,
                'longitude': decimal,
                'loss_history_report_content': '',
                'loss_history_report_number': '',
                'name': 'Property Nickname',
                'next_inspection_date': date,
                'property_val': '',
                'iso_pc_data': {},
                'replace_contents': '',
                'replace_loss': '',
                'replace_other': '',
                'approved_limits': {},
                'revision_id': 'UUID',
                'stories': '',
                'type': '',
                'year_built': '',
                'flood_zone_code': '',
                'builder_ready_to_rate': '',
                'distance_to_coast': ''
            }
        ]
    }
    

api.v2.policies.retrieve_signature_requests(policy_id=None)[source]

Retrieves existing electronic signatures for a policy.

Parameters:policy_id (str) – The ID of the policy associated with the electronic signatures.
Returns:
  • success (bool) – True if successful, False if not
  • message (str) – Human-readable messages with error.
  • data (dict) – Response data my vary among different electronic signature vendors. However everything is inside the “signature_requests” key containing a sub dict under the key “signatures”. Required for “signature_requests”: id, is_canceled, is_complete, is_embedded, doc_type Required for “signatures”: id, iframe_url, signer_email_address, signer_name, status_code This is an example for HelloSign:
    {
    “signature_requests”: [{
    “id”: “SIGNATURE_REQUEST”, # required “is_canceled”: false, # required “is_complete”: false, # required “is_embedded”: false, # required “doc_type”: “Policy Application”, # required “created_at”: “Wed, 21 Dec 2016 17:30:36 GMT”, “file_id”: “80878993-7991-48ac-b166-99e0f3ed6753”, “files_url”: “https://api.hellosign.com/v3/signature_request/files/ID”, “has_error”: false, “message”: “Please review thoroughly this policy application and sign it.”, “modified_at”: “Wed, 21 Dec 2016 17:30:36 GMT”, “policy_id”: “POLICY_EMAIL”, “policy_number”: “10-2016-335”, “requester_email_address”: “underwriting@petersoninsurance.com”, “signatures”: [{
    “id”: “SIGNATURE”, # required “iframe_url”: “http://hellosign-dev.britecorepro.com/embedded_sign/ID?client=britecore”, # required “signer_email_address”: “peter@peterson.com”, # required “signer_name”: “Peter Peterson”, # required “status_code”: “awaiting_signature”, # required “created_at”: “Wed, 21 Dec 2016 17:30:36 GMT”,

    }], “signing_url”: null, “subject”: “Policy application signature request”, “title”: “Policy Application 10-2016-335”

    }], “success”: true

    }

api.v2.policies.search(search_string='', statuses=None, policy_types=None, revision_states=None, sort_obj=None, current_page=1, page_size=25)[source]

Returns a JSON string containing the policies matching the search string entered by the user.

Parameters:
  • search_string (str) – Value to search for
  • statuses (list) –

    A list specifying the statuses to filter by such as

    ["Unsubmitted","Submitted"]
    
  • policy_types (list) –

    A list specifying the policy types to filter by such as

    ["CT-HO3","Homeowners HO3 - Test"]
    
  • revision_states (list) –

    A list specifying the revision states to filter by such as

    ["archived","open"]
    
  • sort_obj (dict) –

    A dict with the field and order keys indicating the column to sort by and the sorting order such as

    {
    "field":"policy_number",
    "order":"asc"
    }
    
  • current_page (int) – The page number to be retrieved, useful for pagination and going to a specific page in the results
  • page_size (int) – The number of results per page
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 following format.:

    {
        "activePage": int,
        "maxPages": int,
        "records": [
            {
                "status": ('Active', 'Unsubmitted', 'Submitted',
                            'Rejected', 'Cancelled', 'Expired'),
                "namedInsured": str,
                "expirationDate": MM/DD/YYYY,
                "policyId": UUID,
                "flag": "white",
                "policyType": str,
                "policyNumber": str,
                "effectiveDate": MM/DD/YYYY
            }
        ]
    }
    

api.v2.policies.update_builder_ready_to_rate(revision_id=None, property_id=None, is_completed=None)[source]

Updates an existing property/revision’s builderReadyToRate flag. :param property/revision: :type property/revision: dict :param ‘property_id’: :type ‘property_id’: UUID, # only if updating a property :param ‘revision_id’: :type ‘revision_id’: UUID, # only one of these ids is necessary :param ‘is_completed’: :type ‘is_completed’: bool

Returns:
  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
api.v2.policies.update_effective_and_expiration_date(policy_id=None, effective_date=None, expiration_date=None, policy_term_type=None, policy_type_id=None)[source]

Updates the effective date, expiration date and policy term. It also finds the related policy term length and updates the same. :param policy_id: :type policy_id: UUID of specific policy. :param effective_date: :type effective_date: The effective date given by user. Date should be in the format YYYY-MM-DD. :param expiration_date: :type expiration_date: The expiration date given by user. Date should be in the format YYYY-MM-DD. :param policy_term_type: :type policy_term_type: The term type for the specific policy. :param policy_type_id: :type policy_type_id: The policy type id for the selected line.

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:
    {
        "policy_term": The deduced policy term,
        "effective_date": The updated effective date,
        "expiration_date": The updated expiration date,
        "term_length": The updated term length
    }
    
api.v2.policies.update_inactive_policy_groups(group_ids=None)[source]

Take an iterable of policy_group_ids, determine which policy groups are inactive (have fewer than at least two policies), remove the policy_group_id from each associated policy, and delete each inactive policy group.

Parameters:group_ids (iterable) – An iterable of group id strings.
Returns:
  • success (bool)
  • messages (list) – The sql error if one occurs, or a success message.
api.v2.policies.update_mortgagee_information(x_contact_reference=None, mortgagee_info=None)[source]

Updates mortgagee specific information as related to a property.

Parameters:
  • x_contact_reference (UUID) – The id connecting the contact to the property
  • mortgagee_info (dict) –

    Mortgagee information of the form:

    {
        'description': str,
        'loan_num': str,
        'type': str,
        'dec_mort_statement': str
    }
    

Note

If any key in mortgagee_info is empty, we assume you want to clear it. If you do not want to clear a field, leave the key out of your request. In other words, every key/value pair you send will be checked for discrepencies with the current data, and changes will be made.

Returns:
  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (dict) – Echoes the updated mortgagee record
api.v2.policies.update_policy_last_visited(policy_id=None, params=None)[source]

Updates the policy with the last visited step data, called when an agent first lands on one of the wizard steps. At the moment , update will fully overrite existing data.

Parameters:
  • policy_id (str) – Policy ID (UUID)
  • params (dict) –

    A dictionary containing params to store.

    {
        "lastBriteQuoteWizardURL": str,       # Last visited URL of quoting wizard,
        "lastBriteQuoteWizardStepId": str,    # Last visited step of wizard
    }
    
api.v2.policies.update_primary_property(property_id)[source]

Update primary property of revision with this function.

Parameters:property_id (uuid) – The id of property which will be added as primary property
Returns:
  • success (bool) – True if successful, false if not
  • messages (str) – Human-readable error messages
api.v2.policies.update_property_location(location={}, soft_geoservice_bypass=False, hard_geoservice_bypass=False)[source]

Updates an existing property’s location details.

Parameters:
  • location (dict) –

    The data input having the form:

    {
        'id': UUID,
        'name': str,
        'address_line1': str,
        'address_line2': str,
        'address_city': str,
        'address_zip': str,
        'address_county': UUID,
        'county_specify': UUID,
        'latitude': float,
        'longitude': float,
        'copy_address': bool,
        'flood_zone_code': str,
        'distance_to_coast': str
        'year_built': str,
        'primary': bool
    }
    
  • soft_geoservice_bypass (bool) – If all location fields are present (lat/long, county, city, zip), then trust these values and do not hit the geo-service processes.
  • hard_geoservice_bypass (bool) – Regardless of potentially-lacking address fields, do not hit geo-service processes.

Note

Besides the UUID, if any key is empty, we assume you want to clear it. If you do not want to clear a field, leave the key out of your request. In other words, every key/value pair you send will be checked for discrepencies with the current data, and changes will be made.

Returns:
  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (dict) – Echoes the updated information, complete with the rest of the property information
api.v2.policies.update_property_sub_line_name(property_sub_line_id=None, property_sub_line_name=None)[source]

Change name of property sub line with this function.

Parameters:
  • property_sub_line_id (uuid) – The id of property which name will be updated
  • property_sub_line_name (str) – The name that should be written in property sub lines name
api.v2.policies.update_rating_information(property_id=None, revision_id=None, items=None, reset_premiums=True, update_review=True)[source]

Updates an existing property/revision’s rating information. :param property/revision: :type property/revision: dict :param ‘property_id’: :type ‘property_id’: UUID, # only if updating a property :param ‘revision_id’: :type ‘revision_id’: UUID, # only one of these ids is necessary :param ‘items’: {

‘id’: UUID, ‘limit’: 0.00, ‘deductible’: 0.00, ‘manual’: boolean, ‘annual_premium’: 0.00, # only if manually rated ‘loss_exposure_group’: int, ‘builder_obj’: {

‘categories’: {‘Category Name’: ‘value’}, ‘overrideCategories’: [], ‘questions’: {UUID: []}, ‘lossPayees’: {}

}

}

Parameters:
  • ]
  • 'reset_premiums' (bool # set to False if premiums should not be reset) –

Note

If any key is empty, we assume you want to clear it. If you do not want to clear a field, leave the key out of your request. In other words, every key/value pair you send will be checked for discrepencies with the current data, and changes will be made.

Returns:
  • success (bool) – True if successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (dict) – Echoes the updated information
api.v2.policies.update_review_workflow(revision_id=None, workflow_event=None, event_context=None)[source]

Updates underwriter review workflow on spot for a given revision

Parameters:
  • revision_id (str) – The ID of the revision
  • workflow_event (str) – Symbol representing an event accepted by the workflow state machine: - UW_REVIEW_REQUESTED - UW_REVIEW_APPROVED - UW_REVIEW_DECLINED - AGENT_ACK
  • event_context (dict) –

    Contains details for potential side-effects of state transitions

    {
        "stp": {
            "details": list,  # diagnosis details list
            "status": str,  # pending, approved, declined
        },
        "uw_message": str, # message from the UnderWriter about why the policy is declined or approved
        "request_reason": str, # message from the Agent about why he is requesting a review
    }
    
Returns:

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

  • data (dict) –

    {
        "prev_state": str,
        "curr_state": str,
    }
    

api.v2.policies.update_underwriting_options(revision_id=None, underwriting_options=None)[source]
api.v2.policies.update_underwriting_questions(revision_id=None, underwriting_questions=None)[source]

Updates underwriting questions on spot for a given revision

Parameters:
  • revision_id (str) – The ID of the revision
  • underwriting_questions (Array of dicts) – An array that holds an dict object with questionId yesNoAnswer and explanation
Returns:

  • success (bool) – True if successful, False if not
  • message (str) – Human-readable messages with error.
  • data ([]) – Empty Array