Nepex Travel API DocsGo to Profile

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.

GET/api/v1/platform/destinations/:sourceCountry

List 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 NameDescriptionData TypeRequiredExample
sourceCountryOrigin country name in URL path.string (path)YesAndorra

Response JSON Example

{
  "status": true,
  "statusCode": 200,
  "result": ["Nepal", "United Arab Emirates", "Thailand"]
}

Possible Errors

Status CodeErrorWhen It Happens
400Bad RequestsourceCountry is missing or does not exactly match origin countries list.
401UnauthorizedMissing or invalid API key.
403ForbiddenKey is not allowed for this environment or request origin.
429Too Many RequestsPer-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