What's your biggest current challenge? Have your say in Community Polls along the right column.

"xxxx.myshopify.com/admin/api/2023-10/products/count.json" responding with "count":0

"xxxx.myshopify.com/admin/api/2023-10/products/count.json" responding with "count":0

ds_
Shopify Partner
2 0 1

 

Here the code, please suggest to get the products count.

 

var client = new RestClient("https://xxx.myshopify.com/");
var request = new RestRequest("/admin/api/2023-10/products/count.json", Method.Get);

request.RequestFormat = DataFormat.Json;
request.AddHeader("X-Shopify-Access-Token", "xxxtoaken");

 

var response = client.ExecuteAsync<string>(request);

var r = JsonConvert.DeserializeObject<dynamic>(response.Result.Content);
var count = r.count;

Replies 0 (0)