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

# Quickstart

> Get started with Travomatrix B2B in 5 minutes

Follow these steps to perform your first B2B booking on Travomatrix.

### 1. Get Your Credentials

Before you can make API calls, you need an API Key and an Agent ID.

1. Sign up or log in to the **[Travomatrix Partner Dashboard](https://app.travomatrix.com)**.
2. Navigate to the **Developer Settings** or **API Keys** section.
3. Copy your `X-API-Key` and your unique `Agent ID`. You will need both to search and book flights.

### 2. Search for Flights

Search for flights to see your commissions and net fares.

<Tip>
  **Pro-tip:** In the examples below, the `dod` (Date of Departure) is set to a future date in 2027. For live UAT testing, ensure you always pass a future date (e.g., Today + 7 days) to get valid results.
</Tip>

```bash theme={null}
curl -X POST https://api.travomatrix.com/api/v1/search \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "origin": "DEL",
  "dest": "BOM",
  "dod": "20270521",
  "pax_adult": 1,
  "mode": "b2b"
}'
```

### 3. Validate & Book

Once you select a flight, lock the price using `/fare/validate` to get a `fare_token`. Then, use the `fare_token` and your `agent_id` to create a booking. Your agency's wallet will be atomically debited the `net_fare`.

```bash theme={null}
curl -X POST https://api.travomatrix.com/api/v1/booking/create \
-H "X-API-Key: YOUR_API_KEY" \
-H "Idempotency-Key: UNIQUE_UUID_123" \
-H "Content-Type: application/json" \
-d '{
  "fare_token": "VALID_TOKEN_123...",
  "agent_id": "YOUR_AGENT_ID",
  "passengers": [
    {
      "id": "ADT1",
      "type": "ADT",
      "title": "MR",
      "first_name": "JOHN",
      "last_name": "DOE",
      "gender": "M",
      "dob": "1990-01-01",
      "nationality": "IN"
    }
  ],
  "contact_info": {
    "email": "john.doe@example.com",
    "phone": "+919999999999"
  }
}'
```
