Stores
Your stores
List the stores and kiosks you have registered as purchase locations, in the mode of your API key.
GET
https://afropin.com/api/v1/reseller/stores
HMAC-signed request with a unique Idempotency-Key header. Authentication
With an SDK
PHP
$afropin->reseller->stores->list($params)Node.js
afropin.reseller.stores.list(params)Python
afropin.reseller.stores.list(params)Java
afropin.reseller().stores().list(params)Query parameters
page
integer | "all"
Optional
Page to return, starting at 1. Pass all to return every location without pagination.
limit
integer
Optional
Locations per page. Defaults to 20.
Response fields
idLocation ID. Send it as
store_id when you issue or top up a PIN.latitude, longitudeReturned as strings.
title, address, country, state, city, postal_codeAs saved.
Active and inactive locations are both listed, and the response does not say which is which. Paged responses carry a
paging object; it is left out when page=all.Request
GET /api/v1/reseller/stores?page=1&limit=20
Response 200
{
"ok": true,
"data": [
{
"id": "9f1c2e7a-4b22-4c10-9a3e-7d2f1b6c8a90",
"title": "Lekki Phase 1 Kiosk",
"latitude": "6.4474",
"longitude": "3.4723",
"address": "14 Admiralty Way",
"country": "NG",
"city": "Lagos",
"state": "LA",
"postal_code": "106104"
}
],
"paging": {
"page": 1,
"pages": 1,
"per_page": 20,
"total": 1,
"next": null,
"previous": null
}
}
Errors
Failed requests return a stable code with a translated message. Branch on code, never on the message.
{
"ok": false,
"error": {
"code": "invalid_api_key",
"message": "This API key is unknown, revoked or expired, or live access is not switched on",
"fields": null
}
}
All error codes →