Goods & Services API documentation

Goods & Services API documentation
2. Countries


Countries

DT One Goods & Services API covers many countries.

This section presents the different methods you can use to get the list of countries available on your account.

You can use either the end point /countries or /services.

These methods return the list of countries offered on your account.

Note that an object country is defined by an id and name.

{
    "country_id": => NUMERIC,
    "country":    => VARCHAR
}

1- Main list of countries

Request :

GET /countries[?service_id=XXX] - List of all countries available on your account which can be filtered to return countries offering a specific service

Response :

HTTP Code: 200

Body:

{
    "countries":[
        {
            "country_id":725,
            "country":"Dominican Republic"
        },
        {
            "country_id":756,
            "country":"Guatemala"
        },
        {
            "country_id":766,
            "country":"India"
        },
        {
            "country_id":767,
            "country":"Indonesia"
        },
        {
            "country_id":840,
            "country":"Philippines"
        }
    ]
}

2- List of countries proposing a specific service

Request :

GET /services{service_id}/countries - List of countries proposing a specific service

Response :

HTTP Code: 200

Body:

{
    "countries":[
        {
            "country_id":767,
            "country":"Indonesia"
        }
    ]
}