{
  "openapi": "3.1.0",
  "info": {
    "title": "Atithi Partner API",
    "version": "1.0.0",
    "description": "Partner API for distribution: properties, rates, inventory, bookings, webhooks."
  },
  "servers": [{ "url": "/functions/v1/partner-api" }],
  "security": [{ "BearerAuth": [] }],
  "components": {
    "securitySchemes": {
      "BearerAuth": { "type": "http", "scheme": "bearer" }
    }
  },
  "paths": {
    "/v1/properties":          { "get":  { "summary": "List properties",          "responses": { "200": { "description": "OK" } } } },
    "/v1/properties/{id}":     { "get":  { "summary": "Property detail",          "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }], "responses": { "200": { "description": "OK" } } } },
    "/v1/availability":        { "get":  { "summary": "Availability",             "responses": { "200": { "description": "OK" } } } },
    "/v1/rates":               { "post": { "summary": "Upsert rates",             "responses": { "200": { "description": "OK" } } } },
    "/v1/inventory":           { "post": { "summary": "Upsert inventory",         "responses": { "200": { "description": "OK" } } } },
    "/v1/bookings":            { "get":  { "summary": "List bookings",            "responses": { "200": { "description": "OK" } } } },
    "/v1/bookings/{id}/cancel":{ "post": { "summary": "Cancel a booking",         "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }], "responses": { "200": { "description": "OK" } } } },
    "/v1/webhooks":            { "post": { "summary": "Register/rotate webhook",  "responses": { "200": { "description": "OK" } } } }
  }
}