> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dev.gojinko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

> What the Jinko API offers and how to call it: explore travel demand, search flights and hotels, build a trip, pay, and manage bookings over HTTP.

The Jinko API is the HTTP layer behind everything. Send a request with your API key and you can explore travel demand, search flights and hotels, build a trip, pay, and manage bookings from any language or backend.

Every endpoint page includes its request and response schemas plus a try-it playground, so you can fill in values and run a live request. The endpoints are grouped by what they do (below).

Prefer a typed client? The [TypeScript SDK](/connect/sdk) wraps these same endpoints with types and observability headers baked in.

## Base URL

| Environment | Base URL                          |
| ----------- | --------------------------------- |
| Production  | `https://api.gojinko.com`         |
| Sandbox     | `https://api.sandbox.gojinko.com` |

Production is the default. Use **sandbox** to test the full flow without touching prod data. It uses **separate API keys** (see [Sandbox keys](/authentication/api-keys#sandbox-keys)). All examples below use production.

## Authentication

Authenticate every `/v1` request with your API key:

```http theme={null}
X-API-Key: jnk_your_key
```

Or as a bearer token: `Authorization: Bearer jnk_your_key`

Get a key from the [dashboard](https://dashboard.gojinko.com/developers/keys). See [API keys](/authentication/api-keys) for detail.

## Observability

We strongly recommend setting these on every request, they make debugging possible when something goes wrong:

```http theme={null}
X-Session-ID: <stable per session, any UUID or opaque string>
X-Request-ID: <fresh per request, any UUID>
```

Both land in the response headers too, so capture them on the client side. If you open a support ticket, include the `X-Request-ID` of the failing call.

## Response envelope

Success: endpoint-specific JSON payload.

Error: consistent envelope, same across all endpoints.

```json theme={null}
{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "departure_date must be in the future",
    "details": { "field": "departure_date" }
  }
}
```

See [Errors & troubleshooting](/concepts/errors) for the full status code reference.

## Typical request

```bash theme={null}
curl https://api.gojinko.com/v1/flight_search \
  -H "X-API-Key: jnk_..." \
  -H "X-Request-ID: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "origin": "JFK",
    "destination": "CDG",
    "trip_type": "roundtrip",
    "departure_date": "2026-06-15",
    "return_date": "2026-06-22"
  }'
```

## Endpoint groups

<CardGroup cols={2}>
  <Card title="Travel Demand" icon="chart-line" href="/api/destination">
    See where people are searching to fly and how it trends over time: `destination`, `market`, `audience`, their `/trend` series, and `trend`.
  </Card>

  <Card title="Flights" icon="plane" href="/api/flight-search">
    Discover routes and dates, run a live search, then handle refunds and exchanges: `find-destination`, `flight-calendar`, `find-dates`, `lowest-fare`, `price-monitoring`, `flight-search`, `refund`, `exchange`.
  </Card>

  <Card title="Hotels" icon="hotel" href="/api/hotel-search">
    Search hotels and pull details; `htl_*` tokens plug into the same trip as flights: `hotel-search`, `hotel-details`, `hotel-cancel`.
  </Card>

  <Card title="Cart & Payment" icon="cart-shopping" href="/api/trip">
    Build a trip, select ancillaries, check out, pay, and look up the booking: `trip`, `select-ancillaries`, `checkout`, `agent-payment submit`, `trip-status`, `get-booking`.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/api/webhooks">
    Register endpoints and get notified on booking events: `register`, `list`, `get`, `delete`, `test`.
  </Card>
</CardGroup>
