Archive
SWS GetSiteUnitDataV3 Method
This method retrieves a subset of the GetSiteUnitData and includes the number of items in each status for each unit type. This method will not return promotions and is used primarily for reports.
Parameters
Name | DataType | Is Required |
---|---|---|
Depth | Decimal | Optional |
Description | The depth of the rental item. | |
GetPromoData | Boolean | Ignored |
Description | Not currently used. | |
HardReservable | String | Optional |
Description | Limits the return to only those units flagged as available for a hard reservation. | |
MaxRentRate | Decimal | Optional |
Description | Limits the results to only those units below the maxiumum rent rate in this parameter. | |
MinAvailable | Integer | Optional |
Description | Limits the return to only those unit types that have more than this number available. | |
MinRentRate | Decimal | Optional |
Description | Limits the results to only those units above the minimum rent rate in this parameter. | |
PromoDataType | PCDTypeOptions | Ignored |
Description | The type of promotions you want returned. Available values:
|
|
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. | |
SoftReservable | String | Optional |
Description | Limits the return to only those units flagged as available for a soft reservation. | |
Width | Decimal | Optional |
Description | The width of the rental item. |
Returned Parameters
Name | DataType |
---|---|
SiteId | Long |
Description | The site’s ID number. |
ClassDescription | String |
Description | The type of unit, as determined by the admin at the time the unit was created. |
SiteClassID | Long |
Description | The system-generated ID of the class. |
ObjectGroup | Integer |
Description | Not used currently. |
UnitID | Long |
Description | The system-generated ID of the unit. This is maintained through rentals. |
RentRate | Decimal |
Description | The current rate the unit costs per rental cycle. |
PushRate | Decimal |
Description | The lowest rate at which the unit should be rented. |
StreetRate | Decimal |
Description | The standard rate of the unit. When a customer terminates a rental, regardless of the current rent rate the next customer will rent at this rate, unless modified. |
RackRate | Decimal |
Description | The highest rate at which the unit should be rented. |
FutureRate | Decimal |
Description | If a rental rate change is scheduled for the unit, this is the price to which it will change. |
ProformaRate | Decimal |
Description | A goal rate, or can be used for whatever purpose the site needs. |
MinimumRentRate | Decimal |
Description | The minimum rent rate for the unit type. |
MaximumRentRate | Decimal |
Description | The maximum rent rate for the unit type. |
Status | UnitStatusValues |
Description | The current status of the unit. Available values:
|
Width | Decimal |
Description | The width value of othe unit. |
Depth | Decimal |
Description | The depth value of the unit. |
Height | Decimal |
Description | The height value of the unit. |
SquareFeet | Decimal |
Description | The total square feet of the unit. |
Volume | Decimal |
Description | The total volume of the unit. |
Attribute1 | Integer |
Description | The numeric value for the “Attribute01” custom look up as defined by the site. See eUnitAttr01 for the available values. |
Attribute1Value | String |
Description | The textual value for the “Attribute01” custom lookup as defined by the site. See eUnitAttr01 for the available values. |
Attribute2 | Integer |
Description | The numeric value for the “Attribute02” custom look up as defined by the site. See eUnitAttr02 for the available values. |
Attribute2Value | String |
Description | The textual value for the “Attribute02” custom lookup as defined by the site. See eUnitAttr02 for the available values. |
Climate | Integer |
Description | The numeric value for the “Climate” custom look up as defined by the site. See eUnitClimate for the available values. |
ClimateValue | String |
Description | The textual value for the “Climate” custom lookup as defined by the site. See eUnitClimate for the available values. |
Door | Integer |
Description | The numeric value for the “Door” custom look up as defined by the site. See eUnitDoor for the available values. |
DoorValue | String |
Description | The textual value for the “Door” custom lookup as defined by the site. See eUnitDoor for the available values. |
Access | Integer |
Description | The numeric value for the “Access” custom look up as defined by the site. See eUnitAccess for the available values. |
AccessValue | String |
Description | The textual value for the “Access” custom lookup as defined by the site. See eUnitAccess for the available values. |
Features | Integer |
Description | The numeric value for the “Features” custom look up as defined by the site. See eUnitFeatures for the available values. |
FeaturesValue | String |
Description | The textual value for the “Features” custom lookup as defined by the site. See eUnitFeatures for the available values. |
ReservationDepositAmount | Decimal |
Description | The amount required for the customer to set the unit to a hard reservation, if there is a reservation deposit. |
TotalUnits | Integer |
Description | The total number of units that exist with the given attributes. |
TotalUnitsInAvailableStatus | Integer |
Description | The number of units available to rent. |
TotalUnitsInReservedStatus | Integer |
Description | The number of units that are either are set asside for reservations. |
TotalUnitsInRentedStatus | Integer |
Description | The number of units that are currently occupied by renters. |
TotalUnitsInCompanyUseStatus | Integer |
Description | The number of units set asside for company use. |
TotalUnitsInUnavailableDamagedStatus | Integer |
Description | The number of units unavailable due to damage. |
TotalUnitsInUnavailablePermanentStatus | Integer |
Description | The number of units set aside permanently. This is usually used for units that were created in error. |
TotalUnitsInOtherStatus | Integer |
Description | The number of unist set aside but not indicating the reason. |
TotalUnitsInUnavailablePendingStatus | Integer |
Description | The number of units pending inspection before they are made available to rent. |
TotalUnitsInAvailableHoldStatus | Integer |
Description | The number of units that are in the process of being rented. |
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 GetSiteUnitDataV2 request object and a GetSiteUnitDataV2 response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetSiteUnitData_Request request = new SWS.GetSiteUnitData_Request();
SWS.UnitTypeStatus[] response;
Here’s my sample code of the Request object using SiteID, Width and Depth filter options.
' GetSiteUnitDataV2 Request
request.SiteID = 123456;
request.Width = 8.5m;
request.Depth = 10m;
Finally we can call the method and pass across the login object and the request object to get our filtered site unit data. 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.GetSiteUnitDataV3(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.
SWS2 GetDataView Method – sws_rental_prospects_v
Allows you to retrieve a list of quoted, soft-reserved and hard-reserved reservations. This view requires at least one parameter by which to filter.
Returned Columns
Name | Data Type |
---|---|
SITE_ID | Long |
Description | The site’s ID number. This can be found using the GetSiteList method. |
SITE_NUMBER | String |
Description | The organization assigned site number. This is not the site ID. |
ACCT_ID | Long |
Description | The account’s ID number. This is returned when you use the CreateNewAccount method or can be retrieved with the SearchBy method. |
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. |
UNIT_ID | Long |
Description | The unit’s 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. |
RENTAL_ID | Long |
Description | The rental item’s ID number. This is returned when using the MakeReservation method or can be searched for using the SearchBy method. |
RESERVATION_DATE | DateTime |
Description | The date the quote/reservation was originally created. |
PAID_THRU_DATE | DateTime |
Description | If the unit has been rented, this is the date the customer has paid through. |
QUOTE_ID | Long |
Description | The quote/reservation’s ID number. |
SITE_CLASS_ID | Long |
Description | The ID of the class to which the unit belongs. |
EXPIRATION | DateTime |
Description | The date the quote/reservation will no longer be available. |
QUOTE_STATUS | Integer |
Description | The numeric value for the status of the quote/reservation.
|
QUOTE_STATUS_VALUE | String |
Description | The textual value for the status of the quote/reservation. |
QUOTE_TYPE | Integer |
Description | The type of quote/reservation that was created.
|
QUOTE_TYPE_VALUE | String |
Description | The textual value for the QUOTE_TYPE of the reservation. |
ATTRIBUTE01 | Integer |
Description | The numeric value for the “Attribute01” custom look up as defined by the site. See eUnitAttr01 for the available values. |
ATTRIBUTE01_VAL | String |
Description | The textual value for the “Attribute01” custom lookup as defined by the site. See eUnitAttr01 for the available values. |
ATTRIBUTE02 | Integer |
Description | The numeric value for the “Attribute02” custom look up as defined by the site. See eUnitAttr02 for the available values. |
ATTRIBUTE02_VAL | String |
Description | The textual value for the “Attribute02” custom look up as defined by the site. See eUnitAttr02 for the available values. |
CLIMATE | Integer |
Description | The textual value for the “Climate” custom lookup as defined by the site. See eUnitClimate for the available values. |
CLIMATE_VAL | String |
Description | The numeric value for the “Climate” custom look up as defined by the site. See eUnitClimate for the available values. |
WIDTH | Integer |
Description | The width measurement of the unit. |
DEPTH | Integer |
Description | The depth measurement of the unit. |
SQ_FEET | Integer |
Description | The total square feet of the unit, calculated by multiplying the width and the depth measurements. |
FEATURES | Integer |
Description | The numeric value for the “Features” custom look up as defined by the site. See eUnitFeatures for the available values. |
FEATURES_VAL | String |
Description | The textual value for the “Features” custom lookup as defined by the site. See eUnitFeatures for the available values. |
ACCESS_TYPE | Integer |
Description | The numeric value for the “Access Type” custom lookup as defined by the site. See eUnitAccessType for the available values. |
ACCESS_TYPE_VAL | String |
Description | The textual value for the “Access Type” custom lookup as defined by the site. See eUnitAccessType for the available values. |
DOOR | Integer |
Description | The numeric value for the “Door” custom look up as defined by the site. See eUnitDoor for the available values. |
DOOR_VAL | String |
Description | The textual value for the “Door” custom look up as defined by the site. See eUnitDoor for the available values. |
PRICE | Decimal |
Description | The price quoted in the quote/reservation. |
START_RENT_RATE | Decimal |
Description | The applicable starting rent rate of the unit. |
PRORATE_AMT | Decimal |
Description | The amount that will be paid, in rent, at the time of the move-in. This is based on today’s date any discounts that were quoted at the time the quote/reservation was created. |
LOST_DEMAND_REASON | Integer |
Description | The customizable reason that the customer didn’t complete a rental for a unit. Contact the organization for the list. |
INQUIRY_SOURCE | Integer |
Description | The customizable list of ways that a customer heard about the organization/site. Contact the organization for the list. |
ADMIN_FEE | Decimal |
Description | A fee assessed to cover the administrative costs of setting up the rental. |
TAX | Decimal |
Description | The tax applicable to the unit. This is based on the prorated amount. |
DEPOSIT | Decimal |
Description | The security deposit due at the time of rental. |
RES_DEPOSIT | Decimal |
Description | The amount required to hold the reservation. This can only be applied to soft and hard reservations. |
DISC_AMT | Decimal |
Description | The dollar amount of any applicable discounts that have been quoted. |
TOT_AMT | Decimal |
Description | The total amount due at the time of move-in based on the prorated amount, the applicable taxes and any discounts that apply. |
QUOTE_START_DATE | DateTime |
Description | The date the quote/reservation was created. |
CFLEX01 | String |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. |
CFLEX02 | String |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. |
CFLEX03 | String |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. |
CFLEX04 | String |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. |
CFLEX05 | String |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. |
CHANNEL | Integer |
Description | The means by which the user has access to the store application. Contact the organization for the available options. |
MKT_CODE | Integer |
Description | Similar to the inquiry source, this is a custom field to describe how the customer heard about the organization site. |
MKT_SOURCE | String |
Description | Similar to the inquiry source, this is a custom field to describe how the customer heard about the organization site. |
QUOTE_CREATED | DateTime |
Description | The date the quote/reservation was originally created. |
QUOTE_UPDATED | DateTime |
Description | The date the quote/reservation was last updated. |
QUOTE_CREATED_BY | Long |
Description | The user’s ID number that created the quote/reservation. |
QUOTE_UPDATED_BY | Long |
Description | The user’s ID number that last updated the quote/reservation. |
Example
We’ll assume you’ve got a web reference, let’s name it Store, in your Visual Studio project. At this point we need to reference our objects. We’ll need the standard service object, a GetDataView_Request request object and a ParameterValues object. You will also need to pass in credentials. We can define and create those like this:
// Create a request and response objects
StoreServiceClient client = new StoreServiceClient();
GetDataView_Request request = new GetDataView_Request();
ParameterValues parms = new Store.ParameterValues();
As with every method we need to pass in credentials. We also set up the parameters for our request.
//get data view setup
client.ChannelFactory.Credentials.UserName.UserName = "user";
client.ChannelFactory.Credentials.UserName.Password = "pass";
client.ChannelFactory.Credentials.SupportInteractive = true;
parms.FilterType = 3;
parms.ParameterName = "quote_created";
parms.ParameterValue = "01-MAR-2017";
request.OrgID = 123456;
request.SiteID = 123456;
request.ViewName = "sws_rental_prospects_v";
request.Parameters = new ParameterValues[] { parms };
Finally we can call the method and pass across the login object and the request object to retrieve the data. It’s a good idea to do this in a Try Catch block.
try
{
// Call the method that will load the response object
object resp;
resp = client.GetDataView(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 SWS2 Methods.
SWS2 GetDataView Method
This method is designed to allow access to specific database views to retrieve data. This method was created so that when a data set not currently available in reports or other functions is required, the view can be created within the database and accessed without creating additional API methods. This method does not do any logic, it simply retrieves the view based on the parameters specified. Each view will have a unique parameter collection and that information will need to be obtained from Yardi before the view can be accessed. The parameters collection will need a parameter object that includes filter type (equal, not equal, greater than, etc.), the parameter name which is the field name in the view, and the parameter value which is the value on which to filter. The data is returned as a serialized DataTable.
Parameters
Name | DataType | Is Required |
---|---|---|
OrgID | Long | Required |
Description | The organization ID number for which you are accessing the data. | |
SiteID | Long | Optional* |
Description | The site’s ID number. This can be found using the GetSiteList method. *This is required if the view is a site level only view. |
|
ViewName | String | Required |
Description | This is a list of currently available views:
|
|
FilterType | Decimal | Required |
Description | Selects the type of filter to use in the search. Available filter values:
|
|
ParameterName | String | Required |
Description | Indicates the name of the parameter for which you wish to apply the filter. See the ViewName above for the available parameters. | |
ParameterValue | String | Required |
Description | Indicates the value of the parameter for which you wish to apply the filter. |
Returns
Name | DataType |
---|---|
GetDataViewResult | DataTable |
Description | A data table that contains all rows meeting the filter parameters. |
Example
We’ll assume you’ve got a web reference, let’s name it Store, in your Visual Studio project. At this point we need to create our objects. We’ll need the standard service object, a GetDataView request object that contains one or more ParameterValues object(s) and a DataTable object for the response. We can define and create those like this:
// Create a request and response objects
Store.GetDataView_Request request = new Store.GetDataView_Request();
Store.ParameterValues params1 = new Store.ParameterValues();
Store.ParameterValues params2 = new Store.ParameterValues();
System.Data.DataTable resp = new System.Data.DataTable();
Now we set up the parameters for our request. Each parameter you are filtering by should have a filter type (listed below), a parameter name which is the name of the field you wish to filter on (click on view names above for the list of available fields) and the value on which to filter.
//Add deposit request object
params1.FilterType = 3;
params1.ParameterName = "end_date";
params1.ParameterValue = DateTime.Today.AddDays(-30).ToString();
params2.FilterType = 5;
params2.ParameterName = "end_date";
params2.ParameterValue = DateTime.Today.ToString();;
request.OrgID = 123456;
request.SiteID = 123456;
request.ViewName = "move_out_list_v";
request.Parameters = new Store.ParameterValues[] { params1, params2};
Finally we can call the method and pass in the request object to retrieve our data table. It’s a good idea to do this in a Try Catch block.
// Call the method that will load the data
try
{
resp = client.GetDataView(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 SWS2 Methods.
SWS2 GetSiteRentalData Method
Retrieves rental data for an account or site. This also returns any soft or hard reservations as they are set up with rental IDs. The data is returned as a DataTable.
Parameters
Name | Data Type | Is Required |
---|---|---|
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. | |
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. |
Returned Parameters
Name | Data Type |
---|---|
CONTACT_ID | Long |
Description | The rental contact’s ID number. This is returned when using the CreateNewAccount or AddNewContact methods or you can search for it using the SearchBy method. |
ACCT_ID | Long |
Description | The account’s ID number. This is returned when you use the CreateNewAccount method or can be retrieved with the SearchBy method. |
RENTAL_ID | Long |
Description | The rental item’s ID number. This is returned when using the MakeReservation method or can be searched for using the SearchBy method. |
RSTAT_RAW | Integer |
Description | The numeric rental status of the rental. This indicates if the rental is current or delinquent. |
RENTAL_STATUS | String |
Description | The textual rental status of the rental. This indicates if the customer is current or delinquent. |
START_DATE | DateTime |
Description | The date the rental was initially created. |
END_DATE | DateTime |
Description | If the rental has been terminated, this will be the date of termination. It will be null if it is still rented. |
OBJECT_ID | Long |
Description | The unit’s ID number. This is maintained through rentals. |
SITE_ID | Long |
Description | The site’s ID number. This can be found using the GetSiteList method. |
SITE_NAME | String |
Description | The site’s name as it appears in the Store application. |
UNIT_NUMBER | String |
Description | The unit’s number as assigned by the organization. This is not the UnitID. |
UNIT_ID | Long |
Description | The unit’s ID number. This is maintained through rentals. |
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. |
ORG_ID | Long |
Description | The organization’s ID number. |
PTD | DateTime |
Description | The paid thru date of the rental. |
ADDRESS | String |
Description | The full address of the primary contact. This includes the three possible address lines, city, state/province and ZIP/postal code. |
PHONE | String |
Description | The primary contact’s primary phone number. |
PHONE_TYPE | String |
Description | The type of phone number applicable to the primary contact’s phone. |
DUE_DATE | DateTime |
Description | The date that the next payment is due for the rental. This will be a past date if they are delinquent. |
AMOUNT_DUE | Decimal |
Description | The current amount due for the rental. |
UNIT_NUM_SORT | String |
Description | The value used to sort the units in the item finder within the application. |
GATE_CODE | String |
Description | The code the customer uses to access the gate system. If the site doesn’t have gates this will be null. |
String | |
Description | The email address for the primary contact. This is used as the username if the site supports eStore/eCommerce. |
ADDR_1 | String |
Description | The first line of the contact’s address. |
ADDR_2 | String |
Description | The second line of the contact’s address. |
CITY | String |
Description | The address of the contact’s address. |
STATE | String |
Description | The state for the primary contact’s address. |
POSTAL_CODE | String |
Description | The ZIP/Postal code for the primary contact’s address. |
FIRST_NAME | String |
Description | The primary contact’s first name. |
LAST_NAME | String |
Description | The primary contact’s last name. |
HOME_PHONE | String |
Description | The primary contact’s home phone number. This is indicated when the phone record is created. |
WORK_PHONE | String |
Description | The primary contact’s work phone number. This is indicated when the phone record is created. |
CELL_PHONE | String |
Description | The primary contact’s cell phone number. This is indicated when the phone record is created. |
Example
We’ll assume you’ve got a web reference, let’s name it Store, in your Visual Studio project. At this point we need to reference our objects. We’ll need the standard service object, a GetSiteRentalData_Request request object. You will also need to pass in credentials. We can define and create those like this:
// Create a request and response objects
StoreServiceClient client = new StoreServiceClient();
GetSiteRentalData_Request request = new GetSiteRentalData_Request();
As with every method we need to pass in credentials. We also set up the parameters for our request.
//Cancel reservation setup
client.ChannelFactory.Credentials.UserName.UserName = "user";
client.ChannelFactory.Credentials.UserName.Password = "pass";
client.ChannelFactory.Credentials.SupportInteractive = true;
request.SiteID = 123456;
request.AccountID = 123456;
Finally we can call the method and pass across the login object and the request object to retrieve the data. It’s a good idea to do this in a Try Catch block.
try
{
// Call the method that will load the response object
object resp;
resp = client.GetSiteRentalData(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 SWS2 Methods.