Skip to main content

Country Selection

Calling the right country for your REST API integration

To call the right REST API endpoint, you need to select REST API URL based on the record’s country attribution.

const get_api_url = (country) => `https://${country}`;

Calling the right country for your Web Services integration

As the result, after saving the Web Services endpoint you will get a Web Services URL address through which you need to route requests with regulated data. You need to apply a new request path only to requests that were specified in the Web Services endpoint.

Within your web application, you need to do the following:

  1. Create a separate field (for regulated records) that will store the country attribution. Depending on the value within this field, your web application will run a normal flow or a flow to handle records through Web Services and save or query clear-text values to or from InCountry DRaaS.

  2. Implement a static function that returns a URL for the request based on the record’s country attribution.

const get_border_url = (country, client_id) => `https://${country}${client_id}`;

So, before integration with InCountry DRaaS, your web application was using one URL for the same request, as follows:


After integration with InCountry DRaaS, you will have two URLs for request execution:

  1. for non-regulated records: a request is executed through the web application’s backend:

  2. for regulated records: a request is proxied through the Web Services: