List Destination Countries
Get destination countries for selected origin/source country.
Call this endpoint after selecting origin/source country.
Country name should exactly match one from origin countries list.
This endpoint is similar to /api/v1/visa/destinations/:CountryName and provided for API-key integrations.
/api/v1/platform/destinations/:sourceCountryList Destination Countries
Auth: API key (Bearer or x-api-key)
- Returns destination countries available for the given source country.
- sourceCountry must exactly match a country name from origin countries list.
Payload Fields
| Field Name | Description | Data Type | Required | Example |
|---|---|---|---|---|
| sourceCountry | Origin country name in URL path. | string (path) | Yes | Andorra |
Response JSON Example
{
"status": true,
"statusCode": 200,
"result": ["Nepal", "United Arab Emirates", "Thailand"]
}Possible Errors
| Status Code | Error | When It Happens |
|---|---|---|
| 400 | Bad Request | sourceCountry is missing or does not exactly match origin countries list. |
| 401 | Unauthorized | Missing or invalid API key. |
| 403 | Forbidden | Key is not allowed for this environment or request origin. |
| 429 | Too Many Requests | Per-key rate limit exceeded. |
Code Samples
BASE_URL="https://api.nepextravels.com"
API_KEY="nxp_xxx"
SOURCE_COUNTRY="Andorra"
response=$(curl -sS -w "\n%{http_code}" \
-H "Authorization: Bearer $API_KEY" \
"$BASE_URL/api/v1/platform/destinations/$SOURCE_COUNTRY")
status=$(echo "$response" | tail -n1)
body=$(echo "$response" | sed '$d')
case "$status" in
200) echo "$body" ;;
400) echo "Bad Request: invalid sourceCountry (must match origin list)" ;;
401) echo "Unauthorized API key" ;;
403) echo "Forbidden for key/origin/env" ;;
429) echo "Rate limit exceeded" ;;
*) echo "Unexpected error ($status): $body" ;;
esac