Home > API General, Site Administration > SWS GetSiteDetails Method

SWS GetSiteDetails Method


Retrieves a list of details for a specified site. This information includes all site specific data regarding Site Identification, Site Address and Hours & Directions, if available.

Parameters

Name DataType Is Required
SiteID ArrayOfLong Required
Description The site’s ID number or an array of site ID number for which you wish to receive the details. This can be found using the GetSiteList method.

Returned Parameters

Name DataType
ADDRESS_LABEL String
Description The description of the site’s address.
ALT_PHONE String
Description The alternate phone number for the site.
APP_STATUS Integer
Description The numeric value for the Store application’s current status for the site.
Common values:

  • 1 – NEW/Pre-Production
  • 2 – Active
  • 3 – Terminated
  • 5 – Test/Training
APP_STATUS_VAL String
Description The textual value of the APP_STATUS.
CFLEX01 String
Description A custom field, set up by the organization, designed to hold additional site information. This is not displayed in the Store application.
CFLEX02 String
Description A custom field, set up by the organization, designed to hold additional site information. This is not displayed in the Store application.
CFLEX03 String
Description A custom field, set up by the organization, designed to hold additional site information. This is not displayed in the Store application.
CITY String
Description The city field for the address.
COUNTRY String
Description The country field for the address.
DIR_EAST String
Description The directions to the site from the East as entered by the admin.
DIR_NORTH String
Description The directions to the site from the North as entered by the admin.
DIR_SOUTH String
Description The directions to the site from the South as entered by the admin.
DIR_WEST String
Description The directions to the site from the West as entered by the admin.
DISPLAY_NAME String
Description The site’s name as it appears to the public.
EMAIL_ADDRESS String
Description The email address for the site.
FACILITY_BUILT DateTime
Description The date the site was built.
FAX String
Description The fax number for the site.
GATE_HOURS String
Description The gate access hours for the site as entered by the admin.
GATE_TYPE_ID Long
Description The gate type ID number. Each gate provider has its own unique information. The ID is the identifier of the provider.
GOLIVE DateTime
Description The date and time the Store application went live at the site.
LINE1 String
Description The first line of the street address for the site.
LINE2 String
Description The second line of the street address for the site.
LINE3 String
Description The third line of the street address for the site.
MAP_INDEX String
Description The map URL address to the site’s location as entered by the admin.
PARENT_SITE Long
Description The parent site’s ID number.
PHONE String
Description The primary phone number for the site.
PHOTO_INDEX String
Description The URL  to the site’s photo image to display on the Store work space.
POSTAL_CODE String
Description The postal/ZIP code for the address.
PROPERTY_TYPE Integer
Description The property type of the site.
Available values:

  • Self-Storage/Mini-Storage
  • Other/Undefined Property Type
SITE_HOURS String
Description The business hours for the site as entered by the admin.
SITE_ID Long
Description The site’s ID number.
STATE String
Description The state/province for the address.
TIMEZONE_OFFSET Integer
Description The number of time zones, plus or minus Mountain Time where the site resides.

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 GetSiteDetails request object and a GetSiteDetails response object. We can define and create those like this:

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

Here’s my sample code of the Request object.

 // assign values to the request
request.SiteID = new long[] { 123456 };

Finally we can call the method and pass across the login object and the request object to get our site details. 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.GetSiteDetails(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. 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 )

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