In this article
Before you start
The GNK booking API is a small surface: search, hold, confirm. Everything below assumes a sandbox key from the keys page and a PHP 8.2 runtime.
This paragraph carries an inline handler that must not survive the save.
Calling the search endpoint
Send the traveller count and the departure window. The response is paginated.
curl -s https://api.gnktravel.com/v1/packages \
-H "Authorization: Bearer $GNK_KEY" \
-d city=makkah -d nights=7
- Always send a currency, or you get SAR.
- Hold expires after 20 minutes.
- Confirm is idempotent on
reference.
Reading the response
| Field | Type | Notes |
|---|---|---|
| reference | string | Idempotency key |
| hold_expires_at | ISO 8601 | Always UTC |
Watch it end to end
Book the flight before the hotel. Rooms move; seats do not.
That is the whole flow. Errors come back as RFC 7807 problem documents.
Concierge
Planning a trip like this?
Send us your dates and who is travelling. We'll come back with options and prices — flights, hotels and the paperwork included.