GET api/customersite/{id}/{option}
Returns a set of Customer Site records based on the option parameter. The id parameter may or may not be used. Possible values for the option parameter are: 'ByCustomerId' - all site records for Customer where id = customerId, 'ByCustomerNumber' - all site records for Customer where id = Customer_Number
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
id | string |
Required |
|
option | string |
Required |
Body Parameters
None.
Response Information
Resource Description
Collection of CustomerSiteName | Description | Type | Additional information |
---|---|---|---|
CustomerSiteId |
Sedona internal autonumber for the Customer Site record |
integer |
None. |
CustomerId |
Foreign key from AR_Customer table (required for POST and PUT, but cannot be changed on a PUT) |
integer |
Required |
TaxGroupCode |
Value from AR_Taxing_Group table; set to N/A if not applicable; list of valid options can be retrieved from GET: api/taxinggroup |
string |
None. |
BranchCode |
Value from AR_Branch table; list of valid options can be retrieved from GET: api/branch |
string |
Required String length: inclusive between 0 and 25 |
IsCommercial |
True for Commercial account; false for Residential |
boolean |
Required |
SiteName |
If a person, CustomerName should be passed in as "Last, First" |
string |
Required String length: inclusive between 0 and 60 |
Address1 | string |
Required String length: inclusive between 0 and 60 |
|
Address2 | string |
String length: inclusive between 0 and 60 |
|
Address3 | string |
String length: inclusive between 0 and 60 |
|
City |
City name; must exist in the GE_Table1 table |
string |
Required |
State |
State 2 letter abbreviation; must exist in the GE_Table2 table |
string |
Required |
Zip |
Zip code, not inclusive of extension (i.e. first 5 digits for U.S. zip); must exist in the GE_Table3 table |
string |
Required |
County |
County name; must exist in the GE_Table4 table; defaults to N/A if not supplied |
string |
None. |
ZipExt |
Last 4 of zip code |
string |
String length: inclusive between 0 and 10 |
CountryAbbrev |
Country code; must exist in the SS_Country table (Abbrev column); defaults to "USA" if not supplied |
string |
None. |
Phone1 | string |
String length: inclusive between 0 and 12 |
|
Phone2 | string |
String length: inclusive between 0 and 25 |
|
Fax | string |
String length: inclusive between 0 and 25 |
|
string |
String length: inclusive between 0 and 50 |
||
Comments | string |
String length: inclusive between 0 and 255 |
|
MapCode |
Map Code (for directional purposes). This information will display on service tickets. |
string |
String length: inclusive between 0 and 15 |
CrossStreet |
Cross street name for this site. This information will display on service tickets. |
string |
String length: inclusive between 0 and 50 |
CustomerSince |
The installation date of this site; defaults to today if not supplied |
string |
None. |
Inactive |
Set to true to make this site inactive |
boolean |
None. |
ExternalLink |
defaults to empty string if not needed |
string |
String length: inclusive between 0 and 25 |
ExternalSerialNumber |
defaults to empty string if not needed |
string |
String length: inclusive between 0 and 25 |
ExternalVersionNumber |
defaults to empty string if not needed |
string |
String length: inclusive between 0 and 25 |
CycleTaxGroupCode |
Value from AR_Taxing_Group table; Taxing Group that recurring invoices for this site will use; defaults to N/A if not supplied; list of valid options can be retrieved from GET: api/taxinggroup |
string |
None. |
TaxExemptNum |
Applies only to tax exempt organizations (i.e. government/nonprofit) |
string |
String length: inclusive between 0 and 20 |
GSTTaxExemptNum |
Applies only to tax exempt organizations in Canada (i.e. government/nonprofit) |
string |
String length: inclusive between 0 and 20 |
SiteNumber | string |
String length: inclusive between 0 and 20 |
|
CustomerBillId |
Foreign key from AR_Customer_Bill table; links this site to a billing address |
integer |
Required |
BusinessName2 | string |
String length: inclusive between 0 and 60 |
Response Formats
application/json, text/json
[ { "CustomerSiteId": 1, "CustomerId": 1, "TaxGroupCode": "sample string 2", "BranchCode": "sample string 3", "IsCommercial": true, "SiteName": "sample string 4", "Address1": "sample string 5", "Address2": "sample string 6", "Address3": "sample string 7", "City": "sample string 8", "State": "sample string 9", "Zip": "sample string 10", "County": "sample string 11", "ZipExt": "sample string 12", "CountryAbbrev": "sample string 13", "Phone1": "sample string 14", "Phone2": "sample string 15", "Fax": "sample string 16", "Email": "sample string 17", "Comments": "sample string 18", "MapCode": "sample string 19", "CrossStreet": "sample string 20", "CustomerSince": "sample string 21", "Inactive": true, "ExternalLink": "sample string 22", "ExternalSerialNumber": "sample string 23", "ExternalVersionNumber": "sample string 24", "CycleTaxGroupCode": "sample string 25", "TaxExemptNum": "sample string 26", "GSTTaxExemptNum": "sample string 27", "SiteNumber": "sample string 28", "CustomerBillId": 29, "BusinessName2": "sample string 30" }, { "CustomerSiteId": 1, "CustomerId": 1, "TaxGroupCode": "sample string 2", "BranchCode": "sample string 3", "IsCommercial": true, "SiteName": "sample string 4", "Address1": "sample string 5", "Address2": "sample string 6", "Address3": "sample string 7", "City": "sample string 8", "State": "sample string 9", "Zip": "sample string 10", "County": "sample string 11", "ZipExt": "sample string 12", "CountryAbbrev": "sample string 13", "Phone1": "sample string 14", "Phone2": "sample string 15", "Fax": "sample string 16", "Email": "sample string 17", "Comments": "sample string 18", "MapCode": "sample string 19", "CrossStreet": "sample string 20", "CustomerSince": "sample string 21", "Inactive": true, "ExternalLink": "sample string 22", "ExternalSerialNumber": "sample string 23", "ExternalVersionNumber": "sample string 24", "CycleTaxGroupCode": "sample string 25", "TaxExemptNum": "sample string 26", "GSTTaxExemptNum": "sample string 27", "SiteNumber": "sample string 28", "CustomerBillId": 29, "BusinessName2": "sample string 30" } ]
application/xml, text/xml
<ArrayOfCustomerSite xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models"> <CustomerSite> <Address1>sample string 5</Address1> <Address2>sample string 6</Address2> <Address3>sample string 7</Address3> <BranchCode>sample string 3</BranchCode> <BusinessName2>sample string 30</BusinessName2> <City>sample string 8</City> <Comments>sample string 18</Comments> <CountryAbbrev>sample string 13</CountryAbbrev> <County>sample string 11</County> <CrossStreet>sample string 20</CrossStreet> <CustomerBillId>29</CustomerBillId> <CustomerId>1</CustomerId> <CustomerSince>sample string 21</CustomerSince> <CustomerSiteId>1</CustomerSiteId> <CycleTaxGroupCode>sample string 25</CycleTaxGroupCode> <Email>sample string 17</Email> <ExternalLink>sample string 22</ExternalLink> <ExternalSerialNumber>sample string 23</ExternalSerialNumber> <ExternalVersionNumber>sample string 24</ExternalVersionNumber> <Fax>sample string 16</Fax> <GSTTaxExemptNum>sample string 27</GSTTaxExemptNum> <Inactive>true</Inactive> <IsCommercial>true</IsCommercial> <MapCode>sample string 19</MapCode> <Phone1>sample string 14</Phone1> <Phone2>sample string 15</Phone2> <SiteName>sample string 4</SiteName> <SiteNumber>sample string 28</SiteNumber> <State>sample string 9</State> <TaxExemptNum>sample string 26</TaxExemptNum> <TaxGroupCode>sample string 2</TaxGroupCode> <Zip>sample string 10</Zip> <ZipExt>sample string 12</ZipExt> </CustomerSite> <CustomerSite> <Address1>sample string 5</Address1> <Address2>sample string 6</Address2> <Address3>sample string 7</Address3> <BranchCode>sample string 3</BranchCode> <BusinessName2>sample string 30</BusinessName2> <City>sample string 8</City> <Comments>sample string 18</Comments> <CountryAbbrev>sample string 13</CountryAbbrev> <County>sample string 11</County> <CrossStreet>sample string 20</CrossStreet> <CustomerBillId>29</CustomerBillId> <CustomerId>1</CustomerId> <CustomerSince>sample string 21</CustomerSince> <CustomerSiteId>1</CustomerSiteId> <CycleTaxGroupCode>sample string 25</CycleTaxGroupCode> <Email>sample string 17</Email> <ExternalLink>sample string 22</ExternalLink> <ExternalSerialNumber>sample string 23</ExternalSerialNumber> <ExternalVersionNumber>sample string 24</ExternalVersionNumber> <Fax>sample string 16</Fax> <GSTTaxExemptNum>sample string 27</GSTTaxExemptNum> <Inactive>true</Inactive> <IsCommercial>true</IsCommercial> <MapCode>sample string 19</MapCode> <Phone1>sample string 14</Phone1> <Phone2>sample string 15</Phone2> <SiteName>sample string 4</SiteName> <SiteNumber>sample string 28</SiteNumber> <State>sample string 9</State> <TaxExemptNum>sample string 26</TaxExemptNum> <TaxGroupCode>sample string 2</TaxGroupCode> <Zip>sample string 10</Zip> <ZipExt>sample string 12</ZipExt> </CustomerSite> </ArrayOfCustomerSite>