-
Web Service URL: https://[SERVER_ADDRESS]/GeneralWS/GeneralData2.asmx
-
MPS Version: From 5.5.0
Description
This method registers a new Customer Stock with the provider. If the Customer Stock already exists, this method can be used to update address information.
Syntax
public string ImportCompanyStocks(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 |
|
StockName |
Text |
Yes |
- |
- |
255 |
Name of the stock to be registered |
|
Description |
Text |
Yes |
- |
- |
255 |
Description of the stock to be registered |
|
ProgDays |
Number |
Yes |
- |
- |
- |
Period in days until the next forecast is due. Allows values from 7 to 999 |
|
SecurityOnly |
Lógico |
Yes |
- |
- |
- |
Indicates whether the stock forecast is for safety stock only |
|
CountryName |
Text |
Yes |
- |
- |
100 |
Country where the stock to be registered is located |
|
StateName |
Text |
Yes |
- |
- |
100 |
State where the stock to be registered is located |
|
CityName |
Text |
Yes |
- |
- |
100 |
City where the stock to be registered is located |
|
Street |
Text |
Yes |
- |
- |
255 |
Street name where the stock to be registered is located |
|
Neighborhood |
Text |
Yes |
- |
- |
100 |
Neighborhood name where the stock to be registered is located |
|
PostalCode |
Text |
Yes |
- |
- |
20 |
Zip code where the stock to be registered is located |
|
Number |
Number |
No |
Yes |
- |
- |
Location number where the stock is located |
|
AdditionalInfo |
Text |
No |
Yes |
Yes |
255 |
Additional information about where the stock is located |
|
ContactName |
Text |
No |
- |
- |
- |
Stock contact name |
|
ContactEmail |
Text |
No |
- |
- |
- |
Stock contact email |
|
ContactPhone |
Text |
No |
- |
- |
- |
Stock contact phone number |
|
CustomField1InUse |
Logical |
No |
- |
- |
- |
Indicates whether the first additional field will be used in the stock (false - Do not use; true - Use) |
|
CustomField1Name |
Text |
No |
- |
- |
- |
Name of the first additional field |
|
CustomField1Value |
Text |
No |
- |
- |
- |
Value of the first additional field |
|
CustomField2InUse |
Logical |
No |
- |
- |
- |
Indicates whether the second additional field will be used in the stock (false - Do not use; true - Use) |
|
CustomField2Name |
Text |
No |
- |
- |
- |
Name of the second additional field |
|
CustomField2Value |
Text |
No |
- |
- |
- |
Value of the second additional field |
|
CustomField3InUse |
Logical |
No |
- |
- |
- |
Indicates whether the third additional field will be used in the stock (false - Do not use; true - Use) |
|
CustomField3Name |
Text |
No |
- |
- |
- |
Name of the third additional field |
|
CustomField3Value |
Text |
No |
- |
- |
- |
Value of the third additional field |
Characters not allowed in parameters and the error that will be returned
|
Parameter |
Not allowed characters |
Error |
|
stockName |
; |
ERR_DATA_INVALIDSTOCKNAME |
|
description |
; |
ERR_DATA_INVALIDSTOCKDESCRIPTION |
|
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
If successful, the return is: [{“StockID”:number}], where number is the identifier number for the newly added stock.
Click here to learn more about the return 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 have full permissions in Stock Administration.