POST - Stock parameters

Post updated Stock parameters.

URL

Verb Url Json object
POST - Basic authentication /api/Stock?ShopCode=shop code 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, if omitted only the NewStockQuantity will be processed */
            "Eancode":"1234567890123",
            "BranchIdentifier":"FL_NL_1", /* As provided */
            "StockProduct":True,
            "Minimum":0.0, /* Not mandatory */
            "Maximum":0.0, /* Not mandatory */
            "NewStockQuantity":0.0, /* Not Mandatory */
            "Ordered":0.0, /* To adhere to StockParameters object */
            "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();
            }
        }