DonorDrive / PublicAPI

Documentation and Examples for the DonorDrive Public API
MIT License
37 stars 12 forks source link

Getting all of the donations from an endpoint? #58

Open Gegbee opened 2 years ago

Gegbee commented 2 years ago

Is there a way to get all the donations from the donor drive API endpoint? The array return from a GET request seems to be limited to 100 with setting the limit URL parameter.

Thanks, Greg

Zosoled commented 2 years ago

You have to paginate through the results 100 at a time by using the offset query parameter. You can check while paginating for the presence of the Next property in the response to see if there are more records, and you can use the Num-Records property to double-check that you got all of them at the end of your query loop. https://github.com/DonorDrive/PublicAPI/blob/master/overview.md#array-based-endpoints