POST - Order advice

Post stockparameter to orderadvice. The product will only be added to the order advice if it suffices to the advice rules. e.g. the product should be available to order

URL

Verb Url Json object
POST - Basic authentication /api/Advice Array of StockParameters

Request Parameters

Parameter Description Format
ShopCode Shop identifier as provided with your account string

Json: Array of StockParameters

    
            [
            {

            "ArtikelIdentifier":"LX_NL_123", /* Identifier of Product */
            "Eancode":"1234567890123",
            "BranchIdentifier":"FL_NL_1", /* As provided */
            "StockProduct":True, /* Not applicable */
            "Minimum":0.0, /* Not applicable */
            "Maximum":0.0, /* Not applicable */
            "NewStockQuantity":0.0, /* The amount wanted on the advice in consumer units */
            "Employee":"Webshop", /* As Provided */

            },
            { ... (next StockParameter) ... }

            ]
        

Response Elements

Name Description Example
Status "Success" with Http status 200. Otherwise an error will be given as an internal server error {"Error":"Not Authorized"}

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();
            }
        }