Nepex Travel API DocsGo to Profile

List origin Countires

Get the list of source/origin countries.

Use this endpoint to fetch country records for UI dropdowns and validation flows.

Authentication is required on every call using your API key.

Since this is a read-only endpoint, no request body is needed.

GET/api/v1/platform/countries

List origin Countires

Auth: API key (Bearer or x-api-key)

  • Returns supported countries as integration-friendly minimal payload.
  • Rate limit headers are returned with each response.
  • Origin checks are environment-aware for browser clients.

Response JSON Example

{
  "status": true,
  "statusCode": 200,
  "result": [
    { "uuid": "9d9f...", "name": "Nepal", "isoCode": "NP", "currency": "NPR" }
  ]
}

Possible Errors

Status CodeErrorWhen It Happens
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"

response=$(curl -sS -w "\n%{http_code}" \
  -H "Authorization: Bearer $API_KEY" \
  "$BASE_URL/api/v1/platform/countries")
status=$(echo "$response" | tail -n1)
body=$(echo "$response" | sed '$d')

case "$status" in
  200) echo "Countries fetched"; echo "$body" ;;
  401) echo "Unauthorized: invalid/missing API key" ;;
  403) echo "Forbidden: key/origin/environment not allowed" ;;
  429) echo "Too Many Requests: rate limit exceeded" ;;
  *)   echo "Unexpected error ($status): $body" ;;
esac