Home > API General, Search > SWS GetSiteUnitDataV3 Method

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:

  • None
  • HighestPriorityPromotion
  • AllPromotions
  • HighestPriorityDiscount
  • AllDiscounts
  • HighestPriorityRateMod
  • AllRateMods
  • All
  • HighestPriorityDiscountandPromo
  • HighestPriorityPCDAndRateMod
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:

  • Unknown
  • Available
  • Reserved
  • Rented
  • CompanyUse
  • UnavailableDamaged
  • UnavailablePermanent
  • VirtualLinkedUnits
  • Other
  • UnavailablePending
  • AvailableHold
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.

Categories: API General, Search
  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: