API Reference / Packages
Purpose
Get the full details of one package — useful when a user opens a package page in your app or before placing a booking.
Authentication
Send your access token as a Bearer header: Authorization: Bearer <token>. Obtain it from Authenticate a user.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | number | Package id |
Request samples
bash
curl -X GET https://tourapi.nirajp.com.np/api/v1/packages/1 \ -H "Content-Type: application/json"
Success response
Returns 200 OK with the shape below.
| Field | Type | Description |
|---|---|---|
| id | number | Package id |
| title | string | Package name |
| destination | string | Destination |
| durationDays | number | Trip length in days |
| price | number | Per-person price |
| currency | string | Currency code |
| category | string | Category |
| status | string | "active" | "draft" | "archived" |
json
{
"success": true,
"message": "Request successful.",
"data": {
"id": 1,
"title": "Everest Base Camp Trek",
"destination": "Nepal",
"durationDays": 12,
"price": 1240,
"currency": "USD",
"category": "trekking",
"status": "active"
}
}Errors
All errors share the envelope { "success": false, "message": "..." }.
401No or invalid authentication token supplied.
json
{
"success": false,
"message": "Unauthorized"
}404The resource id does not exist or belongs to another organization.
json
{
"success": false,
"message": "Not found"
}500An unexpected error occurred on our side. Retry; if it persists, contact support.
json
{
"success": false,
"message": "Internal server error"
}