Home > API General, Rental/Reservation, Search > SWS GetSiteUnitDataV2 Method

SWS GetSiteUnitDataV2 Method


Retrieves a collection of rental item types for a specific group of rental items. Unlike GetSiteUnitData the rental items are grouped by Revenue Class, Width, Depth, Height, Attribute 1, Attribute 2, Climate, Door, Access and Feature values. You will have all the vital data on a randomly selected rental item from each group, including additional data items. There are also additional filtering options, including the ability to pass in multiple values for various filters. Unfiltered, this method will return all rental items with NO promos.

Parameters

Name DataType Is Required
SiteID Long Required
Description The ID of the site to which the unit(s) belong. This can be found using the GetSiteList method.
ObjectGroup ObjectGroups Optional
Description Not currently used.
Available values:

  • Unknown
  • Storage
  • Parking
  • NonStorage
Width ArrayOfDecimal Optional
Description Filters for the width measurement of the unit. All attributes are customizable by the admin, because of this, these values will be different for each site.
Depth ArrayOfDecimal1 Optional
Description Filters for the depth measurement of the unit. All attributes are customizable by the admin, because of this, these values will be different for each site.
Height ArrayOfDecimal2 Optional
Description Filters for the height measurement of the unit. All attributes are customizable by the admin, because of this, these values will be different for each site.
MinRentRate Decimal Optional
Description Filters for the minimum rent rate for the units requested.
MaxRentRate Decimal Optional
Description Filters for the maximum rent rate for the units requested.
Attribute01 ArrayOfInt Optional
Description Filters using the numeric value for the “Attribute01” custom look up as defined by the site. See eUnitAttr01 for the available values.
Attribute02 ArrayOfInt1 Optional
Description Filters using the numeric value for the “Attribute02” custom look up as defined by the site. See eUnitAttr02 for the available values.
Climate ArrayOfInt2 Optional
Description Filters using the numeric value for the “Climate” custom look up as defined by the site. See eUnitClimate for the available values.
Door ArrayOfInt3 Optional
Description Filters using the numeric value for the “Door” custom look up as defined by the site. See eUnitDoor for the available values.
Access ArrayOfInt4 Optional
Description Filters using the numeric value for the “Access Type” custom look up as defined by the site. See eUnitAccessType for the available values.
Feature ArrayOfInt5 Optional
Description Filters using the numeric value for the “Features” custom look up as defined by the site. See eUnitFeatures for the available values.
Status ArrayOfUnitStatusValues Optional
Description Filters for the rental status of the unit.
Available values:

  • Available
  • Reserved
  • Rented
  • CompanyUse
  • UnavailableDamaged
  • UnavailablePermanent
  • VirtualLinkedUnits
  • Other
  • UnavailablePending
  • AvailableHold
PromoDataType PCDTypeOptions Optional
Description Filters for the type of promo requested for the item.
Available values:

  • None
  • HighestPriorityPromotion
  • AllPromotions
  • HighestPriorityDiscount
  • AllDiscounts
  • HighestPriorityRateMod
  • AllRateMods
  • All
  • HighestPriorityDiscountAndPromo
  • HighestPriorityPCDAndRateMod

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 unit’s ID number. 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 measuremnet of the unit.
Depth Decimal
Description The depth measurement of the unit.
Height Decimal
Description The height measurement of the unit.
SquareFeet Decimal
Description The total square feet of the unit.
Volume Decimal
Description The total volume of the unit.
TotalUnitsAvailable Integer
Description The number of units available to rent with the same attributes.
TotalUnits Integer
Description The number of units that exist with the same attributes.
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 Type” custom look up as defined by the site. See eUnitAccessType for the available values.
AccessValue String
Description The textual value for the “Access Type” custom lookup as defined by the site. See eUnitAccessType 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.
PromoCollection APPL_BEST_PCD
Description The object containing the requested promotion details.

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.GetSiteUnitDataV2_Request request = new SWS.GetSiteUnitDataV2_Request();
SWS.GetSiteUnitDataV2_Response response;

Here’s my sample code of the Request object using SiteID, Max Rent Rate and Promo Data filter options.

// GetSiteUnitDataV2 Request
request.SiteID = 123456;
request.PromoDataType = SWS.PCDTypeOptions.None;
request.MaxRentRate = 90.50m;

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.GetSiteUnitDataV2(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.

  1. swsBecky
    January 25, 2017 at 2:51 pm
    Documented Defect

    This method does not return the unit number. Unfortunately this will not be corrected, as it could cause issues with existing code.

  2. swsBecky
    April 6, 2017 at 8:24 am

    Updated June 19, 2013: Updated the code behind this method to return all possible promos for a unit type when that type contains multiple price points. Ex: Unit Type A/C 5×5 has 2 units available at $50 and one at $45. If there was a promo available for the $50 unit with a price point governor of $50 or higher the promo was NOT returning since it should not be used on the $45 unit. This promo will now be returned. Please note that there are no governor checks when applying promos to a unit and that governor information is not available through SWS.

  3. swsBecky
    April 6, 2017 at 9:32 am

    Updated Aug. 11, 2016: It was recently discovered that this method was not returning PCD’s beyond credit level 1. Code changes have been made to correct the issue and will be available in the next Store release.

  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: