curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/countries/{iso}{
"data": {
"id": "1",
"type": "country",
"attributes": {
"iso": "US",
"iso3": "USA",
"iso_name": "UNITED STATES",
"name": "United States",
"states_required": true,
"zipcode_required": true,
"default": true
},
"relationships": {
"states": {
"data": [
{
"abbr": "NY",
"name": "New York"
}
]
}
}
},
"included": [
{
"abbr": "NY",
"name": "New York"
}
]
}Returns the details of a specific country.
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/countries/{iso}{
"data": {
"id": "1",
"type": "country",
"attributes": {
"iso": "US",
"iso3": "USA",
"iso_name": "UNITED STATES",
"name": "United States",
"states_required": true,
"zipcode_required": true,
"default": true
},
"relationships": {
"states": {
"data": [
{
"abbr": "NY",
"name": "New York"
}
]
}
}
},
"included": [
{
"abbr": "NY",
"name": "New York"
}
]
}Provide a Country ISO US or ISO3 USA code.
"GB"
Specify the related resources you would like to receive in the response body. More Information.
Specify the fields you would like returned in the response body. More information.
200 Success - Returns the country object.
Countries within Spree are used as a container for states. Countries can be zone members, and also link to an address. The difference between one country and another on an address record can determine which tax rates and shipping methods are used for the order.Read more about Countries in Spree
Show child attributes
Show child attributes
Was this page helpful?