States and Subdivisions API
Use the States and Subdivisions API to retrieve Velosity's read-only state, province, and other subdivision reference data. Each subdivision belongs to a country and has an abbreviation and display name.
All requests require the authentication described in API Authentication.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET |
/v1/setup/states |
Returns all states and subdivisions, ordered by abbreviation. |
GET |
/v1/setup/countries/{CountryID}/subdivisions |
Returns the states and subdivisions for one country, ordered by abbreviation. |
CountryID is the Velosity country identifier. Retrieve it from the Countries API; do not substitute the country code in this route.
State or subdivision response
Each endpoint returns an array of state or subdivision objects.
| Field | Description |
|---|---|
id |
Internal numeric subdivision identifier. |
countryID |
Velosity identifier of the country that owns the subdivision. |
abbr |
State, province, or subdivision abbreviation. |
name |
State, province, or subdivision display name. |
Examples
GET /v1/setup/states HTTP/1.1
Host: api.velosity.one
X-APIKEY: your-api-key
GET /v1/setup/countries/{CountryID}/subdivisions HTTP/1.1
Host: api.velosity.one
X-APIKEY: your-api-key
For address validation rules when creating or importing Customer Ship-To addresses, see Customer Ship-To.