Shlomi Dvir Posted May 8, 2024 Posted May 8, 2024 The List API has a limit of retrieving only 100 records per API Call. If I have more than 100 records in Sage Intacct, how can I retrieve all the records with one API Call. What is the procedure?
Members Sterio, Louis Posted May 9, 2024 Members Posted May 9, 2024 I believe you will need to use the query service for this: https://developer.sage.com/intacct/docs/openapi/common/core-query/tag/Query/
Shlomi Dvir Posted May 10, 2024 Author Posted May 10, 2024 When I tried to use the query service, I am Getting an invalidRequest invalidRequest.
Preston, Charlie Posted May 15, 2024 Posted May 15, 2024 Looks like the object needs to be the complete path company-config/department and the comma on line 11 isn't needed. This works for me: { "object": "company-config/department", "fields": [ "id", "name", "status", "href" ], "filters": [ { "$eq": { "status": "active" } } ], "orderBy": [ { "id": "asc" } ] }
Preston, Charlie Posted May 15, 2024 Posted May 15, 2024 Also looks like you need to set the "size" parameter to the page size you want and the "start" parameter to the starting position so you can page through the results. { "object": "company-config/department", "fields": [ "id", "name", "status", "href" ], "filters": [ { "$eq": { "status": "active" } } ], "orderBy": [ { "id": "asc" } ], "start" : 1, "size" : 1000 } The response gives you the total number of records, starting position and next position so you can make a subsequent call to retrieve the next page. "ia::meta": { "totalCount": 7, "start": 1, "pageSize": 1000, "next": null, "previous": null } 1
Recommended Posts