Skip to content

Preferred Regions

APIs for managing a tenant's preferred country/region list for App Store lookups

Set Preferred Regions for Tenant

Request

API to set the preferred country/region list for a tenant. This overwrites any existing value (upsert). Country codes must be valid ISO 3166-1 alpha-2 codes (2-character uppercase).

Security
apiKey
Bodyapplication/jsonrequired
countriesArray of stringsrequired

List of ISO 3166-1 alpha-2 country codes (2-character uppercase). An empty array clears the tenant's preferred region preference.

Example:
[ "AU", "IN", "US" ]
cURL
curl -i -X POST \
  https://develop-api.esper.io/_mock/openapi/v2/preferred-regions \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "countries": [
      "AU",
      "IN",
      "US"
    ]
  }'

Responses

Success

Bodyapplication/json
contentobject(TenantPreferredRegions)
Response
{ "content": { "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0", "countries": [], "created_by": "string", "created_at": "2019-08-24T14:15:22Z", "updated_by": "string", "updated_at": "2019-08-24T14:15:22Z" } }