Skip to content

Countries API

Use the Countries API to retrieve the country records supported by Velosity. Country records are read-only reference data and include a stable Velosity identifier, a country code, and a display name.

All requests require the authentication described in API Authentication.

Endpoints

Method Endpoint Description
GET /v1/setup/countries Returns all countries, ordered by name.
GET /v1/setup/countries/{CountryID} Returns one country by its Velosity identifier.
GET /v1/setup/countries/codes/{code} Returns one country by its country code.

CountryID is the Velosity country identifier returned by the API. code is the country code returned in a country record, such as US.

Country response

Each endpoint returns a country object, or an array of country objects for the list endpoint.

Field Description
countryID Velosity identifier for the country. Use this value in endpoints that require a CountryID.
id Internal numeric country identifier.
code Country code.
name Country display name.

Examples

GET /v1/setup/countries HTTP/1.1
Host: api.velosity.one
X-APIKEY: your-api-key
GET /v1/setup/countries/codes/US HTTP/1.1
Host: api.velosity.one
X-APIKEY: your-api-key

Use the returned countryID to retrieve the country's states or other subdivisions. See States and Subdivisions.