Get Country States
Retrieve all states or provinces for a specific country.
Endpoint
GET /api/shop/countries/{countryId}/statesRequest Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
X-STOREFRONT-KEY | Yes | Your storefront API key |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
countryId | integer | Yes | Country ID |
Response Fields (200 OK)
| Field | Type | Description |
|---|---|---|
id | integer | State ID |
countryId | integer | Associated country ID |
code | string | State/province code |
name | string | State/province name |
Use Cases
- Populate state/province selector dropdowns
- Load states when country is selected in forms
- Validate shipping/billing addresses
- Display state information

