Menu Close

Get Support From ShopWired Close

We are conducting schedule maintenance

Subscribe To Updates
Prefer To Live Chat? Chat directly with ShopWired support Available 9.30am to 5.30pm Monday to Friday (extended hours coming soon) Quickest response time
Send A Message
Response within 24 hours

Menu Close

Menu

Countries & States

This is used to view countries and states.

Country Properties
id { "id" : 255 }
The unique ID for the country
name { "name" : "United Kingdom" }
The name of the country
iso { "iso" : "GB" }
The ISO 2 code for the country
states { "states" : [ { "id": 1, "name": "Alabama", "shortName": "AL" } ] }
The states assigned to a particular country
GET /v1/countries

Returns all countries.

virtual 1 or 0
fields Comma separated list of properties to include
GET /v1/countries
HTTP/1.1 200 OK
[
    {
        "id": 222,
        "name": "United Kingdom",
        "iso": "GB"
    }
}
        
GET /v1/countries/ID

Retrieves a single country.

embed states
fields Comma separated list of properties to include

GET /v1/countries/1?embed=states

HTTP/1.1 200 OK
{
    "id": 223,
    "name": "United States",
    "iso": "US",
    "states": [
        {
            "id": 1,
            "name": "Alabama",
            "shortName": "AL"
        }
    ]
}