API Reference / Packages
GET
/packagesList packages
List tour packages owned by your organization, paginated. Use the page and limit query parameters to page through results.
🔒 JWT BearerTry in Console →
Purpose
Fetch your catalog of tour packages to render in your own app, sync to a CMS, or build a marketplace listing. Results are scoped to your organization only. Supports cursor-style page/limit pagination.
Authentication
Send your access token as a Bearer header: Authorization: Bearer <token>. Obtain it from Authenticate a user.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| page | query | number | Page number (default 1) |
| limit | query | number | Page size (default 20, max 100) |
Request samples
bash
curl -X GET https://tourapi.nirajp.com.np/api/v1/packages \ -H "Content-Type: application/json"
Success response
Returns 200 OK with the shape below.
| Field | Type | Description |
|---|---|---|
| items[] | array | Array of package objects |
| items[].id | number | Package id (use in bookings/create-package refs) |
| items[].title | string | Package display name |
| items[].destination | string | Destination country/region |
| items[].durationDays | number | Trip length in days |
| items[].price | number | Per-person price |
| items[].currency | string | ISO currency code |
| items[].category | string | trekking | tour | safari | … |
| total | number | Total packages across all pages |
| page | number | Current page |
| limit | number | Page size used |
json
{
"success": true,
"message": "Request successful.",
"data": {
"items": [
{
"id": 1,
"title": "Everest Base Camp Trek",
"destination": "Nepal",
"durationDays": 12,
"price": 1240,
"currency": "USD",
"category": "trekking"
}
],
"total": 1,
"page": 1,
"limit": 20
}
}Errors
All errors share the envelope { "success": false, "message": "..." }.
401No or invalid authentication token supplied.
json
{
"success": false,
"message": "Unauthorized"
}500An unexpected error occurred on our side. Retry; if it persists, contact support.
json
{
"success": false,
"message": "Internal server error"
}