api.v2.dashboards module

api.v2.dashboards.get_agency_experience_data(contact_id, to_date)[source]

Get Agency Experience Data returns the agency experience summary data (used to fill the tables).

Parameters:
  • contact_id (str) – The id of the contact making the request.
  • to_date (str) – The date of the end data e.x {“year”:”2017”,”month”:”3”}
Returns:

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

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

  • data (dict) – Dict containing two array of dicts, this is YTD data. {

    “line_of_business”:{
    “Dwelling Property”: {

    “ytd_claims”: 0.0, “losses_incurred”: 0.0, “loss_ratio”: 0.0, “total_written_premium”: 12597.14, “canceled_written_premium”: -523.86, “total_lae_paid”: 0.0, “total_lae_incurred”: 0.0, “renewal_written_premium”: 3039.0, “endorsed_written_premium”: 0.0, “inforce_policy_count”: 52.0, “new_written_premium”: 10082.0, “ending_loss_reserve”: 0.0, “earned_premium”: 10492.720000000001, “new_policy_count”: 11.0, “net_cancel_policy_count”: 3.0, “beginning_loss_reserve”: 0.0, “losses_paid”: 0.0

    for all line items.

    }, “totals”:{

    “ytd_claims”: 0.0, “losses_incurred”: 0.0, “loss_ratio”: 0.0, “total_written_premium”: 13104.939999999999, “canceled_written_premium”: -523.86, “total_lae_paid”: 0.0, “total_lae_incurred”: 0.0, “renewal_written_premium”: 3039.0, “endorsed_written_premium”: 0.0, “inforce_policy_count”: 53.0, “new_written_premium”: 10589.8, “ending_loss_reserve”: 0.0, “earned_premium”: 10591.41, “new_policy_count”: 12.0, “net_cancel_policy_count”: 3.0, “beginning_loss_reserve”: 0.0, “losses_paid”: 0.0

    }

    }

api.v2.dashboards.get_csr_data(contact_id)[source]

Get crs data returns crs data for given agent/agency/agency group. :param contact_id: The id of the contact making the request. :type contact_id: str

Returns:
  • success (bool) – True if completely successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (dict) – Dict containing two array of dicts {
    “cancellation_pending”: [
    { “policyStatus”: “Active”, “policyNumber”: “10-2015-36”, “expirationDate”: “2017-05-14”, “policyId”: “64f10a14-0ddf-46d2-a6e8-71868deac348”, “revisionDate”: “2016-05-14”

    ], “will_expire_in_30_days”: [

    {
    “policyStatus”: “Active”, “policyNumber”: “10-2015-36”, “expirationDate”: “2017-05-14”, “policyId”: “64f10a14-0ddf-46d2-a6e8-71868deac348”, “revisionDate”: “2016-05-14”

    ], “will_expire_in_60_days”: [

    {
    “policyStatus”: “Active”, “policyNumber”: “10-2015-36”, “expirationDate”: “2017-05-14”, “policyId”: “64f10a14-0ddf-46d2-a6e8-71868deac348”, “revisionDate”: “2016-05-14”

    ], “cancel_non_pay_30_days”: [

    {
    “policyStatus”: “Cancelled”, “policyNumber”: “10-2015-36”, “expirationDate”: “2017-05-14”, “policyId”: “64f10a14-0ddf-46d2-a6e8-71868deac348”, “revisionDate”: “2016-05-14”

    ], “expired_within_45_days”: [

    {
    “policyStatus”: “Cancelled”, “policyNumber”: “10-2015-36”, “expirationDate”: “2017-05-14”, “policyId”: “64f10a14-0ddf-46d2-a6e8-71868deac348”, “revisionDate”: “2016-05-14”

    ]

    }

api.v2.dashboards.get_loss_ratio_chart(contact_id, to_date)[source]

Get Loss Ratio Chart return monthly loss ratio for given year and one year prior. :param contact_id: The id of the contact making the request. :type contact_id: str :param to_date: The date of the end data e.x {“year”:”2017”,”month”:”3”}

Returns:
  • success (bool) – True if completely successful, false if not
  • messages (list of str) – List of human-readable error messages
  • data (dict) – Dict containing two array objects {
    “pv_year”: [m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11], “now”: [m0... util to_date[“month”]]

    } where m0 is January value and so on..

api.v2.dashboards.get_policy_count_data(contact_id, to_date)[source]

Get Policy Count Data returns the policy count (inforce_policy_count) for given year and one year prior.

Parameters:
  • contact_id (str) – The id of the contact making the request.
  • to_date (str) – The date of the end data e.x {“year”:”2017”,”month”:”3”}
Returns:

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

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

  • data (dict) – Dict containing two array of dicts {

    “pv_year”: [
    “Dwelling Property”:[m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11],

    ... fol all line items

    “Total”:[m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11]

    ], “now”: [

    “Dwelling Property”:[m0... until to_date[“month”]], ... fol all line items

    “Total”:[m0... until to_date[“month”]]

    ]

    }

api.v2.dashboards.get_premium_data(contact_id, to_date)[source]

Get Premium data returns the Written Premium VS Losses Paid for given year and one year prior.

Parameters:
  • contact_id (str) – The id of the contact making the request.
  • to_date (str) – The date of the end data e.x {“year”:”2017”,”month”:”3”}
Returns:

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

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

  • data (dict) – Dict containing two array of dicts {

    “pv_year”: [
    {

    “cl”:”0” - losses paid for given month, “wp”: “0” - written premium for given month, “reportingMonth”:”1”

    }, ... until december (reportingMonth = 12)

    ], “now”: [

    {

    “cl”:”0” - losses paid for given month, “wp”: “0” - written premium for given month, “reportingMonth”:”1”

    }, ... until to_date[“month”] (reportingMonth = to_date[“month”])]

    }

api.v2.dashboards.get_report_url(contact_id=None, from_date=None, to_date=None, payment_types=None)[source]

Returns the Transaction Report for a specified date range :param from_date: MM-DD-YYYY :type from_date: str :param to_date: MM-DD-YYYY :type to_date: str :param sort_obj: {field:"column", order:"asc"} :type sort_obj: str :param contact_id: The id of the contact making the request. :type contact_id: str :param payment_types: {field:bool, field:bool} e.x {“Sweep”:true,”Other”:true} :type payment_types: str

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':{
        },
        'success': True,
        'messages': []
    }
    
api.v2.dashboards.get_transaction_report(contact_id=None, from_date=None, to_date=None, page=1, payment_types=None, records_per_page=25, sort_obj=None)[source]

Returns the Transaction Report for a specified date range :param from_date: MM-DD-YYYY :type from_date: str :param to_date: MM-DD-YYYY :type to_date: str :param page: 1 :type page: int :param records_per_page: 1 :type records_per_page: int :param sort_obj: {field:"column", order:"asc"} :type sort_obj: str :param contact_id: The id of the contact making the request. :type contact_id: str :param payment_types: {field:bool, field:bool} e.x {“Sweep”:true,”Other”:true} :type payment_types: str

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':{
        },
        'success': True,
        'messages': []
    }