Country Tutorial

Supported countries

The Emporix e-commerce system does not impose any restrictions as to which countries can be configured as your business's locations.

Country configurations

The countries where your business is located are specified both tenant-wide and independently for particular sites.

Country codes defined in country configurations must be compliant with the ISO 3166-1 alpha-2 standard.

Your tenant's country configuration is stored under the project_country key in the Emporix API Configuration Service.

{
  "key": "project_country",
  "value": "DE"
}

Site-specific country configuration is stored in the homeBase field, inside the Site object.

{
  "homeBase": {
    "address": {
      "zipCode": "10115",
      "country": "DE"
    }
  }
}

Managing country configurations through Emporix API

Check out the following tutorials to learn more about country configuration with Emporix API.

How to check which country is configured for your tenant

To retrieve your tenant's country configuration, you need to send a request to the Retrieving a configuration endpoint.

API Reference
curl -L \
  --url 'https://api.emporix.io/configuration/{tenant}/configurations/{propertyKey}' \
  --header 'Accept: */*'

How to change your tenant's country configuration

To change your tenant's country configuration, you need to send a request to the Updating a configuration endpoint with updated country information in the request body.

API Reference
curl -L \
  --request PUT \
  --url 'https://api.emporix.io/configuration/{tenant}/configurations/{propertyKey}' \
  --header 'Content-Type: application/json' \
  --data '{
    "key": "project_country",
    "secured": false,
    "value": "DE",
    "version": 1
  }'

How to check which country is configured for a particular site

To retrieve a particular site's country configuration, you need to send a request to the Retrieving a site endpoint. The country configuration will be returned under the homeBase field in the response body.

API Reference
curl -L \
  --url 'https://api.emporix.io/site/{tenant}/sites/{siteCode}' \
  --header 'Accept: */*'

How to change a particular site's country configuration

To change a particular site's country configuration, you need to send a request to the Partially updating a site endpoint with the address of your choice in the request body.

API Reference
curl -L \
  --request PATCH \
  --url 'https://api.emporix.io/site/{tenant}/sites/{siteCode}' \
  --header 'Content-Type: application/json' \
  --data '{
    "defaultLanguage": "en"
    "homeBase": {
    "address": {
      "street": "Platz der Republik",
      "streetNumber": "1",
      "zipCode": "11011",
      "city": "Berlin",
      "country": "DE",
      "state": "Berlin"
  }'

Last updated

Was this helpful?