Stores
Edit a store
Replace the details of a purchase location, or switch it off. Send every field, not only the ones that change.
HMAC-signed request with a unique Idempotency-Key header. Authentication
$afropin->reseller->stores->update($storeId, $params)afropin.reseller.stores.update(storeId, params)afropin.reseller.stores.update(store_id, params)afropin.reseller().stores().update(storeId, params)Path parameters
The location id. It must belong to your account and to the mode of your API key.
Body parameters
Store name. Saved in title case.
Street address.
Latitude of the store.
Longitude of the store.
ISO 3166-1 alpha-2 country code, for example NG.
State code within country, for example LA for Lagos.
City.
Postal or ZIP code. It must be valid for country.
true to keep the location active, false to switch it off. An inactive location is rejected as store_id with invalid_store_id.
Response fields
idstore_id when you issue or top up a PIN.latitude, longitudetitle, address, country, state, city, postal_codeRequest
{
"title": "Lekki Phase 1 Kiosk",
"address": "14 Admiralty Way",
"latitude": 6.4474,
"longitude": 3.4723,
"country": "NG",
"state": "LA",
"city": "Lagos",
"postal_code": "106104",
"status": true
}
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"
}
}
Errors
Failed requests return a stable code with a translated message. Branch on code, never on the message.
wrong_account_type
Your account type cannot use this endpoint
purchase_location_not_found
No store of yours has this id
validation_error
Some fields are missing or invalid
invalid_country_iso2
country must be a two-letter ISO code we know
invalid_state_iso2
state must be the ISO code of a state in that country
invalid_postal_code
postal_code is not in that country's format
rate_limited
Too many requests. Wait a moment and try again
internal_error
Something went wrong on our side. Try again; if it keeps happening, contact support
{
"ok": false,
"error": {
"code": "purchase_location_not_found",
"message": "No store of yours has this id",
"fields": null
}
}
All error codes →