---
title: "Build with Nicer"
description: "What the Nicer API does, how it is organized, and your first call."
---

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

# Build with Nicer

Nicer is a travel platform where advisors plan trips with travelers. Everything
hangs off a **trip**: its itinerary, its conversation, the offers held for it and
the orders paid against it. This is the same API the Nicer apps run on — search
live inventory, hold an offer long enough to quote it, turn that quote into a
paid order, and build the itinerary the traveler reads.

- **Authentication** — Tokens, company selection, and the routes that take no token at all.
- **Errors** — One envelope for every failure, and the codes worth branching on.
- **Idempotency** — Retry anything that spends money without charging twice.
- **Rate limits** — What is capped, and how to search politely.
- **Travelers and the CRM** — Who a traveler is, who sees them, and how to follow every change.
- **API reference** — Browse the public endpoints, request schemas and code examples.

## Base URL

The Nicer API is available at `https://api.nicer.travel`.

Every path is prefixed by the service that owns it, so a place search is
`GET https://api.nicer.travel/search/places?q=bogota`.

## Your first call

A few lookups take no token, so you can check your setup before wiring up
authentication:

```bash
curl "https://api.nicer.travel/search/places?q=lisbon&kinds=city&limit=1"
```

```json
{
  "items": [
    {
      "id": "gpl_ChIJO_PkYRozGQ0R0DaQ5L3rAAQ",
      "kind": "city",
      "source": "GOOGLE",
      "name": "Lisbon",
      "address": "Lisbon",
      "fullAddress": "Lisbon, Portugal",
      "city": "Lisbon",
      "state": "Lisbon",
      "country": "Portugal",
      "countryCode": "PT",
      "latitude": 38.722252399999995,
      "longitude": -9.1393366,
      "placeId": "ChIJO_PkYRozGQ0R0DaQ5L3rAAQ",
      "photos": []
    }
  ]
}
```

Everything else needs a bearer token. See [Authentication](https://docs.nicer.travel/developers/authentication).

## Use the SDK or CLI

Install the stable JavaScript SDK with `npm install @nicertravel/sdk` or the CLI with
`npm install --global @nicertravel/cli`. In the API reference, choose **JavaScript SDK**
or **Nicer CLI** in the request example. Signed provider webhooks show HTTP examples.

The Node.js examples read your bearer token from `NICER_TOKEN`. Set `NICER_COMPANY` for
operations that require an agency. When a JavaScript example uses `NICER_IDEMPOTENCY_KEY`,
generate a key for that action and reuse it for retries. The CLI supplies its own key.

## How the API is organized

| Service | What it covers |
| --- | --- |
| `travelers-trip` | Trips: the container everything else belongs to |
| `trip-itinerary` | Build an itinerary, share it, collect traveler approvals |
| `booking` | Search inventory, hold an offer as a selection, quote it |
| `commerce` | Orders, payments, payment methods, the finance ledger |
| `chat` | Messaging between advisors and travelers |
| `crm` | Travelers: their advisors, profiles and documents, a trip's travelers and sales stage, notes, tasks and webhooks. See [Travelers and the CRM](https://docs.nicer.travel/developers/crm) |
| `search` | Lookups for pickers: places (hotels, cities, airports), carriers, flight numbers |
| `tour-viator` | Tours and activities, shaped as itinerary segments |
| `travel-reference` | Static data: airports, cities, carriers, aircraft |

## Planning a trip end to end

1. **Step 1**

   ### Open a trip

   `POST /travelers-trip` with a title, the dates and at least one destination. The
   trip is created together with its itinerary and its conversation, so one call is
   enough to start.
2. **Step 2**

   ### Search live inventory

   `GET /search/places?q=bogota` answers hotels, cities and airports for a text
   query, ranked, with `photos=3` for a thumbnail each; with
   `Accept: text/event-stream` the same URL streams the list as sources answer.
3. **Step 3**

   ### Hold what you chose

   `POST /booking/selections` re-validates the offer with the supplier and holds
   it. The selection stays bookable until `bookableUntil`.
4. **Step 4**

   ### Freeze the price

   `POST /booking/quotes` turns a selection into an immutable quote: price,
   payment terms and cancellation policy, fixed.
5. **Step 5**

   ### Take the money

   `POST /commerce/orders` turns quotes into an order, and
   `POST /commerce/orders/{orderId}/payments` collects payment. Both require an
   [idempotency key](https://docs.nicer.travel/developers/idempotency).
6. **Step 6**

   ### Show it to the traveler

   The itinerary lives under `/trip-itinerary/{tripItineraryId}` — created with the
   trip in step 1, so there is nothing to create here. Its public routes let a
   traveler read the itinerary and approve segments from a link, without an
   account.

## Building an agent

Every endpoint page in this reference is also available as Markdown — add `.md`
to any URL — and the whole site is at [/llms.txt](https://docs.nicer.travel/llms.txt) and
[/llms-full.txt](https://docs.nicer.travel/llms-full.txt).

## How this reference is produced

The reference is generated from the same schemas the handlers validate against,
so it cannot drift from the running API. Request bodies, query parameters and
responses are the real contracts, not a description of them. The raw document is
at [/openapi.json](https://docs.nicer.travel/api/openapi.json) if you would rather generate a client.

Source: https://docs.nicer.travel/developers/index.mdx
