Vughy
Partner API

Vughy Public API — countries & routes

Partner APIs require an API key from an activated account. Register at the developer portal, wait for Activate, generate a key, then call countries and route-package with X-Api-Key.

Activated accounts onlyX-Api-Key / BearerTwo public GET endpoints
Introduction

Partner APIs on api.vughy.com

Use the Public API to load every country Vughy supports, then fetch a full From → To route package (visa types, details, forms, documents, notes, and fees) for your product.

Access requires an API key from an activated partner account. Register at https://api.vughy.com/developers/register.

API key header

Send X-Api-Key: YOUR_KEY (or Authorization: Bearer).

Two steps

Countries first, then route-package with from / to ids.

Server-side only

Never expose your API key in browser JavaScript.

How to use

From register to your first call

  1. 1Register at https://api.vughy.com/developers/register (company, phone, purpose).
  2. 2Wait for an admin to Activate you on API Users.
  3. 3Log in at https://api.vughy.com/developers/login and generate an API key (shown once).
  4. 4Call countries, then route-package, with header X-Api-Key.
First request — list countries
"text-violet-300 font-semibold">curl "https://api.vughy.com/api/public/countries" \
  "text-sky-300">-H "X-Api-Key: YOUR_API_KEY"

Deactivated accounts

Deactivated accounts are rejected immediately. If calls start failing after they worked, check that your account is still Activated in the developer portal.

How it fits together

Access and call flow

Complete portal setup once, then call the two public endpoints in order.

1

Register

/developers/register

Create a partner account with company, phone, and purpose at the developer portal.

2

Wait for Activate

API Users (admin)

A Vughy admin must Activate your account before keys work. Deactivated accounts are rejected immediately.

3

Generate an API key

/developers/login

Log in and generate an API key. It is shown once — store it securely on your server.

4

Call countries, then route-package

GET /api/public/…

Send header X-Api-Key (or Authorization: Bearer). Load country ids, then request the full From → To package.

Authentication

Send your API key on every request

Send header X-Api-Key: YOUR_KEY or Authorization: Bearer YOUR_KEY. Deactivated accounts are rejected immediately.

HeaderRequiredWhat to send
X-Api-KeyYes*Your partner API key from the developer portal
AuthorizationAlt*Bearer YOUR_KEY — use instead of X-Api-Key if you prefer

* Provide one of the two headers on every call.

Required headers
X-Api-Key: YOUR_API_KEY
# or
Authorization: Bearer YOUR_API_KEY

Keep your key secret

Call the API from your backend only. If you put the API key in frontend JavaScript, anyone can copy it and abuse your quota.

Base URL

Where to send requests

Every endpoint path below is appended to this host:

Base URL
https://api.vughy.com

Example: countries list = https://api.vughy.com/api/public/countries

Endpoints

Full API reference

Two GET endpoints. Both require an active API key. Each section shows params, cURL, JavaScript fetch, and a sample response.

Public endpoints

Two GET routes. Both require an active API key. Call countries first, then route-package with from / to ids.

01GET/api/public/countries

🌍 Countries list

In plain English

Call this first. Save each country’s numeric id — you pass those as from and to on the next endpoint.

Returns every country with id, name, and currency. Requires an active API key. Use these ids as from / to on route-package.

Use case
Populate origin and destination country pickers.
URL
https://api.vughy.com/api/public/countries

Params

NameExampleNotes
qoptional

Optional. Search by name or numeric id.

india
X-Api-Keyrequired

Required header (or use Authorization: Bearer).

YOUR_API_KEYDeveloper portal → generate API key

cURL example

cURL
"text-violet-300 font-semibold">curl "https://api.vughy.com/api/public/countries" \
  "text-sky-300">-H "X-Api-Key: YOUR_API_KEY"

cURL with search

cURL
"text-violet-300 font-semibold">curl "https://api.vughy.com/api/public/countries?q=india" \
  "text-sky-300">-H "X-Api-Key: YOUR_API_KEY"

JavaScript (fetch)

fetch
"text-violet-300 font-semibold">const res = "text-violet-300 font-semibold">await fetch('https://api.vughy.com/api/public/countries', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
});
console.log("text-violet-300 font-semibold">await res.json());

Sample response

200 OK
{
  "ok": true,
  "count": 258,
  "countries": [
    { "id": 107, "name": "India", "currency": "INR", "currencyRaw": "Rupee (INR)" },
    { "id": 235, "name": "United States", "currency": "USD", "currencyRaw": "Dollar (USD)" }
  ]
}
02GET/api/public/route-package

📦 Route package (full)

In plain English

One call returns visas for that route — types, details, forms, documents, notes, and fees — ready to render.

Full package for From → To. Requires an active API key. Pass country ids from the countries API.

Use case
Show visa options and application requirements for a traveler’s origin and destination.
URL
https://api.vughy.com/api/public/route-package?from=107&to=235

Important

from and to must be numeric country ids from the countries list (e.g. India 107, United States 235).

Params

NameExampleNotes
fromrequired

Required. Origin country id.

107GET /api/public/countries → countries[].id
torequired

Required. Destination country id.

235GET /api/public/countries → countries[].id
X-Api-Keyrequired

Required header (or use Authorization: Bearer).

YOUR_API_KEYDeveloper portal → generate API key

cURL example

cURL
"text-violet-300 font-semibold">curl "https://api.vughy.com/api/public/route-package?from=107&to=235" \
  "text-sky-300">-H "X-Api-Key: YOUR_API_KEY"

JavaScript (fetch)

fetch
"text-violet-300 font-semibold">const from = 107; // India
"text-violet-300 font-semibold">const to = 235;   // United States
"text-violet-300 font-semibold">const res = "text-violet-300 font-semibold">await fetch(
  `https://api.vughy.com/api/public/route-package?from=${from}&to=${to}`,
  { headers: { 'X-Api-Key': 'YOUR_API_KEY' } }
);
console.log("text-violet-300 font-semibold">await res.json());

Sample response

200 OK
{
  "ok": true,
  "origin": { "id": 107, "name": "India", "currency": "INR" },
  "destination": { "id": 235, "name": "United States" },
  "process": null,
  "visas": [ /* visa types + details + forms + docs + notes + fees */ ]
}

Ready to integrate?

Register for partner access, then generate an API key after your account is Activated.