Как упомянуто в https://orderhive.docs.apiary.io/#reference / product / product-catalog / product-catalog *
default
size
равно 20 и максимальный размер 1000
Пример вызова в C# как ниже. Вы можете изменить URI & StringContent
в содержимом в качестве параметра, как требуется:
//Common testing requirement. If you are consuming an API in a sandbox/test region, uncomment this line of code ONLY for non production uses.
//System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
//Be sure to run "Install-Package Microsoft.Net.Http" from your nuget command line.
using System;
using System.Net.Http;
var baseAddress = new Uri("https://private-anon-c49488141a-orderhive.apiary-mock.com/");
using (var httpClient = new HttpClient{ BaseAddress = baseAddress })
{
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("authorization", "AWS Signature Headers(check in above Authentication flow)");
using (var content = new StringContent("{ \"types\": [ \"7\", \"1\" ], \"qty_ranges\": [ { \"min\": \"1\", \"max\": \"2\", \"warehouse_id\": \"\", \"key\": \"available_qty\" } ], \"date_ranges\": [ { \"min\": \"1560760921\", \"max\": \"1560769921\", \"key\": \"modified\" } ], \"query\": \"nike\"}"))
{
using (var response = await httpClient.PostAsync("product/listing/flat?size=500", content))
{
string responseData = await response.Content.ReadAsStringAsync();
}
}
}