Making Your First Request

Call Structure

The Public API's REST calls include URL for the environment:

  • Live -
  • Stage -

For best practice, you'll use the Stage environment for all your testing.

You'll include your API Key and Content-Type in the Headers as shown in the following call examples:

curl --request GET \
     --url \
     --header 'Accept: application/json' \
     --header 'Ocp-Apim-Subscription-Key: dedfe8bc2c1448e7b2af7d1ad95a03c4'
var client = new RestClient("");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Ocp-Apim-Subscription-Key", "dedfe8bc2c1448e7b2af7d1ad95a03c4");
IRestResponse response = client.Execute(request);
const options = {
  method: 'GET',
  headers: {
    Accept: 'application/json',
    'Ocp-Apim-Subscription-Key': 'dedfe8bc2c1448e7b2af7d1ad95a03c4'

fetch('', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

The example shows the call for Get Customer Countries. Let's break this call down:


  • GET - HTTP Verb
  • - Host
  • v1 - Version
  • customers - API
  • 299 - request parameter. In this example, it's the customerId.
  • countries - Endpoint

For Get Customer Countries endpoint, you simply pass in an Associate's customerId as a request parameter. If valid, the 200 OK response payload looks like this:

X-DirectScale-RequestId: ddca4806-ce2b-4bb1-8b1f-fe8acef0ca7e
Date: Fri, 16 Jul 2021 20:47:29 GMT
Content-Length: 284
Content-Type: application/json

  "CountryId": 0,
  "CountryCode": "us",
  "Shop": true,
  "Enroll": true,
  "CurrencyCode": "USD",
  "AddTax": false,
  "TaxRate": 0.0,
  "RequireFin": true,
  "CountryName": "United States",
  "ISO3": "USA",
  "CountryLanguages": null

For reference, the parameters are the same as the fields used to add a country in Corporate Admin.

Using the API Gateway to Test

With your account, you have access to the API Gateway for both Live and Stage. This site features documentation and a handy Try it Now tool. This feature allows you to test every endpoint available right from your browser.

  1. Navigate to
  2. Log in.
  3. Click the APIs tab.
  4. Locate an endpoint you want to test. You can start with a simple one like Customers > Get Customer.
  5. Read the endpoint's documentation and not the request parameters. You may need to fetch them via another endpoint or using the Corporate Admin. Read our Glossary for more information.
  6. Click the Try it Now button. You'll navigate to the testing portal.
  7. Enter the request parameters and select your Subscription key (API Key).
  8. Click Send.