{
  "openapi": "3.0.1",
  "info": {
    "title": "TranigoNew Partner API",
    "description": "Transfer arama, teklif ve rezervasyon API'si. Kimlik doğrulama: `Authorization: Bearer <api key>` ya da `X-Api-Key`. `ctt_test_` anahtarlarıyla yapılan işlemler sandbox'tır (gerçek transfer oluşmaz, cariye yazılmaz).",
    "version": "v1"
  },
  "paths": {
    "/v1/account": {
      "get": {
        "tags": [
          "Account"
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerAccountSummaryDto"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/statement": {
      "get": {
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerStatementDto"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Acenta paneli kullanıcısıyla giriş. Yanlış bilgi 401 (nedeni söylenmez); IP başına dakikada 10 deneme.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/refresh": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Erişim token'ını yeniler. Yenileme token'ı tek kullanımlıktır; aynı token ikinci kez gelirse oturum kapanır.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/logout": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Çıkış: oturumun yenileme token'ları iptal edilir (erişim token'ı süresi dolana kadar geçerli kalır).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/v1/bookings": {
      "post": {
        "tags": [
          "Bookings"
        ],
        "summary": "Rezervasyon açar. Yeni rezervasyon 201, aynı `externalReference` ile daha önce açılmış rezervasyon 200 döner.\r\nCari ödemede kredi limiti / vade aşılıyorsa 422.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBookingRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBookingRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBookingRequest"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Bookings"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/BookingStatus"
            }
          },
          {
            "name": "dateFrom",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "dateTo",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerBookingViewPagedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bookings/{code}": {
      "get": {
        "tags": [
          "Bookings"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bookings/{code}/cancel": {
      "post": {
        "tags": [
          "Bookings"
        ],
        "summary": "İptal. Gidiş kodu verilirse dönüş de iptal edilir. Cari rezervasyonda borç geri alınır; ücretsiz iptal süresi\r\ngeçtiyse sözleşmenizdeki geç iptal ücreti cari hesabınıza yazılır.",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelBookingRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelBookingRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelBookingRequest"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bookings/{code}/simulate-payment": {
      "post": {
        "tags": [
          "Bookings"
        ],
        "summary": "Yalnızca sandbox (ctt_test_ anahtarı): kartla ödemesi beklenen test rezervasyonunu ödenmiş sayar ve\r\n`booking.paid` webhook'unu tetikler. Canlı anahtarla 403.",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/locations": {
      "get": {
        "tags": [
          "Locations"
        ],
        "summary": "Bölge arama (en az 2 karakter).",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cityId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LocationResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/locations/{regionId}/destinations": {
      "get": {
        "tags": [
          "Locations"
        ],
        "summary": "Bu bölgeden fiyatı olan varış bölgeleri.",
        "parameters": [
          {
            "name": "regionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LocationResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/me": {
      "get": {
        "tags": [
          "Me"
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quotes": {
      "post": {
        "tags": [
          "Quotes"
        ],
        "summary": "Güzergah ve tarih için araç teklifleri. Her teklifin `quoteId`'si 30 dakika geçerli ve tek kullanımlıktır;\r\nrezervasyon bu fiyatla açılır (arada kur değişse bile).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateQuoteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateQuoteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateQuoteRequest"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuotesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BookingResponse": {
        "type": "object",
        "properties": {
          "booking": {
            "$ref": "#/components/schemas/PartnerBookingView"
          },
          "return": {
            "$ref": "#/components/schemas/PartnerBookingView"
          },
          "payment": {
            "$ref": "#/components/schemas/PaymentInfo"
          }
        },
        "additionalProperties": false
      },
      "BookingStatus": {
        "enum": [
          "Pending",
          "Confirmed",
          "Completed",
          "Cancelled"
        ],
        "type": "string"
      },
      "CancelBookingRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "maxLength": 1000,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateBookingRequest": {
        "required": [
          "passenger",
          "paymentMethod",
          "pickupDate",
          "pickupTime",
          "quoteId"
        ],
        "type": "object",
        "properties": {
          "quoteId": {
            "type": "string",
            "format": "uuid"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/PaymentMethodType"
          },
          "partnerPaysByCard": {
            "type": "boolean",
            "description": "Yalnızca OnAccount ile: net tutarı (satış − komisyon) kendi kartınızla ödersiniz — kredi limiti gerekmez.\r\nYanıttaki `payment.online.url` adresinden ödeyin."
          },
          "externalReference": {
            "maxLength": 100,
            "type": "string",
            "description": "Sizin rezervasyon numaranız — tekrar denemelerde aynı değeri gönderin.",
            "nullable": true
          },
          "pickupDate": {
            "type": "string",
            "description": "Teklifteki tarihle aynı olmalı.",
            "format": "date"
          },
          "pickupTime": {
            "minLength": 1,
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
            "type": "string",
            "description": "Alış saati, Türkiye yerel (HH:mm)."
          },
          "passenger": {
            "$ref": "#/components/schemas/PassengerRequest"
          },
          "passengerCount": {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "format": "int32"
          },
          "flightCode": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "hotelAddress": {
            "maxLength": 500,
            "type": "string",
            "nullable": true
          },
          "notes": {
            "maxLength": 2000,
            "type": "string",
            "nullable": true
          },
          "return": {
            "$ref": "#/components/schemas/ReturnTripRequest"
          }
        },
        "additionalProperties": false,
        "description": "Rezervasyon. Güzergah, araç ve fiyat tekliften gelir. Aynı TranigoNew.Api.Contracts.V1.CreateBookingRequest.ExternalReference ile tekrar gönderilen\r\nistek yeni rezervasyon açmaz — mevcut rezervasyon 200 ile döner (ağ hatasında güvenle tekrar denenebilir)."
      },
      "CreateQuoteRequest": {
        "required": [
          "date",
          "fromRegionId",
          "toRegionId"
        ],
        "type": "object",
        "properties": {
          "fromRegionId": {
            "type": "string",
            "format": "uuid"
          },
          "toRegionId": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "type": "string",
            "description": "Transfer tarihi (Türkiye yerel, yyyy-MM-dd).",
            "format": "date"
          },
          "passengers": {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "format": "int32"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyType"
          }
        },
        "additionalProperties": false,
        "description": "Fiyat teklifi isteği. Dönen her teklif 30 dakika geçerli ve tek kullanımlıktır."
      },
      "CurrencyType": {
        "enum": [
          "TRY",
          "EUR",
          "USD",
          "GBP",
          "RUB",
          "DKK",
          "SEK",
          "CHF",
          "NOK"
        ],
        "type": "string"
      },
      "LocationResponse": {
        "type": "object",
        "properties": {
          "regionId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "isAirport": {
            "type": "boolean"
          },
          "cityId": {
            "type": "string",
            "format": "uuid"
          },
          "cityName": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LoginRequest": {
        "required": [
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "email": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string",
            "format": "email"
          },
          "password": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "deviceName": {
            "maxLength": 100,
            "type": "string",
            "description": "İsteğe bağlı cihaz adı (ör. \"iPhone 15\") — oturum listesinde görünür.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MeResponse": {
        "type": "object",
        "properties": {
          "partnerId": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/PartnerType"
          },
          "mode": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyType"
          },
          "commissionRate": {
            "type": "integer",
            "format": "int32"
          },
          "pricingMode": {
            "$ref": "#/components/schemas/PartnerPricingMode"
          },
          "onAccountEnabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "Anahtarın hesabı. `Mode`: \"live\" ya da \"test\" (sandbox anahtarı)."
      },
      "OnlinePaymentResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "nullable": true
          },
          "paidBy": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyType"
          },
          "dueAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "paidAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Ödeme linki. TranigoNew.Api.Contracts.V1.OnlinePaymentResponse.PaidBy: \"passenger\" (yolcu satış fiyatını öder) | \"partner\" (siz net tutarı ödersiniz).\r\nTranigoNew.Api.Contracts.V1.OnlinePaymentResponse.Status: \"awaiting_payment\" | \"paid\" | \"cancelled\" | \"expired\". Sandbox'ta TranigoNew.Api.Contracts.V1.OnlinePaymentResponse.Url null'dır —\r\nödemeyi `POST /v1/bookings/{code}/simulate-payment` ile taklit edin."
      },
      "PartnerAccountSummaryDto": {
        "type": "object",
        "properties": {
          "partnerId": {
            "type": "string",
            "format": "uuid"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyType"
          },
          "balance": {
            "type": "number",
            "format": "double"
          },
          "creditLimit": {
            "type": "number",
            "format": "double"
          },
          "availableCredit": {
            "type": "number",
            "format": "double"
          },
          "usagePercent": {
            "type": "integer",
            "format": "int32"
          },
          "paymentTermDays": {
            "type": "integer",
            "format": "int32"
          },
          "overdueAmount": {
            "type": "number",
            "format": "double"
          },
          "canUseOnAccount": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PartnerBookingView": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "externalReference": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/BookingStatus"
          },
          "isReturn": {
            "type": "boolean"
          },
          "scheduledDate": {
            "type": "string",
            "format": "date"
          },
          "scheduledTime": {
            "type": "string",
            "nullable": true
          },
          "fromRegionId": {
            "type": "string",
            "format": "uuid"
          },
          "fromRegionName": {
            "type": "string",
            "nullable": true
          },
          "toRegionId": {
            "type": "string",
            "format": "uuid"
          },
          "toRegionName": {
            "type": "string",
            "nullable": true
          },
          "vehicleTypeName": {
            "type": "string",
            "nullable": true
          },
          "passengerCount": {
            "type": "integer",
            "format": "int32"
          },
          "passengerName": {
            "type": "string",
            "nullable": true
          },
          "flightCode": {
            "type": "string",
            "nullable": true
          },
          "price": {
            "type": "number",
            "format": "double"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyType"
          },
          "commission": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "commissionCurrency": {
            "$ref": "#/components/schemas/CurrencyType"
          },
          "cancellationReason": {
            "type": "string",
            "nullable": true
          },
          "isTest": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PartnerBookingViewPagedResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerBookingView"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "format": "int32"
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PartnerLedgerEntryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "$ref": "#/components/schemas/PartnerLedgerEntryType"
          },
          "entryDate": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "bookingCode": {
            "type": "string",
            "nullable": true
          },
          "debit": {
            "type": "number",
            "format": "double"
          },
          "credit": {
            "type": "number",
            "format": "double"
          },
          "runningBalance": {
            "type": "number",
            "format": "double"
          },
          "performedBy": {
            "type": "string",
            "nullable": true
          },
          "reversedEntryId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "isReversed": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PartnerLedgerEntryType": {
        "enum": [
          "BookingCharge",
          "CommissionEarned",
          "PaymentReceived",
          "PayoutSent",
          "Reversal",
          "Adjustment",
          "CancellationFee"
        ],
        "type": "string"
      },
      "PartnerPricingMode": {
        "enum": [
          "Commission",
          "NetRate"
        ],
        "type": "string"
      },
      "PartnerStatementDto": {
        "type": "object",
        "properties": {
          "partnerId": {
            "type": "string",
            "format": "uuid"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyType"
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "openingBalance": {
            "type": "number",
            "format": "double"
          },
          "closingBalance": {
            "type": "number",
            "format": "double"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerLedgerEntryDto"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "format": "int32"
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PartnerType": {
        "enum": [
          "Affiliate",
          "Website",
          "Agency"
        ],
        "type": "string"
      },
      "PassengerRequest": {
        "required": [
          "email",
          "firstName",
          "lastName",
          "phone"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "lastName": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "phoneCode": {
            "maxLength": 8,
            "type": "string",
            "description": "Ülke kodu, ör. \"+90\".",
            "nullable": true
          },
          "phone": {
            "maxLength": 32,
            "minLength": 1,
            "type": "string"
          },
          "email": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string",
            "format": "email"
          }
        },
        "additionalProperties": false
      },
      "PaymentInfo": {
        "type": "object",
        "properties": {
          "method": {
            "$ref": "#/components/schemas/PaymentMethodType"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus"
          },
          "online": {
            "$ref": "#/components/schemas/OnlinePaymentResponse"
          }
        },
        "additionalProperties": false,
        "description": "TranigoNew.Api.Contracts.V1.PaymentInfo.Online: kartla ödenecek rezervasyonun ödeme linki (yoksa null)."
      },
      "PaymentMethodType": {
        "enum": [
          "CreditCard",
          "PartialPayment",
          "Cash",
          "OnAccount"
        ],
        "type": "string"
      },
      "PaymentStatus": {
        "enum": [
          "Pending",
          "Paid",
          "Failed",
          "Refunded"
        ],
        "type": "string"
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "QuotesResponse": {
        "type": "object",
        "properties": {
          "quotes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransferQuoteDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RefreshRequest": {
        "required": [
          "refreshToken"
        ],
        "type": "object",
        "properties": {
          "refreshToken": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "ReturnTripRequest": {
        "required": [
          "date",
          "time"
        ],
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "time": {
            "minLength": 1,
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
            "type": "string",
            "description": "Alış saati, Türkiye yerel (HH:mm)."
          },
          "flightCode": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "hotelAddress": {
            "maxLength": 500,
            "type": "string",
            "nullable": true
          },
          "notes": {
            "maxLength": 2000,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TokenResponse": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "nullable": true
          },
          "tokenType": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "refreshToken": {
            "type": "string",
            "nullable": true
          },
          "refreshTokenExpiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "TranigoNew.Api.Contracts.TokenResponse.AccessToken: her istekte `Authorization: Bearer …` (60 dk). Süresi dolunca\r\n            TranigoNew.Api.Contracts.TokenResponse.RefreshToken ile yenileyin — yenileme token'ı her kullanımda değişir, eskisini saklamayın."
      },
      "TransferMode": {
        "enum": [
          "Private",
          "Shuttle"
        ],
        "type": "string"
      },
      "TransferQuoteDto": {
        "type": "object",
        "properties": {
          "quoteId": {
            "type": "string",
            "format": "uuid"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "vehicleTypeId": {
            "type": "string",
            "format": "uuid"
          },
          "vehicleTypeName": {
            "type": "string",
            "nullable": true
          },
          "passengerCapacity": {
            "type": "integer",
            "format": "int32"
          },
          "luggageCapacity": {
            "type": "integer",
            "format": "int32"
          },
          "vehicleImagePath": {
            "type": "string",
            "nullable": true
          },
          "transferMode": {
            "$ref": "#/components/schemas/TransferMode"
          },
          "averageRating": {
            "type": "number",
            "format": "double"
          },
          "reviewCount": {
            "type": "integer",
            "format": "int32"
          },
          "price": {
            "type": "number",
            "format": "double"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyType"
          },
          "commission": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "netPrice": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "partnerCurrency": {
            "$ref": "#/components/schemas/CurrencyType"
          },
          "isTest": {
            "type": "boolean"
          },
          "passengerCount": {
            "type": "integer",
            "format": "int32"
          },
          "pricedPerPerson": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          }
        },
        "additionalProperties": { }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "description": "Partner API anahtarı (ctt_live_… / ctt_test_…), uygulama erişim token'ı (cttm_…) ya da Agency API anahtarı (ctta_…)",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "ApiKey": [ ]
    }
  ]
}