Using the API loans fetch endpoint
Process
The loan data stored in PA2 can be fetched via the API. See our Swagger documentation for more details: GET /v3/partner/{id}/loans
There are 4 search request parameters you can send: query
, status
, offset
, and limit
.
Query: can be any string that would be typed into the search bar in PA2 (e.g. name, Loan ID, Client ID or Kiva ID)
Status: can be one of the following:
refunded
inactive
inactive_expired
fundRaising
expired
raised
payingBack
ended
reviewed
issue
defaulted
Offset, limit: works the same as any pagination, offset is how far into the list to go and limit is how many results to return. So to get the first 20 matches it would be offset=0, limit=20 and the next 20 would be offset=20 limit=20, etc.. The default is offset=0 and limit=20. We don’t recommend requesting more than 300, because the volume of data can become very large and constrain server resources After making the request, the response from the API will be returned in JSON format
Technical documentation
All of Kiva's technical documentation, including endpoints, can be found here: Test environment (Stage): https://partner-api-stage.dk1.kiva.org/swagger-ui/ Production (to use after testing): https://partner-api.k1.kiva.org/swagger-ui/