-
Web Service URL: https://[SERVER_ADDRESS]/GeneralWS/GeneralData2.asmx
-
MPS Version: From 5.5.0
Description
This method registers or updates a site for a company in the provider's system. If you enter the name of a site that does not yet exist for the company, the method will register it. If you enter the name of a site that is already registered, the method will update the site's address data.
Syntax
public string ImportSite(string properties)
Setting Properties
The content of string properties must be text in JSON format containing the properties listed below. For example:
{"DealerName":"dealer","DealerUserEmail":"user@example.com","DealerUserPassword":"k1BAv1w=="}
You don't need to worry about whether property names are uppercase or lowercase; the Web Service is Case-Insensitive.
Properties accepted by the method
|
Property |
Type |
Required |
Allows null |
Allows empty |
Maximum size |
Description |
|
DealerName |
Text |
Yes |
- |
- |
- |
Provider name |
|
DealerUserEmail |
Text |
Yes |
- |
- |
- |
Provider user email |
|
DealerUserPassword |
Text |
Yes |
- |
- |
- |
Encrypted user password |
|
EnterpriseID |
Number |
Yes |
- |
- |
- |
Identification number of the company where the site will be created. Obtained via the GetEnterprises method |
|
SiteName |
Text |
Yes |
- |
- |
255 |
Name of the site to be created or updated |
|
CountryName |
Text |
Yes |
- |
- |
100 |
Country where the site is located |
|
StateName |
Text |
Yes |
- |
- |
100 |
State where the site is located |
|
CityName |
Text |
Yes |
- |
- |
100 |
City where the site is located |
|
Street |
Text |
Yes |
- |
- |
255 |
Street name where the site is located |
|
Neighborhood |
Text |
No |
- |
- |
100 |
Neighborhood name where the site is located |
|
PostalCode |
Text |
No |
- |
- |
20 |
Zip code of the site |
|
Number |
Number |
No |
- |
- |
- |
Address number where the site is located |
|
AdditionalInfo |
Text |
No |
Yes |
Yes |
255 |
Additional information about the site's location |
Characters not allowed in parameters and the error that will be returned
|
Parameter |
Unallowed characters |
Error |
|
siteName |
,|'+ |
ERR_DATA_INVALIDSITENAME |
|
countryName |
!@#$%¨&*=§[]{}ºª?/°;:><\/+-.,_()³£¢¬²+|´`´~^+\ |
ERR_DATA_INVALIDCOUNTRYNAME |
|
stateName |
!@#$%¨&*=§[]{}ºª?/°;:><\/+-.,_()³£¢¬²+|´`´~^+\ |
ERR_DATA_INVALIDSTATENAME |
|
cityName |
!@#$%¨&*=§[]{}ºª?/°;:><\/+-.,_()³£¢¬²+|´`´~^+\ |
ERR_DATA_INVALIDCITYNAME |
|
street |
!@#$%¨&*=§[]{}ºª?/°;:><\/+-.,_()³£¢¬²+|´`´~^+\ |
ERR_DATA_INVALIDSTREET |
|
neighborhood |
!@#$%¨&*=§[]{}ºª?/°;:><\/+-.,_()³£¢¬²+|´`´~^+\ |
ERR_DATA_INVALIDNEIGHBORHOOD |
|
postalCode |
!@#$%¨&*=§[]{}ºª?/°;:><\/+.,_()³£¢¬²+|´`´~^+\ |
ERR_DATA_INVALIDPOSTALCODE |
Return Value
If successful, the return value is: [{“SiteID”:number}], where number is the identifier number for the newly added site.
Click here to learn more about the response format.
Possible errors returned
Click here to view the possible errors that may be returned and learn their reasons.
Restrictions
-
To execute this method, the specified user must be an Administrator on the provider.