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

Request

GET /country/states?shortName=NG
x-shop-id: {{shopId}}

Headers

HeaderTypeDescription
x-shop-idstringIdentify the shop context.

Query parameters

ParameterTypeDescription
shortNamestringCountry short name (e.g., NG, US, GB). Defaults to NG.

Request examples

Get Nigerian states (default)

GET /country/states

Get US states

GET /country/states?shortName=US

Get UK states

GET /country/states?shortName=GB

Successful response

{
    "status": 200,
    "success": true,
    "message": "States retrieved",
    "data": [
        "Abia",
        "Abuja (Federal Capital Territory)",
        "Adamawa",
        "Akwa Ibom",
        "Anambra",
        "Bauchi",
        "Bayelsa",
        "Benue",
        "Borno",
        "Cross River",
        "Delta",
        "Ebonyi",
        "Edo",
        "Ekiti",
        "Enugu",
        "Gombe",
        "Imo",
        "Jigawa",
        "Kaduna",
        "Kano",
        "Katsina",
        "Kebbi",
        "Kogi",
        "Kwara",
        "Lagos",
        "Nasarawa",
        "Niger",
        "Ogun",
        "Ondo",
        "Osun",
        "Oyo",
        "Plateau",
        "Rivers",
        "Sokoto",
        "Taraba",
        "Yobe",
        "Zamfara"
    ]
}

Error response

{
    "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.

Response

States retrieved successfully.

status
integer
Example:

200

success
boolean
Example:

true

message
string
Example:

"States retrieved"

data
string[]
Example:
["Lagos", "Abuja", "Kano"]