Home > API General, Insurance > SWS GetInsuranceInfo Method

SWS GetInsuranceInfo Method


Retrieves a collection of insurance data for the specified site, date and all or part of the account or contact name.

Parameters

Name DataType Is Required
AccountOrContactName String Required
Description The first and last name of the rental contact or the account name. Max string length of 101.
ClaimDate DateTime Required
Description The date for which you wish to retrieve the insurance details.
SiteID Long Required
Description The site’s ID number. This can be found using the GetSiteList method.

Returned Parameters

Name DataType
ACCOUNT_CONTACT_NAME String
Description The first and last name of the rental contact.
ACCOUNT_NAME String
Description The name on the account. This may differ from the primary contact’s name in some instances, such as a business account or a guardianship account.
ADDRESS String
Description The full address for the contact. This will include all applicable address lines.
CITY String
Description The city for the address.
DIMENSIONS String
Description The dimensions for the rental item.
INS_COVERAGE_AMT Decimal
Description The insurance coverage amount on the rental item.
INS_COVERAGE_PERC Decimal
Description The insurance coverage percentage on the rental item.
INS_END_DATE DateTime
Description The date that insurance was cancelled from the rental.
INS_EVENT String
Description The value of whether the rental item was covered by insurance on the date specified.
INS_RATE Decimal
Description The monthly insurance coverage rate for the rental item.
INS_START_DATE DateTime
Description The date that insurance was first added to the rental.
LEASE_START DateTime
Description The date the customer initiated the rental.
PAID_THRU_DATE DateTime
Description The date through which a customer has paid for their rental.
PHONE_NUMBER String
Description The primary contact’s phone number.
POSTAL_CODE String
Description The postal/ZIP code for the address.
RECORD_DATE DateTime
Description The date and time the insurance details were retrieved.
RECORD_TYPE String
Description The type of record.
RENTAL_ID Long
Description The rental item’s ID number.
SITE_ID Long
Description The site’s ID number.
SITE_NAME String
Description The site’s name.
SS_DATE DateTime
Description The date and time the insurance details were retrieved.
STATE String
Description The state/province for the address.
UNIT_ID Long
Description The units ID number. This is maintained through rentals.
UNIT_NUMBER String
Description The unit’s number as assigned by the organization. This is not the UnitID.
UNIT_TYPE String
Description The type of object being rented.

Example

We’ll assume you’ve got a web reference, let’s name it SWS, in your Visual Studio project.  At this point we need to our objects.  We’ll need the standard service object, a GetInsuranceInfo request object and a GetInsuranceInfo response object.  We can define and create those like this:

// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetInsuranceInfo_Request request = new SWS.GetInsuranceInfo_Request();
SWS.GetInsuranceInfo_Response response;

Here’s my sample code of the Request object.

// GetInsuranceInfo Request
request.SiteID = 123456;
request.AccountOrContactName = "Doe, John";
request.ClaimDate = new DateTime(2016, 01, 01);

Finally we can call the method and pass across the login object and the request object to get our insurance info. It’s a good idea to do this in a Try Catch block.

// Call the method that will load the response object
try
{
  response = service.GetInsuranceInfo(request);
}
catch (Exception ex)
{
  MessageBox.Show(ex.Message);
}

Note that if something goes wrong the service will respond with an exception. You’ll want to take a look at that message returned in that exception so it can be debugged.

For a full list of methods see SWS Methods.

Categories: API General, Insurance Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s