Skip to main content
GET
/
country
/
cities
Get cities by state
curl --request GET \
  --url https://store.salesive.com/api/v1/country/cities \
  --header 'Authorization: Bearer <token>' \
  --header 'x-shop-id: <api-key>'
{
  "status": 200,
  "success": true,
  "message": "Cities retrieved",
  "data": [
    "Alimosho",
    "Ikeja",
    "Surulere"
  ]
}

Request

GET /country/cities?shortName=NG&state=lagos
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}

Headers

HeaderTypeDescription
AuthorizationstringProvide the customer token in the format Bearer <jwt>.
x-shop-idstringIdentify the shop for which the country metadata is requested.

Query parameters

ParameterTypeDescription
shortNamestringCountry short code (e.g., NG, US, GB). Defaults to NG if omitted.
statestringState/region name to pull cities for. Required.

Request examples

Nigerian cities

GET /country/cities?shortName=NG&state=lagos

United States cities

GET /country/cities?shortName=US&state=california

United Kingdom cities

GET /country/cities?shortName=GB&state=london

Successful response

{
    "status": 200,
    "success": true,
    "message": "Cities retrieved",
    "data": ["Alimosho", "Ikeja", "Surulere"]
}

Error responses

400 Bad Request

{
    "status": 400,
    "success": false,
    "message": "State is required",
    "data": {}
}

404 Not Found

{
    "status": 404,
    "success": false,
    "message": "Country not found",
    "data": {}
}

Authorizations

Authorization
string
header
required

JWT issued by the Salesive Store API for authenticated shoppers.

x-shop-id
string
header
required

Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Query Parameters

shortName
string
default:NG

Country short name (e.g., NG, US, GB). Defaults to NG if not provided.

state
string
required

State/region name to retrieve cities for.

Response

Cities retrieved successfully.

status
integer
Example:

200

success
boolean
Example:

true

message
string
Example:

"Cities retrieved"

data
string[]
Example:
["Alimosho", "Ikeja", "Surulere"]