Edit a store
Replace the details of one of your redemption locations, or disable it.
HMAC-signed request with a unique Idempotency-Key header. Authentication
$afropin->brand->stores->update($storeId, $params)afropin.brand.stores.update(storeId, params)afropin.brand.stores.update(store_id, params)afropin.brand().stores().update(storeId, params)Path parameters
The location id. It must be one of your redemption locations in the mode of your API key.
Body parameters
Store name.
Street address.
Latitude in decimal degrees.
Longitude in decimal degrees.
City.
ISO2 code of a state in country, for example LA for Lagos. Any other value fails with invalid_state_iso2.
Postal or ZIP code, checked against the format used in country.
ISO 3166-1 alpha-2 country code, in capitals, for example NG.
true keeps the location active, false disables it.
status.Location object
Location ID. Send it as store_id when redeeming.
Store name, saved with each word capitalised.
Latitude, as a decimal string.
Longitude, as a decimal string.
Street address.
ISO 3166-1 alpha-2 country code.
City.
State ISO2 code within the country.
Postal or ZIP code.
Request
{
"title": "Lekki Phase 1 Store",
"address": "12 Admiralty Way",
"latitude": 6.4474,
"longitude": 3.4723,
"city": "Lagos",
"state": "LA",
"postal_code": "106104",
"country": "NG",
"status": true
}
Response 200
{
"ok": true,
"data": {
"id": "5c1e8f2a-7b3d-4e19-a6c0-2d9f4b8e1a73",
"title": "Lekki Phase 1 Store",
"latitude": "6.4474",
"longitude": "3.4723",
"address": "12 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
redemption_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": "redemption_location_not_found",
"message": "No store of yours has this id",
"fields": null
}
}
All error codes →