POST / PUT - Stocklocation
Post / Put Stock location information
URL
Verb |
Url |
Json object |
POST / PUT - Basic authentication |
/api/Stocklocation?ShopCode=shop code
|
Single StockLocation |
Request Parameters
Parameter |
Description |
Format |
ShopCode |
Shop identifier as provided with your account |
string |
Json: StockLocation
{
"ProductIdentifier": "LX_NL_123456", /* Identifier of the Product */
"BranchIdentifier": "FL_NL_1", /* Identifier of the Branch / ShopCode / LocationIdentifier */
"Location": { /* Specification of the location within the warehouse */
"Code": "SCP4",
"Name": "Stelling C Positie 4",
"Region": "BP",
"LocationType": "2-BIN",
"EuroPallet": false,
"BlockPallet": true,
"Position": 4,
"Heigth": 500,
"Row": 3,
"Level": 0,
"Comment": "",
"BranchIdentifier": "FL_NL_1", /* Identifier of the Branch / ShopCode / LocationIdentifier */
"RowId": 1 /* RowId of the Location. Set to 0 for new location */
},
"Warehouse": "Grote hal", /* Name of the Warehouse */
"Primary": true, /* Is this the primary location of the Product */
"RowId": 1 /* RowId of the stock locatioin. Set to 0 for new location */
}
Response Elements
{
"ProductIdentifier": "LX_NL_123456", /* Identifier of the Product */
"BranchIdentifier": "FL_NL_1", /* Identifier of the Branch / ShopCode / LocationIdentifier */
"Location": { /* Specification of the location within the warehouse */
"Code": "SCP4",
"Name": "Stelling C Positie 4",
"Region": "BP",
"LocationType": "2-BIN",
"EuroPallet": false,
"BlockPallet": true,
"Position": 4,
"Heigth": 500,
"Row": 3,
"Level": 0,
"Comment": "",
"BranchIdentifier": "FL_NL_1", /* Identifier of the Branch / ShopCode / LocationIdentifier */
"RowId": 1 /* RowId of the Location. Set to 0 for new location */
},
"Warehouse": "Grote hal", /* Name of the Warehouse */
"Primary": true, /* Is this the primary location of the Product */
"RowId": 1 /* RowId of the stock locatioin. Set to 0 for new location */
}
Code Samples
C#.net
public async void Post(List<APIObject> APIObjects, string Url, string SourceUser, SourcePassword)
{
using (System.Net.Http.HttpClient client = new System.Net.Http.HttpClient())
{
System.Net.Http.HttpContent content = Newtonsoft.Json.JsonConvert.SerializeObject(APIObjects);
string credentials = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(SourceUser + ":" + SourcePassword));
content.Headers.Add("Authorization", "Basic " + credentials);
var response = await client.PostAsync(Url, content);
var responseString = await response.Content.ReadAsStringAsync();
}
}