> For the complete documentation index, see [llms.txt](https://developer.konukcrm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.konukcrm.com/hizli-baslangic.md).

# Hızlı Başlangıç

Sonunda elinizde olacak: geçerli bir erişim token'ı, listelenmiş oteller ve çalışan bir müsaitlik sorgusu.

## Ön koşullar

* KonukCRM hesabı ve **API erişimi olan** bir kullanıcı ({{Ayarlar → Kullanıcılar}} altından rol atanır)
* `curl` veya herhangi bir HTTP istemcisi
* Taban URL: `https://{{api.konukcrm.com}}/api/v1`

## 1. Token alın

```bash
curl -X POST https://{{api.konukcrm.com}}/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "{{entegrasyon@oteliniz.com}}",
    "password": "{{********}}"
  }'
```

Yanıt:

```json
{
  "success": true,
  "data": {
    "accessToken": "eyJhbGciOi...",
    "refreshToken": "9f2c...",
    "expiresAt": "2026-09-04T12:30:00Z"
  },
  "message": null,
  "errors": null,
  "statusCode": 200,
  "traceId": "0HN7...:00000003"
}
```

`accessToken` kısa ömürlüdür. Yenileme akışı için **Kimlik Doğrulama** sayfasına bakın.

## 2. İlk isteğinizi atın

```bash
curl https://{{api.konukcrm.com}}/api/v1/hotels \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

```json
{
  "success": true,
  "data": [
    { "id": "{{hotel-uuid}}", "name": "{{Avm Otel}}", "currencyCode": "TRY" }
  ],
  "statusCode": 200,
  "traceId": "0HN7...:00000004"
}
```

Her yanıt aynı zarfla döner — ayrıntı için **API Temelleri**.

## 3. Müsaitlik sorgulayın

Çağrı merkezi akışının kalbi: otel + tarih + misafir kompozisyonu → oda ve fiyat.

```bash
curl -G https://{{api.konukcrm.com}}/api/v1/{{availability}} \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  --data-urlencode "hotelId={{hotel-uuid}}" \
  --data-urlencode "checkIn=2026-10-01" \
  --data-urlencode "checkOut=2026-10-04" \
  --data-urlencode "guests={{guestTypeId}}:2" \
  --data-urlencode "guests={{childTypeId}}:1"
```

> **Dizi parametreleri tekrar formatındadır** (`guests=a&guests=b`). Köşeli parantezli form (`guests[]=`) kabul edilmez ve `422` döndürür.

Yanıtta her oda tipi için gecelik fiyat kırılımı, sezon segmentleri ve tanımlı her indirim için ayrı kolon bulunur.

## 4. Rezervasyona çevirin

```bash
curl -X POST https://{{api.konukcrm.com}}/api/v1/reservations \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "hotelId": "{{hotel-uuid}}",
    "roomTypeId": "{{roomtype-uuid}}",
    "checkIn": "2026-10-01",
    "checkOut": "2026-10-04",
    "guest": { "firstName": "{{Ada}}", "lastName": "{{Yılmaz}}", "phone": "{{+905xxxxxxxxx}}" }
  }'
```

## Sırada ne var

* **Kimlik Doğrulama** — token yenileme, süre dolumu
* **API Temelleri** — sayfalama, filtreleme, hata yönetimi, hız limitleri
* **Webhook'lar** — olayları kendi sisteminize itin


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.konukcrm.com/hizli-baslangic.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
