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.
From register to your first call
- 1Register at https://api.vughy.com/developers/register (company, phone, purpose).
- 2Wait for an admin to Activate you on API Users.
- 3Log in at https://api.vughy.com/developers/login and generate an API key (shown once).
- 4Call countries, then route-package, with header X-Api-Key.
"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.
Access and call flow
Complete portal setup once, then call the two public endpoints in order.
Register
/developers/register
Create a partner account with company, phone, and purpose at the developer portal.
Wait for Activate
API Users (admin)
A Vughy admin must Activate your account before keys work. Deactivated accounts are rejected immediately.
Generate an API key
/developers/login
Log in and generate an API key. It is shown once — store it securely on your server.
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.
Send your API key on every request
Send header X-Api-Key: YOUR_KEY or Authorization: Bearer YOUR_KEY. Deactivated accounts are rejected immediately.
| Header | Required | What to send |
|---|---|---|
| X-Api-Key | Yes* | Your partner API key from the developer portal |
| Authorization | Alt* | Bearer YOUR_KEY — use instead of X-Api-Key if you prefer |
* Provide one of the two headers on every call.
X-Api-Key: YOUR_API_KEY
# or
Authorization: Bearer YOUR_API_KEYKeep 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.
Where to send requests
Every endpoint path below is appended to this host:
https://api.vughy.comExample: countries list = https://api.vughy.com/api/public/countries
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.
/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
| Name | Example | Notes |
|---|---|---|
qoptionalOptional. Search by name or numeric id. | india | — |
X-Api-KeyrequiredRequired header (or use Authorization: Bearer). | YOUR_API_KEY | Developer portal → generate API key |
cURL example
"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
"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)
"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
{
"ok": true,
"count": 258,
"countries": [
{ "id": 107, "name": "India", "currency": "INR", "currencyRaw": "Rupee (INR)" },
{ "id": 235, "name": "United States", "currency": "USD", "currencyRaw": "Dollar (USD)" }
]
}/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
| Name | Example | Notes |
|---|---|---|
fromrequiredRequired. Origin country id. | 107 | GET /api/public/countries → countries[].id |
torequiredRequired. Destination country id. | 235 | GET /api/public/countries → countries[].id |
X-Api-KeyrequiredRequired header (or use Authorization: Bearer). | YOUR_API_KEY | Developer portal → generate API key |
cURL example
"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)
"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
{
"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.