Home > API General, Reports > SWS GetRentalActivityUnitLevel Method

SWS GetRentalActivityUnitLevel Method


This method returns rental activity by unit type over a specified date range.

Parameters

Name DataType Is Required
OrgID Long Required
Description The organization’s ID number.
StartDate DateTime Required
Description The first date of the date range to include in the report.
EndDate DateTime Required
Description The last date of the date range to include in the report.

Returned Parameters

Name DataType
SiteNumber String
Description The organization assigned site number. This is not the site ID.
SiteName String
Description The site’s name as it appears in Store.
ExportDate DateTime
Description The date the data was retrieved.
DateRange String
Description The start and end dates of the requested report.
Dimensions String
Description The dimensions of the unit group.
TotalUnits Long
Description The total number of units in the unit group.
BegOccUnits Long
Description The number of occupied units on the first date in the date range for the group.
NewRentals Long
Description The total number of new rentals during the date range for the group.
VacantUnits Long
Description The current number of vacant units for the group.
SqFtOcc Decimal
Description The total number of square feet currently occupied for the group.
StreetRate Decimal
Description The street rate for the unit group.
AverageRentRate Decimal
Description The average rent rate for the unit group.

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

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

Here’s my sample code of the Request object.

// GetRentalActivityUnitLevel Request
request.OrgID = 123456;
request.StartDate = new DateTime().AddDays(-30);
request.EndDate = new DateTime();

Finally we can call the method and pass across the login object and the request object to get our account information. 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.GetRentalActivityUnitLevel(user_request, 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, Reports
  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 )

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s

%d bloggers like this: