Home > API General, Letters, SMS > SWS GetSMSCandPhoneData Method

SWS GetSMSCandPhoneData Method


This method returns contact, address and phone information for site rentals with optional filtering based upon AccountID and/or RentalID. Candidate records must meet the following criteria:

  • Primary contact is “TRUE”.
  • Phone type is “MOBILE”.
  • Rental status is “CURRENT_OCCUPIED”, “DELINQUENT”, “IN_PROCESS”, “RESERVED” or “SOFT_RESERVED”.

Parameters

Name DataType Is Required
SiteID Long Required
Description The site’s ID number. This can be found using the GetSiteList method.
AccountID Long Optional
Description The account’s ID number. This is returned when you use the CreateNewAccount method or can be retrieved with the SearchBy method.
RentalID Long Optional
Description The rental item’s ID number. This is returned when using the MakeReservation method or can be searched for using the SearchBy method.

Returned Parameters

Name DataType
Response String
Description “SUCCESS” indicates that the query was successful, or “FAILURE” if not.
SITE_ID Long
Description The site’s ID number.
ACCT_ID Long
Description The account’s ID number.
ACCT_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.
ACCT_TYPE Integer
Description The system-defined account type.
Available values:

  • Lead
  • Customer
  • Company Use Acct
  • Other
RENTAL_ID Long
Description The ID number of the rental.
RENTAL_STATUS Integer
Description The rental’s current status.
Available values:

  • 0 – Current
  • 1 – Delinquent
  • 100 – In-Process
  • 101 – Reserved
  • 102 – Soft Reservation
  • 201 – Vacated/Terminated
  • 202 – Voided Rental
  • 203 – In-Transfer
  • 205 – Abandoned Rental
UNIT_ID Long
Description The unit’s ID number. This is maintained through rentals.
PHONE_ID Long
Description The ID number of the phone. This can be found using the GetContacts method.
PHONE String
Description The contact’s phone number.
PHONE_TYPE Integer
Description The numeric value of the phone number type.
Available values:

  • 1 – Home
  • 2 – Office
  • 3 – Mobile
  • 4 – Fax
  • 5 – Other
CONTACT_ID Long
Description The contact’s ID number.
CONTACT_TYPE Integer
Description The numeric value of the contact type.
Available values:

  • 1 – Account Manager
  • 2 – Account User
  • 3 – Account Contact Only
  • 4 – Business Contact Record
FIRST_NAME String
Description The contact’s first name.
LAST_NAME String
Description The contact’s last name.
KNOWN_AS String
Description The name by which the customer prefers to be called.
EMAIL String
Description The contact’s email address. This is the customer’s username if eStore/eCommerce are supported.
ADDR_ID Long
Description The ID number of the primary contacts address.
ADDR1 String
Description The first line of the street address.
ADDR2 String
Description The second line of the street address.
ADDR3 String
Description The third line of the street address.
CITY String
Description The city in which the address is located.
STATE String
Description The state/province in which the address is located.
POSTAL_CODE String
Description The postal/ZIP code for the address.
COUNTRY String
Description The country in which the address is located.
ADDR_TYPE Integer
Description The numeric value for the address type.
Available values:

  • 1 – HOME
  • 2 – OFFICE
  • 3 – MAILING
  • 4 – SHIPPING
  • 5 – OTHER
PRIMARY_FLAG Boolean
Description Indicates if the contact is the primary contact for the rental (“True”) or not (“False”).

Example

As with every method we need to pass in credentials. We do this with the LookupUser request object.

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 create our objects. We’ll need the standard service object, a SiteID request object, an AccountRental request object and a GetSMSCandPhoneData response object. We can define and create those objects like this:

// Create the request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.SiteID_Request siteID_rqst = new SWS.SiteID_Request();
SWS.AccountRental_Request acctrental_rqst = new SWS.AccountRental_Request();
SWS.GetSMSCandPhoneData_Response response = new SWS.GetSMSCandPhoneData_Response();

Now we set up the parameters for our request.

// SiteID Request
siteID_rqst.SiteID = 123456;
// Account/Rental Request
// these are optional parameters, you may set one, both or neither
acctrental_rqst.AccountID = 234567;
acctrental_rqst.RentalID = 345678;

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

// Call the method that will load the response objecttry
{
response = service.GetSMSCandPhoneData(user_rqst, siteID_rqst, acctrental_rqst);
}
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, Letters, SMS
  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