API Reference / Partner API
GET
/partner/destinationsList your destinations
List destinations you have pushed via the partner API. Requires the x-api-key header.
🔑 x-api-keyTry in Console →
Purpose
Read back the destinations you previously pushed, e.g. to reconcile your source system with the marketplace or to find an id for use elsewhere. Scoped to your API key’s organization.
Authentication
Send your partner API key as a header: x-api-key: <your-key>. Mint one via Create a partner API key.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| x-api-key* | header | string | Your partner API key |
Request samples
bash
curl -X GET https://tourapi.nirajp.com.np/api/v1/partner/destinations \ -H "Content-Type: application/json" \ -H "x-api-key: tk_live_xxxxxxxxxxxx"
Success response
Returns 200 OK with the shape below.
| Field | Type | Description |
|---|---|---|
| data[] | array | List of your destinations |
| data[].id | number | Destination id |
| data[].code | string | Country code |
| data[].name | string | Destination name |
| data[].country | string | Country |
| data[].region | string | Region |
json
{
"success": true,
"message": "Request successful.",
"data": [
{
"id": 4,
"code": "NP",
"name": "Kathmandu Valley",
"country": "Nepal",
"region": "Bagmati"
}
]
}Errors
All errors share the envelope { "success": false, "message": "..." }.
401Missing or invalid x-api-key header.
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"
}