Answer the question
In order to leave comments, you need to log in
What to do if there is pagination in the JSON response??
Hello! I am using retail crm api https://github.com/retailcrm/api-client-dotnet library for .Net, there is a method
Retailcrm.Versions.V4.Client api = new Retailcrm.Versions.V4.Client(product.SiteName, product.AccessToken);
Dictionary<string, object> filteredOrders = new Dictionary<string, object>
{
{ "extendedStatus", "complete" },
{ "statusUpdatedAtFrom", DateTime.Now.AddDays(-3).ToString("yyyy-MM-dd HH:mm:ss")},
{ "statusUpdatedAtTo", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}
};
Response responseFiltered = api.OrdersList(filteredOrders, 1, 100);
api.OrdersList
public class Pagination
{
public int limit { get; set; }
public int totalCount { get; set; }
public int currentPage { get; set; }
public int totalPageCount { get; set; }
}
Answer the question
In order to leave comments, you need to log in
And what's the problem? well, call the API method with a loop or asynchronous tasks until you get all the pages. Remove hardcode. Or do you want to write the code directly to you? Then it's a complaint for a job
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question