{
  "openapi": "3.1.0",
  "info": {
    "title": "PZOS API",
    "version": "1",
    "description": "Reads bills, figures, bookings and Sales, and takes enquiries in, for a business's own systems. It never makes or voids a bill or moves money. Scopes: catalogue (Read branches, items and prices); bills (Read bills: lines, GST, payments and voids); figures (Read the day figures saved at day close); bookings (Read bookings, parties and group visits); leads (Read Sales leads (with Enquiries and deals on, the deals under their old name)); leads_in (Send a lead in (the old address, kept as an alias)); enquiries (Read enquiries); deals (Read deals); quotes (Read quotes); enquiries_in (Send an enquiry in); personal (Read families’ names and mobiles, and the contact details on leads, enquiries and deals); gates (Check wristbands at a gate or turnstile). Webhook events: bill.made, bill.voided, day.closed, visit.arrived, visit.checked_out, lead.made, lead.stage_changed, booking.made, booking.cancelled, membership.charged, membership.paused, visit.nearly_up, visit.overtime, enquiry.created, enquiry.qualified, deal.won, deal.lost, quote.sent, quote.accepted. Full guide: https://pzos.app/developers",
    "contact": {
      "name": "PZOS",
      "email": "wecare@pzos.app",
      "url": "https://pzos.app/developers"
    }
  },
  "servers": [
    {
      "url": "https://api.pzos.app/v1"
    }
  ],
  "security": [
    {
      "bearer": []
    },
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Reads"
    },
    {
      "name": "Sending in"
    }
  ],
  "paths": {
    "/branches": {
      "get": {
        "operationId": "get_branches",
        "summary": "Branches",
        "description": "The key’s branches.\nScope: catalogue.\n- id: The branch’s id, used everywhere else as branch_id\n- name, status: Its name, and setting_up, live, paused or closed\n- brand_id, region_id: Its brand and region, where the business has them\n- city, state, country, time_zone: Where it is; business dates are in its time zone\n- format: mall, standalone, play_cafe or other",
        "tags": [
          "Reads"
        ],
        "responses": {
          "200": {
            "description": "A page",
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "id": "b6f4…",
                      "name": "Gachibowli",
                      "status": "live",
                      "brand_id": "1c0e…",
                      "region_id": "7d2a…",
                      "city": "Hyderabad",
                      "state": "Telangana",
                      "country": "IN",
                      "time_zone": "Asia/Kolkata",
                      "format": "mall"
                    }
                  ],
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: Something in the request isn’t valid: a time, a cursor, a field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unknown_key: No key, an unknown key, or one that was switched off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not_in_plan: The API isn’t on for this business; not_allowed: The key’s scopes don’t cover this call; not_switched_on: Enquiries, deals and quotes with Enquiries and deals off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: No such address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed: The API reads; it only takes POST for enquiries, leads and gates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "too_many: More than 60 calls in a minute (a gate’s key: 600). Wait a moment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "error: Our side. Try again; it is recorded and we look at it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only what changed after this time, like 2026-12-01T00:00:00+05:30",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the page before",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows a page: up to 100 (200 for enquiries, deals and quotes)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      }
    },
    "/items": {
      "get": {
        "operationId": "get_items",
        "summary": "Items and prices",
        "description": "Every item with each branch’s price.\nScope: catalogue.\n- id, name, kind: The item, and its kind: play_package, extension, group_package, party, food_beverage, merchandise, pass, set_menu…\n- category_id, stream, sku: Its category, the stream it counts in, and its code\n- gst_rate, hsn_sac: GST rate in per cent, and its HSN or SAC code\n- minutes: Play time a play package gives\n- active: Whether it is on sale\n- prices[]: branch_id, price, extra_price and available at each of the key’s branches",
        "tags": [
          "Reads"
        ],
        "responses": {
          "200": {
            "description": "A page",
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "id": "42aa…",
                      "name": "1 hour play",
                      "kind": "play_package",
                      "stream": "play",
                      "gst_rate": 18,
                      "hsn_sac": "[SAC]",
                      "minutes": 60,
                      "active": true,
                      "prices": [
                        {
                          "branch_id": "b6f4…",
                          "price": "400.00",
                          "extra_price": "200.00",
                          "available": true
                        }
                      ]
                    }
                  ],
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: Something in the request isn’t valid: a time, a cursor, a field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unknown_key: No key, an unknown key, or one that was switched off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not_in_plan: The API isn’t on for this business; not_allowed: The key’s scopes don’t cover this call; not_switched_on: Enquiries, deals and quotes with Enquiries and deals off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: No such address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed: The API reads; it only takes POST for enquiries, leads and gates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "too_many: More than 60 calls in a minute (a gate’s key: 600). Wait a moment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "error: Our side. Try again; it is recorded and we look at it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only what changed after this time, like 2026-12-01T00:00:00+05:30",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the page before",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows a page: up to 100 (200 for enquiries, deals and quotes)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      }
    },
    "/bills": {
      "get": {
        "operationId": "get_bills",
        "summary": "Bills",
        "description": "Bills made or voided, with lines, GST and payments. Practice bills never.\nScope: bills.\n- id, number, branch_id, business_date: The bill, its number in its company’s series, and its branch and business date\n- type, status, supply: sale or refund; final or void; intra or inter (state)\n- currency, gross, taxable, tax, round_off, total: The amounts, in the bill’s currency with two decimals (prices include GST)\n- buyer_name, buyer_tax_id, buyer_state: A company bill’s buyer and GSTIN; empty for families\n- visit_id, created_at: The visit it closed, and when it was made\n- voided_at, void_reason: When and why it was voided\n- changed_at: Made or voided, whichever is later: what since and the cursor follow\n- lines[]: line, item_id, stream, description, qty, price, gst_rate, hsn_sac, gross, taxable, tax, discount\n- taxes[]: component (cgst, sgst, igst) and amount\n- payments[]: mode (cash, upi, card, online, bank_transfer, pass, gift_card, credit, on_account…), amount, status (received, paid_back, void) and at",
        "tags": [
          "Reads"
        ],
        "responses": {
          "200": {
            "description": "A page",
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "id": "9e1d…",
                      "branch_id": "b6f4…",
                      "number": "PHL/26-27/1204",
                      "business_date": "2026-12-06",
                      "type": "sale",
                      "status": "final",
                      "supply": "intra",
                      "currency": "INR",
                      "gross": "21240.00",
                      "taxable": "18000.00",
                      "tax": "3240.00",
                      "round_off": "0.00",
                      "total": "21240.00",
                      "buyer_name": "Sunrise Public School",
                      "buyer_tax_id": "36AABTS7781K1ZQ",
                      "buyer_state": "Telangana",
                      "visit_id": "5c77…",
                      "created_at": "2026-12-06T12:04:11+05:30",
                      "voided_at": null,
                      "void_reason": null,
                      "changed_at": "2026-12-06T12:04:11+05:30",
                      "lines": [
                        {
                          "line": 1,
                          "item_id": "42aa…",
                          "stream": "play",
                          "description": "School group play, 2 hours",
                          "qty": 32,
                          "price": "590.00",
                          "gst_rate": 18,
                          "hsn_sac": "[SAC]",
                          "gross": "18880.00",
                          "taxable": "16000.00",
                          "tax": "2880.00",
                          "discount": "0.00"
                        }
                      ],
                      "taxes": [
                        {
                          "component": "cgst",
                          "amount": "1620.00"
                        },
                        {
                          "component": "sgst",
                          "amount": "1620.00"
                        }
                      ],
                      "payments": [
                        {
                          "mode": "upi",
                          "amount": "21240.00",
                          "status": "received",
                          "at": "2026-12-06T12:04:30+05:30"
                        }
                      ]
                    }
                  ],
                  "next_cursor": "eyJhdCI6…"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: Something in the request isn’t valid: a time, a cursor, a field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unknown_key: No key, an unknown key, or one that was switched off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not_in_plan: The API isn’t on for this business; not_allowed: The key’s scopes don’t cover this call; not_switched_on: Enquiries, deals and quotes with Enquiries and deals off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: No such address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed: The API reads; it only takes POST for enquiries, leads and gates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "too_many: More than 60 calls in a minute (a gate’s key: 600). Wait a moment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "error: Our side. Try again; it is recorded and we look at it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only what changed after this time, like 2026-12-01T00:00:00+05:30",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the page before",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows a page: up to 100 (200 for enquiries, deals and quotes)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      }
    },
    "/days": {
      "get": {
        "operationId": "get_days",
        "summary": "Day figures",
        "description": "The figures each branch saves when it closes its day.\nScope: figures.\n- id: <branch_id>:<business_date>\n- branch_id, business_date, saved_at: The branch, its day, and when the figures were saved (saved again if the day reopens and closes)\n- takings, bills, gst: Final bills with GST, how many, and the GST in them; refunds count as minus\n- play, cafe, merchandise, other, discounts, overtime: Takings by stream after discounts, the discounts, and overtime charged\n- paid: Money taken by way of paying, like {\"cash\": 1200.00, \"upi\": …}\n- visits, kids, family_kids, group_kids, party_kids: Visits and children, by kind of visit\n- stay_minutes, stay_kids: For the average stay across any number of days\n- …: and the other figures the Day summary shows",
        "tags": [
          "Reads"
        ],
        "responses": {
          "200": {
            "description": "A page",
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "id": "b6f4…:2026-12-06",
                      "branch_id": "b6f4…",
                      "business_date": "2026-12-06",
                      "saved_at": "2026-12-06T22:41:02+05:30",
                      "takings": "184320.00",
                      "bills": 212,
                      "gst": "28116.00",
                      "play": "131200.00",
                      "cafe": "48760.00",
                      "merchandise": "4360.00",
                      "discounts": "2100.00",
                      "overtime": "3800.00",
                      "paid": {
                        "cash": "41200.00",
                        "upi": "121620.00",
                        "card": "21500.00"
                      },
                      "visits": 176,
                      "kids": 241
                    }
                  ],
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: Something in the request isn’t valid: a time, a cursor, a field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unknown_key: No key, an unknown key, or one that was switched off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not_in_plan: The API isn’t on for this business; not_allowed: The key’s scopes don’t cover this call; not_switched_on: Enquiries, deals and quotes with Enquiries and deals off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: No such address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed: The API reads; it only takes POST for enquiries, leads and gates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "too_many: More than 60 calls in a minute (a gate’s key: 600). Wait a moment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "error: Our side. Try again; it is recorded and we look at it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only what changed after this time, like 2026-12-01T00:00:00+05:30",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the page before",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows a page: up to 100 (200 for enquiries, deals and quotes)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      }
    },
    "/bookings": {
      "get": {
        "operationId": "get_bookings",
        "summary": "Bookings",
        "description": "Bookings, parties and group visits; the family by id only (ids only, never a name or a mobile).\nScope: bookings.\n- id, number, branch_id: The booking and its branch\n- kind, status, source: The kind of booking; enquiry, confirmed, arrived, cancelled or no_show; desk, parent (the family app) or office\n- starts_at, ends_at, room_id, package_item_id: When, where and which package\n- expected_kids, expected_adults, quoted_total: Guests expected and the quoted total\n- account_id, family_id, visit_id: The school or company, the family, and the visit on the day\n- created_at, updated_at: Made and last changed",
        "tags": [
          "Reads"
        ],
        "responses": {
          "200": {
            "description": "A page",
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "id": "a01c…",
                      "number": "BK-0412",
                      "branch_id": "b6f4…",
                      "kind": "party",
                      "status": "confirmed",
                      "source": "desk",
                      "starts_at": "2026-12-13T16:00:00+05:30",
                      "ends_at": "2026-12-13T18:00:00+05:30",
                      "expected_kids": 18,
                      "expected_adults": 10,
                      "quoted_total": "24500.00",
                      "family_id": "3f9b…",
                      "created_at": "2026-12-01T11:20:00+05:30",
                      "updated_at": "2026-12-05T18:02:00+05:30"
                    }
                  ],
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: Something in the request isn’t valid: a time, a cursor, a field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unknown_key: No key, an unknown key, or one that was switched off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not_in_plan: The API isn’t on for this business; not_allowed: The key’s scopes don’t cover this call; not_switched_on: Enquiries, deals and quotes with Enquiries and deals off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: No such address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed: The API reads; it only takes POST for enquiries, leads and gates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "too_many: More than 60 calls in a minute (a gate’s key: 600). Wait a moment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "error: Our side. Try again; it is recorded and we look at it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only what changed after this time, like 2026-12-01T00:00:00+05:30",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the page before",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows a page: up to 100 (200 for enquiries, deals and quotes)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      }
    },
    "/leads": {
      "get": {
        "operationId": "get_leads",
        "summary": "Leads",
        "description": "Sales leads and their stage. With Enquiries and deals on, the deals under their old name (number D-…).\nScope: leads.\n- id, number, branch_id, kind, title: The lead\n- stage, source, wanted_date, kids, adults, estimated_value: Where it stands and what is wanted\n- owner_id, account_id, family_id, booking_id: Who owns it, and what it is linked to\n- created_at, updated_at, closed_at: Its times\n- contact_name, contact_phone, contact_email: Only with the personal scope",
        "tags": [
          "Reads"
        ],
        "responses": {
          "200": {
            "description": "A page",
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "id": "c11e…",
                      "number": "L-0088",
                      "branch_id": "b6f4…",
                      "kind": "school",
                      "title": "Annual day outing",
                      "stage": "quote_sent",
                      "source": "website",
                      "wanted_date": "2027-01-20",
                      "kids": 60,
                      "adults": 6,
                      "estimated_value": "36000.00",
                      "created_at": "2026-12-02T10:00:00+05:30",
                      "updated_at": "2026-12-04T15:30:00+05:30",
                      "closed_at": null
                    }
                  ],
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: Something in the request isn’t valid: a time, a cursor, a field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unknown_key: No key, an unknown key, or one that was switched off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not_in_plan: The API isn’t on for this business; not_allowed: The key’s scopes don’t cover this call; not_switched_on: Enquiries, deals and quotes with Enquiries and deals off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: No such address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed: The API reads; it only takes POST for enquiries, leads and gates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "too_many: More than 60 calls in a minute (a gate’s key: 600). Wait a moment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "error: Our side. Try again; it is recorded and we look at it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only what changed after this time, like 2026-12-01T00:00:00+05:30",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the page before",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows a page: up to 100 (200 for enquiries, deals and quotes)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      },
      "post": {
        "operationId": "post_leads_in",
        "summary": "Send a lead in (older address)",
        "description": "Kept for systems built on it. With Enquiries and deals on, it does what POST /enquiries does.\nScope: leads_in.\n- id, number, status: created (201) or added_to_open_lead (200)",
        "tags": [
          "Sending in"
        ],
        "responses": {
          "201": {
            "description": "The answer",
            "content": {
              "application/json": {
                "example": {
                  "id": "c11e…",
                  "number": "L-0088",
                  "status": "created"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: Something in the request isn’t valid: a time, a cursor, a field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unknown_key: No key, an unknown key, or one that was switched off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not_in_plan: The API isn’t on for this business; not_allowed: The key’s scopes don’t cover this call; not_switched_on: Enquiries, deals and quotes with Enquiries and deals off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: No such address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed: The API reads; it only takes POST for enquiries, leads and gates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "too_many: More than 60 calls in a minute (a gate’s key: 600). Wait a moment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "error: Our side. Try again; it is recorded and we look at it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "contact_phone": "+919876543210",
                "kind": "school",
                "title": "Annual day outing",
                "kids": 60
              },
              "schema": {
                "type": "object"
              }
            }
          },
          "description": "- contact_phone or contact_email: One is needed\n- kind, title, contact_name, branch_id, wanted_date, kids, adults, note, idempotency_key: As for an enquiry"
        }
      }
    },
    "/enquiries": {
      "get": {
        "operationId": "get_enquiries",
        "summary": "Enquiries",
        "description": "Enquiries from every channel.\nScope: enquiries.\n- id, number, branch_id, kind, title: The enquiry (number E-…); a group enquiry may have no branch\n- status, channel: Where it stands and where it came from\n- not_qualified_reason, not_qualified_reason_key: Why not: spam, wrong_number, just_asking_prices, outside_our_area, duplicate, no_reply or other\n- auto_closed, merged_into, spam: Closed by itself as No reply; merged; marked spam\n- family_id, account_id, deal_id, deal_number, old_number: Who it is from, and the deal it became\n- wanted_date, kids, adults, owner_id, first_reply_at: What is wanted, who has it, first reply\n- created_at, updated_at, closed_at: Its times\n- contact_name, contact_phone, contact_email, message: Only with the personal scope",
        "tags": [
          "Reads"
        ],
        "responses": {
          "200": {
            "description": "A page",
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "id": "e7d0…",
                      "number": "E-1042",
                      "branch_id": "b6f4…",
                      "kind": "party",
                      "status": "new",
                      "channel": "website",
                      "wanted_date": "2026-12-20",
                      "kids": 15,
                      "adults": 8,
                      "family_id": null,
                      "deal_id": null,
                      "created_at": "2026-12-06T09:12:00+05:30"
                    }
                  ],
                  "total": 37,
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: Something in the request isn’t valid: a time, a cursor, a field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unknown_key: No key, an unknown key, or one that was switched off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not_in_plan: The API isn’t on for this business; not_allowed: The key’s scopes don’t cover this call; not_switched_on: Enquiries, deals and quotes with Enquiries and deals off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: No such address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed: The API reads; it only takes POST for enquiries, leads and gates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "too_many: More than 60 calls in a minute (a gate’s key: 600). Wait a moment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "error: Our side. Try again; it is recorded and we look at it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only what changed after this time, like 2026-12-01T00:00:00+05:30",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the page before",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows a page: up to 100 (200 for enquiries, deals and quotes)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "new, contacted, qualified or not_qualified",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "required": false,
            "description": "whatsapp, website, phone, walk_in, api, import…",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "operationId": "post_enquiries_in",
        "summary": "Send an enquiry in",
        "description": "An enquiry from your website, app or CRM, through the same writer as every other channel.\nScope: enquiries_in.\n- id, number, status: created (201), added_to_open_enquiry (200) or existing (200)\nA known family’s mobile, or an account’s name or phone, links it to them.\nA message about the same request within 7 days joins that open enquiry, as does one that closed itself as No reply in the last 60 days.\nAnything else is a new enquiry, given to its owner by the business’s routing.",
        "tags": [
          "Sending in"
        ],
        "responses": {
          "201": {
            "description": "The answer",
            "content": {
              "application/json": {
                "example": {
                  "id": "e7d0…",
                  "number": "E-1042",
                  "status": "created"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: Something in the request isn’t valid: a time, a cursor, a field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unknown_key: No key, an unknown key, or one that was switched off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not_in_plan: The API isn’t on for this business; not_allowed: The key’s scopes don’t cover this call; not_switched_on: Enquiries, deals and quotes with Enquiries and deals off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: No such address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed: The API reads; it only takes POST for enquiries, leads and gates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "too_many: More than 60 calls in a minute (a gate’s key: 600). Wait a moment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "error: Our side. Try again; it is recorded and we look at it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "phone": "+919876543210",
                "kind": "party",
                "name": "Ananya",
                "wanted_date": "2026-12-20",
                "kids": 15,
                "adults": 8,
                "message": "Birthday party for my son",
                "branch_id": "b6f4…",
                "idempotency_key": "web-7f3c"
              },
              "schema": {
                "type": "object"
              }
            }
          },
          "description": "- phone or email: One is needed; phone in international form, +919876543210\n- kind: party, school, company, society, event, membership, play or other\n- title, name, organisation, message: What it is about and who from\n- branch_id: One of the key’s branches (a one-branch key uses its branch)\n- wanted_date, kids, adults: What is wanted\n- idempotency_key: Send the same key again and nothing new is made (200, existing)"
        }
      }
    },
    "/deals": {
      "get": {
        "operationId": "get_deals",
        "summary": "Deals",
        "description": "Deals for families and accounts.\nScope: deals.\n- id, number, old_number, branch_id, kind, title: The deal (D-…), and the L- number it had\n- stage, stage_at, source, chance, expected_close: Where it stands\n- family_id, account_id, contact_id: Who it is for, by id\n- wanted_date, kids, adults, value: What is wanted and its value\n- owner_id, booking_id, made_for_booking: Who owns it; its booking; a desk quotation’s quiet deal\n- won_at, lost_reason, created_at, updated_at, closed_at: How and when it ended\n- contact_name, contact_phone, contact_email: Only with the personal scope",
        "tags": [
          "Reads"
        ],
        "responses": {
          "200": {
            "description": "A page",
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "id": "d5a2…",
                      "number": "D-0301",
                      "old_number": "L-0088",
                      "branch_id": "b6f4…",
                      "kind": "school",
                      "stage": "quote_sent",
                      "value": "36000.00",
                      "chance": 60,
                      "expected_close": "2026-12-15",
                      "account_id": "8b31…"
                    }
                  ],
                  "total": 12,
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: Something in the request isn’t valid: a time, a cursor, a field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unknown_key: No key, an unknown key, or one that was switched off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not_in_plan: The API isn’t on for this business; not_allowed: The key’s scopes don’t cover this call; not_switched_on: Enquiries, deals and quotes with Enquiries and deals off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: No such address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed: The API reads; it only takes POST for enquiries, leads and gates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "too_many: More than 60 calls in a minute (a gate’s key: 600). Wait a moment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "error: Our side. Try again; it is recorded and we look at it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only what changed after this time, like 2026-12-01T00:00:00+05:30",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the page before",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows a page: up to 100 (200 for enquiries, deals and quotes)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "stage",
            "in": "query",
            "required": false,
            "description": "open, quote_sent, negotiating, won or lost",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "family_id",
            "in": "query",
            "required": false,
            "description": "One family’s deals",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "description": "One school’s or company’s deals",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/quotes": {
      "get": {
        "operationId": "get_quotes",
        "summary": "Quotes",
        "description": "Every version of every option, desk quotations too.\nScope: quotes.\n- id, number, version, option, deal_id, deal_number, branch_id: The quote, its version and option (A, B…)\n- status, title, kids, adults, starts_at, room_id, package_item_id: What it offers\n- lines[]: name, stream, quantity, unit_price, amount, gst_rate_bp (GST in hundredths of a per cent), hsn_sac\n- gross, discount, total, deposit, valid_until, discount_approval: Its money\n- sent_at, sent_via, sent_together, views, viewed_at: How it went out and was opened\n- accepted_at, accepted_via, declined_at, declined_reason, not_chosen_at, expired_at, replaced_at: What became of it\n- booking_id, created_at, updated_at: The booking made from it\n- accepted_name: Who said yes, only with the personal scope",
        "tags": [
          "Reads"
        ],
        "responses": {
          "200": {
            "description": "A page",
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "id": "q0b8…",
                      "number": "Q-0215",
                      "version": 2,
                      "option": "A",
                      "deal_id": "d5a2…",
                      "status": "sent",
                      "total": "36000.00",
                      "deposit": "10000.00",
                      "valid_until": "2026-12-15",
                      "lines": [
                        {
                          "name": "School group play, 2 hours",
                          "stream": "play",
                          "quantity": 60,
                          "unit_price": "600.00",
                          "amount": "36000.00",
                          "gst_rate_bp": 1800,
                          "hsn_sac": "[SAC]"
                        }
                      ]
                    }
                  ],
                  "total": 4,
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: Something in the request isn’t valid: a time, a cursor, a field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unknown_key: No key, an unknown key, or one that was switched off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not_in_plan: The API isn’t on for this business; not_allowed: The key’s scopes don’t cover this call; not_switched_on: Enquiries, deals and quotes with Enquiries and deals off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: No such address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed: The API reads; it only takes POST for enquiries, leads and gates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "too_many: More than 60 calls in a minute (a gate’s key: 600). Wait a moment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "error: Our side. Try again; it is recorded and we look at it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only what changed after this time, like 2026-12-01T00:00:00+05:30",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the page before",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows a page: up to 100 (200 for enquiries, deals and quotes)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "draft, discount_not_approved, sent, viewed, accepted, declined, expired, not_chosen or replaced",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deal_id",
            "in": "query",
            "required": false,
            "description": "One deal’s quotes",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/families": {
      "get": {
        "operationId": "get_families",
        "summary": "Families",
        "description": "Families and their children. Erased families never.\nScope: personal.\n- id, name, mobile, email, area: The family\n- children[]: name and date_of_birth\n- created_at, updated_at: Its times",
        "tags": [
          "Reads"
        ],
        "responses": {
          "200": {
            "description": "A page",
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "id": "3f9b…",
                      "name": "Ananya Rao",
                      "mobile": "+919800000000",
                      "email": null,
                      "area": "Kondapur",
                      "children": [
                        {
                          "name": "Ishaan",
                          "date_of_birth": "2021-08-14"
                        }
                      ],
                      "created_at": "2026-11-02T17:40:00+05:30",
                      "updated_at": "2026-12-01T12:00:00+05:30"
                    }
                  ],
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: Something in the request isn’t valid: a time, a cursor, a field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unknown_key: No key, an unknown key, or one that was switched off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not_in_plan: The API isn’t on for this business; not_allowed: The key’s scopes don’t cover this call; not_switched_on: Enquiries, deals and quotes with Enquiries and deals off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: No such address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed: The API reads; it only takes POST for enquiries, leads and gates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "too_many: More than 60 calls in a minute (a gate’s key: 600). Wait a moment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "error: Our side. Try again; it is recorded and we look at it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only what changed after this time, like 2026-12-01T00:00:00+05:30",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the page before",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows a page: up to 100 (200 for enquiries, deals and quotes)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ]
      }
    },
    "/gates/check": {
      "post": {
        "operationId": "post_gates",
        "summary": "Check a wristband at a gate",
        "description": "May this band pass? For turnstiles and gates.\nScope: gates.\n- allow: true or false\n- reason: ok, time_up, pay_at_desk, wrong_zone, paused, lost_band, not_on_floor, other_branch or checked_out\n- child, zone, minutes_left, status, band, direction: The child’s first name only, never a surname or mobile\nIn passes a child on the floor, not paused, within their time and the branch’s grace, and in a zone their package opens.\nOut passes a child checked out or within their time; over time answers pay_at_desk.\nEvery tap is kept for 90 days and shows on the visit at the desk.",
        "tags": [
          "Sending in"
        ],
        "responses": {
          "200": {
            "description": "The answer",
            "content": {
              "application/json": {
                "example": {
                  "allow": true,
                  "reason": "ok",
                  "child": "Ishaan",
                  "zone": "Soft play",
                  "minutes_left": 42,
                  "status": "playing",
                  "band": "0004417",
                  "direction": "in"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: Something in the request isn’t valid: a time, a cursor, a field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unknown_key: No key, an unknown key, or one that was switched off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not_in_plan: The API isn’t on for this business; not_allowed: The key’s scopes don’t cover this call; not_switched_on: Enquiries, deals and quotes with Enquiries and deals off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: No such address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed: The API reads; it only takes POST for enquiries, leads and gates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "too_many: More than 60 calls in a minute (a gate’s key: 600). Wait a moment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "error: Our side. Try again; it is recorded and we look at it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "band": "0004417",
                "direction": "in",
                "zone": "Soft play",
                "gate": "Main entry"
              },
              "schema": {
                "type": "object"
              }
            }
          },
          "description": "- band: The band’s number (needed)\n- direction: in (the default) or out\n- zone, gate: The zone the gate opens, and the gate’s name in the taps"
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer pz_live_…"
      },
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "invalid_request",
              "unknown_key",
              "not_in_plan",
              "not_allowed",
              "not_switched_on",
              "not_found",
              "method_not_allowed",
              "too_many",
              "error"
            ]
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}