countries
Description
This property helper gives you all the countries we support. If you include ?include_regions
in the URL, you will also see the region codes, names, and additional information for countries which have defined regions. By default, only active countries are shown, but you can view all if you pass in ?active=false
.
The values
JSON object has the following properties
- default: The default name for this country.
- cc2: The official 2 character country code.
- cc3: The official 3 character country code.
- alternate_values: Array of alternative names for this country.
- boost: This value determines which countries will show up first in our find-as-you-type system.
- has_regions: (boolean) If
include_regions
is passed in, this will be replaced withregions
, an array of region information for this country, or this will be true or false. - regions_required: (boolean) whether or not this country requires regions for shipping.
- regions_type: What type of region this is such as state, province, etc.
- active: (boolean) if this country is currently internationally recognize.
Interact with this resource
To interact with this resource and see it in the context of the API, you can utilise Postman or your Terminal/Console to perform requests. If you have a Foxy store, you can also use the API browser in the admin to interact with resources connected to your store.
Actions
- GET
- View a countries
- HEAD
- Get just the header response
- OPTIONS
- Get a response explaining which HTTP methods are supported
Properties
Property | Description | Type | Constraints |
---|---|---|---|
message | A small, human readable explanation of this property helper. | String | Read only |
values | JSON objects with the country codes as the keys. | JSON | Read only |
Example Representation
{ "_links": { "curies": [ { "name": "fx", "href": "https://api.foxycart.com/rels/{rel}", "templated": true } ], "self": { "href": "https://api.foxycart.com/property_helpers/countries", "title": "List of valid country values for any country setting such as the Store resource store_country." }, "fx:property_helpers": { "href": "https://api.foxycart.com/property_helpers", "title": "Property Helpers Home" } }, "message": "The values listed here are the correct values for the Store store_country field. The values are listed in the format value => description.", "values": { "AF": { "default": "Afghanistan", "cc2": "AF", "cc3": "AFG", "alternate_values": [ "Afghanestan", "\u0627\u0641\u063a\u0627\u0646\u0633\u062a\u0627\u0646" ], "boost": "1", "has_regions": false, "regions_required": false, "regions_type": "state", "active": true }, "AX": { "default": "\u00c5land Islands", "cc2": "AX", "cc3": "ALA", "alternate_values": [ "Landskapet \u00c5land", "Aaland", "Aland" ], "boost": "0.2", "has_regions": false, "regions_required": false, "regions_type": "state", "active": true }, ... } }
<?xml version="1.0" encoding="UTF-8"?> <resource href="https://api.foxycart.com/property_helpers/countries"> <link rel="self" href="https://api.foxycart.com/property_helpers/countries" title="List of valid country values for any country setting such as the Store resource store_country."/> <link rel="https://api.foxycart.com/rels/property_helpers" href="https://api.foxycart.com/property_helpers" title="Property Helpers Home"/> <message>The values listed here are the correct values for the Store store_country field. The values are listed in the format value =&gt; description.</message> <values> <AF> <default>Afghanistan</default> <cc2>AF</cc2> <cc3>AFG</cc3> <alternate_values>Afghanestan</alternate_values> <alternate_values>افغانستان</alternate_values> <boost>1</boost> <has_regions>false</has_regions> <regions_required>false</regions_required> <regions_type>state</regions_type> <active>true</active> </AF> <AX> <default>Åland Islands</default> <cc2>AX</cc2> <cc3>ALA</cc3> <alternate_values>Landskapet Åland</alternate_values> <alternate_values>Aaland</alternate_values> <alternate_values>Aland</alternate_values> <boost>0.2</boost> <has_regions>false</has_regions> <regions_required>false</regions_required> <regions_type>state</regions_type> <active>true</active> </AX> ... </values> </resource>
{ "properties": { "message": "The values listed here are the correct values for the Store checkout_type field. The values are listed in the format value => description.", "values": { "default_account": "Allow guest and customer accounts, default to account", "default_guest": "Allow guest and customer accounts, default to guest", "account_only": "Allow customer accounts only", "guest_only": "Allow guests only" } }, "links": [ { "rel": [ "self" ], "href": "https://api.foxycart.com/property_helpers/checkout_types" }, { "rel": [ "https://api.foxycart.com/rels/property_helpers" ], "href": "https://api.foxycart.com/property_helpers" } ] }
Zoomable Resources
This resource has no linked resources which can be "zoomed" in on, filtered and embedded within this resource.