{
  "components": {
    "responses": {
      "Problem": {
        "content": {
          "application/problem+json": {
            "schema": {
              "properties": {
                "code": {
                  "description": "Stable, e.g. invalid_key, insufficient_scope, payment_required, api_disabled, rate_limited, not_found, conflict.",
                  "type": "string"
                },
                "detail": {
                  "description": "What went wrong; the shop's own messages are in Thai.",
                  "type": "string"
                },
                "status": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "An RFC 9457 problem."
      }
    },
    "schemas": {
      "AppsPolicy": {
        "properties": {
          "baseCredits": {
            "format": "int64",
            "type": "integer"
          },
          "bookingsMonthly": {
            "type": "integer"
          },
          "branchPriceCredits": {
            "format": "int64",
            "type": "integer"
          },
          "capCredits": {
            "format": "int64",
            "type": "integer"
          },
          "coupons": {
            "type": "integer"
          },
          "csvExport": {
            "type": "boolean"
          },
          "customSmtp": {
            "type": "boolean"
          },
          "includedBranches": {
            "type": "integer"
          },
          "includedModules": {
            "type": "integer"
          },
          "includedSites": {
            "type": "integer"
          },
          "items": {
            "type": "integer"
          },
          "kitchenDisplay": {
            "type": "boolean"
          },
          "loyalty": {
            "type": "boolean"
          },
          "maxBranches": {
            "type": "integer"
          },
          "modulePrices": {
            "additionalProperties": {
              "format": "int64",
              "type": "integer"
            },
            "type": "object"
          },
          "ordersMonthly": {
            "type": "integer"
          },
          "plan": {
            "type": "string"
          },
          "priceCredits": {
            "format": "int64",
            "type": "integer"
          },
          "resources": {
            "type": "integer"
          },
          "teamUsers": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "BillCloseInput": {
        "properties": {
          "paid": {
            "type": "boolean"
          },
          "payment": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "room": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "BillOpenInput": {
        "properties": {
          "branch": {
            "type": "string"
          },
          "guests": {
            "type": "integer"
          },
          "note": {
            "type": "string"
          },
          "table": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "BillRow": {
        "properties": {
          "branchId": {
            "type": "string"
          },
          "closedAt": {
            "format": "date-time",
            "type": "string"
          },
          "closedBy": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "discount": {
            "format": "int64",
            "type": "integer"
          },
          "due": {
            "format": "int64",
            "type": "integer"
          },
          "guests": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "items": {
            "format": "int64",
            "type": "integer"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/ShopLine"
            },
            "type": "array"
          },
          "note": {
            "type": "string"
          },
          "number": {
            "type": "integer"
          },
          "openedBy": {
            "type": "string"
          },
          "orderCount": {
            "type": "integer"
          },
          "paid": {
            "type": "boolean"
          },
          "payment": {
            "type": "string"
          },
          "qrPath": {
            "type": "string"
          },
          "receiptNo": {
            "type": "string"
          },
          "service": {
            "format": "int64",
            "type": "integer"
          },
          "serviceFee": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "tableLabel": {
            "type": "string"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "BillUpdateInput": {
        "properties": {
          "discount": {
            "format": "int64",
            "type": "integer"
          },
          "guests": {
            "type": "integer"
          },
          "note": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "table": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "BillsView": {
        "properties": {
          "bills": {
            "items": {
              "$ref": "#/components/schemas/BillRow"
            },
            "type": "array"
          },
          "tables": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "Booking": {
        "properties": {
          "branchId": {
            "type": "string"
          },
          "cancelledBy": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "checkedInAt": {
            "format": "date-time",
            "type": "string"
          },
          "checkedOutAt": {
            "format": "date-time",
            "type": "string"
          },
          "couponCode": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customerEmail": {
            "type": "string"
          },
          "customerName": {
            "type": "string"
          },
          "customerPhone": {
            "type": "string"
          },
          "deposit": {
            "format": "int64",
            "type": "integer"
          },
          "discount": {
            "format": "int64",
            "type": "integer"
          },
          "endsAt": {
            "format": "date-time",
            "type": "string"
          },
          "guests": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "number": {
            "type": "integer"
          },
          "paid": {
            "type": "boolean"
          },
          "payment": {
            "type": "string"
          },
          "paymentClaimed": {
            "type": "boolean"
          },
          "pointsEarned": {
            "type": "integer"
          },
          "pointsUsed": {
            "type": "integer"
          },
          "remindedAt": {
            "format": "date-time",
            "type": "string"
          },
          "resourceId": {
            "type": "string"
          },
          "resourceName": {
            "type": "string"
          },
          "settled": {
            "type": "boolean"
          },
          "settledPayment": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "staffId": {
            "type": "string"
          },
          "staffName": {
            "type": "string"
          },
          "startsAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          },
          "unitId": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "BookingCharge": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "billId": {
            "type": "string"
          },
          "bookingId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "BookingDay": {
        "properties": {
          "close": {
            "type": "string"
          },
          "open": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "BookingInput": {
        "properties": {
          "block": {
            "type": "string"
          },
          "branch": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "checkIn": {
            "type": "string"
          },
          "checkOut": {
            "type": "string"
          },
          "coupon": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "guests": {
            "type": "integer"
          },
          "key": {
            "type": "string"
          },
          "member": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "payment": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "points": {
            "type": "integer"
          },
          "pow": {
            "$ref": "#/components/schemas/ShopPow"
          },
          "resource": {
            "type": "string"
          },
          "staff": {
            "type": "string"
          },
          "time": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "BookingStaffRow": {
        "properties": {
          "available": {
            "type": "boolean"
          },
          "branchId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "hours": {
            "items": {
              "$ref": "#/components/schemas/BookingDay"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "useHours": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "BookingUnit": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "resourceId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "BookingUpdateInput": {
        "properties": {
          "paid": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "BranchInput": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "address": {
            "type": "string"
          },
          "closedDates": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "delivery": {
            "type": "boolean"
          },
          "deliveryFee": {
            "format": "int64",
            "type": "integer"
          },
          "dineIn": {
            "type": "boolean"
          },
          "hours": {
            "items": {
              "$ref": "#/components/schemas/BookingDay"
            },
            "type": "array"
          },
          "laoQr": {
            "type": "string"
          },
          "mapUrl": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "open": {
            "type": "boolean"
          },
          "phone": {
            "type": "string"
          },
          "pickup": {
            "type": "boolean"
          },
          "position": {
            "type": "integer"
          },
          "promptPayId": {
            "type": "string"
          },
          "promptPayName": {
            "type": "string"
          },
          "useHours": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "BranchView": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "address": {
            "type": "string"
          },
          "closedDates": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "delivery": {
            "type": "boolean"
          },
          "deliveryFee": {
            "format": "int64",
            "type": "integer"
          },
          "dineIn": {
            "type": "boolean"
          },
          "hours": {
            "items": {
              "$ref": "#/components/schemas/BookingDay"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "laoQr": {
            "type": "string"
          },
          "mapUrl": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "open": {
            "type": "boolean"
          },
          "phone": {
            "type": "string"
          },
          "pickup": {
            "type": "boolean"
          },
          "position": {
            "type": "integer"
          },
          "promptPayId": {
            "type": "string"
          },
          "promptPayName": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "useHours": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "BranchesView": {
        "properties": {
          "allowed": {
            "type": "integer"
          },
          "branches": {
            "items": {
              "$ref": "#/components/schemas/BranchView"
            },
            "type": "array"
          },
          "charge": {
            "format": "int64",
            "type": "integer"
          },
          "included": {
            "type": "integer"
          },
          "max": {
            "type": "integer"
          },
          "paid": {
            "type": "integer"
          },
          "price": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Bypass": {
        "properties": {
          "ip": {
            "type": "string"
          },
          "mac": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nas": {
            "type": "string"
          },
          "until": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ChargeAddInput": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "description": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "CheckInInput": {
        "properties": {
          "dirty": {
            "type": "boolean"
          },
          "unit": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "CheckOutInput": {
        "properties": {
          "paid": {
            "type": "boolean"
          },
          "payment": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ContactUpdateInput": {
        "properties": {
          "marketing": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "CouponInput": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "applies": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "endsAt": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "maxUses": {
            "type": "integer"
          },
          "minTotal": {
            "format": "int64",
            "type": "integer"
          },
          "perPhone": {
            "type": "integer"
          },
          "startsAt": {
            "type": "string"
          },
          "value": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CustomerAdjustInput": {
        "properties": {
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "points": {
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "DeskBlock": {
        "properties": {
          "channel": {
            "type": "string"
          },
          "endsAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "ref": {
            "type": "string"
          },
          "resourceId": {
            "type": "string"
          },
          "resourceName": {
            "type": "string"
          },
          "startsAt": {
            "format": "date-time",
            "type": "string"
          },
          "summary": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "DeskBooking": {
        "properties": {
          "balance": {
            "format": "int64",
            "type": "integer"
          },
          "branchId": {
            "type": "string"
          },
          "cancelledBy": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "charges": {
            "format": "int64",
            "type": "integer"
          },
          "checkedInAt": {
            "format": "date-time",
            "type": "string"
          },
          "checkedOutAt": {
            "format": "date-time",
            "type": "string"
          },
          "couponCode": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customerEmail": {
            "type": "string"
          },
          "customerName": {
            "type": "string"
          },
          "customerPhone": {
            "type": "string"
          },
          "deposit": {
            "format": "int64",
            "type": "integer"
          },
          "discount": {
            "format": "int64",
            "type": "integer"
          },
          "endsAt": {
            "format": "date-time",
            "type": "string"
          },
          "guests": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "number": {
            "type": "integer"
          },
          "paid": {
            "type": "boolean"
          },
          "payment": {
            "type": "string"
          },
          "paymentClaimed": {
            "type": "boolean"
          },
          "pointsEarned": {
            "type": "integer"
          },
          "pointsUsed": {
            "type": "integer"
          },
          "remindedAt": {
            "format": "date-time",
            "type": "string"
          },
          "resourceId": {
            "type": "string"
          },
          "resourceName": {
            "type": "string"
          },
          "settled": {
            "type": "boolean"
          },
          "settledPayment": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "staffId": {
            "type": "string"
          },
          "staffName": {
            "type": "string"
          },
          "startsAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          },
          "unitId": {
            "type": "string"
          },
          "unitName": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "wifi": {
            "$ref": "#/components/schemas/WifiPassView"
          }
        },
        "type": "object"
      },
      "DeskType": {
        "properties": {
          "capacity": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "units": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DeskUnit": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "guest": {
            "$ref": "#/components/schemas/DeskBooking"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "resourceId": {
            "type": "string"
          },
          "resourceName": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "FrontDeskView": {
        "properties": {
          "arrivals": {
            "items": {
              "$ref": "#/components/schemas/DeskBooking"
            },
            "type": "array"
          },
          "blocks": {
            "items": {
              "$ref": "#/components/schemas/DeskBlock"
            },
            "type": "array"
          },
          "date": {
            "type": "string"
          },
          "departures": {
            "items": {
              "$ref": "#/components/schemas/DeskBooking"
            },
            "type": "array"
          },
          "inHouse": {
            "items": {
              "$ref": "#/components/schemas/DeskBooking"
            },
            "type": "array"
          },
          "types": {
            "items": {
              "$ref": "#/components/schemas/DeskType"
            },
            "type": "array"
          },
          "units": {
            "items": {
              "$ref": "#/components/schemas/DeskUnit"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "IcalLink": {
        "properties": {
          "channel": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "IcalLinkView": {
        "properties": {
          "channel": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "events": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Look": {
        "properties": {
          "accent": {
            "type": "string"
          },
          "ask": {
            "type": "string"
          },
          "askRequired": {
            "type": "boolean"
          },
          "backdrop": {
            "type": "string"
          },
          "background": {
            "type": "string"
          },
          "consent": {
            "type": "string"
          },
          "contact": {
            "type": "string"
          },
          "headline": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "layout": {
            "type": "string"
          },
          "logo": {
            "type": "string"
          },
          "promos": {
            "items": {
              "$ref": "#/components/schemas/Promo"
            },
            "type": "array"
          },
          "sell": {
            "type": "boolean"
          },
          "terms": {
            "type": "string"
          },
          "theme": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "MoveRoomInput": {
        "properties": {
          "unit": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrderUpdateInput": {
        "properties": {
          "carrier": {
            "type": "string"
          },
          "paid": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          },
          "refund": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "tracking": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PortalPass": {
        "properties": {
          "devices": {
            "type": "integer"
          },
          "downKbps": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "minutes": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "price": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PortalShopView": {
        "properties": {
          "counter": {
            "type": "boolean"
          },
          "passes": {
            "items": {
              "$ref": "#/components/schemas/PortalPass"
            },
            "type": "array"
          },
          "problem": {
            "type": "string"
          },
          "qr": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Promo": {
        "properties": {
          "image": {
            "type": "string"
          },
          "link": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PromptPayQR": {
        "properties": {
          "account": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "payload": {
            "type": "string"
          },
          "qr": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ReportDay": {
        "properties": {
          "bookings": {
            "type": "integer"
          },
          "date": {
            "type": "string"
          },
          "orders": {
            "type": "integer"
          },
          "revenue": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ReportHour": {
        "properties": {
          "hour": {
            "type": "integer"
          },
          "orders": {
            "type": "integer"
          },
          "revenue": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ReportRow": {
        "properties": {
          "count": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "revenue": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ResourceInput": {
        "properties": {
          "available": {
            "type": "boolean"
          },
          "branchId": {
            "type": "string"
          },
          "capacity": {
            "type": "integer"
          },
          "deposit": {
            "format": "int64",
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "durationMinutes": {
            "type": "integer"
          },
          "icalLinks": {
            "items": {
              "$ref": "#/components/schemas/IcalLink"
            },
            "type": "array"
          },
          "icalUrls": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "image": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "maxGuests": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "price": {
            "format": "int64",
            "type": "integer"
          },
          "staff": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ResourceView": {
        "properties": {
          "available": {
            "type": "boolean"
          },
          "branchId": {
            "type": "string"
          },
          "capacity": {
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "deposit": {
            "format": "int64",
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "durationMinutes": {
            "type": "integer"
          },
          "icalError": {
            "type": "string"
          },
          "icalExport": {
            "type": "string"
          },
          "icalLinks": {
            "items": {
              "$ref": "#/components/schemas/IcalLinkView"
            },
            "type": "array"
          },
          "icalSyncedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "maxGuests": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "price": {
            "format": "int64",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ShiftCloseInput": {
        "properties": {
          "countedCash": {
            "format": "int64",
            "type": "integer"
          },
          "force": {
            "type": "boolean"
          },
          "note": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ShiftOpenInput": {
        "properties": {
          "branch": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "openingFloat": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ShiftTotals": {
        "properties": {
          "cancelled": {
            "type": "integer"
          },
          "cash": {
            "format": "int64",
            "type": "integer"
          },
          "creditNotes": {
            "type": "integer"
          },
          "discounts": {
            "format": "int64",
            "type": "integer"
          },
          "expected": {
            "format": "int64",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReportRow"
            },
            "type": "array"
          },
          "nonCash": {
            "format": "int64",
            "type": "integer"
          },
          "orders": {
            "type": "integer"
          },
          "over": {
            "format": "int64",
            "type": "integer"
          },
          "payments": {
            "items": {
              "$ref": "#/components/schemas/ReportRow"
            },
            "type": "array"
          },
          "refunds": {
            "format": "int64",
            "type": "integer"
          },
          "revenue": {
            "format": "int64",
            "type": "integer"
          },
          "vat": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ShiftView": {
        "properties": {
          "branchId": {
            "type": "string"
          },
          "branchName": {
            "type": "string"
          },
          "closedAt": {
            "format": "date-time",
            "type": "string"
          },
          "closedBy": {
            "type": "string"
          },
          "countedCash": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "openedAt": {
            "format": "date-time",
            "type": "string"
          },
          "openedBy": {
            "type": "string"
          },
          "openingFloat": {
            "format": "int64",
            "type": "integer"
          },
          "totals": {
            "$ref": "#/components/schemas/ShiftTotals"
          }
        },
        "type": "object"
      },
      "ShopApps": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "available": {
            "type": "boolean"
          },
          "bookingClosedReason": {
            "type": "string"
          },
          "bookingQuota": {
            "type": "integer"
          },
          "bookingsThisMonth": {
            "format": "int64",
            "type": "integer"
          },
          "branchLimit": {
            "type": "integer"
          },
          "branches": {
            "type": "integer"
          },
          "canManageBilling": {
            "type": "boolean"
          },
          "closedReason": {
            "type": "string"
          },
          "included": {
            "type": "boolean"
          },
          "itemLimit": {
            "type": "integer"
          },
          "kind": {
            "type": "string"
          },
          "legacy": {
            "type": "boolean"
          },
          "modules": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "monthlyFee": {
            "format": "int64",
            "type": "integer"
          },
          "openShift": {
            "type": "string"
          },
          "orderQuota": {
            "type": "integer"
          },
          "ordersThisMonth": {
            "format": "int64",
            "type": "integer"
          },
          "paidBranches": {
            "type": "integer"
          },
          "paidFee": {
            "format": "int64",
            "type": "integer"
          },
          "pendingOff": {
            "type": "boolean"
          },
          "remainingDays": {
            "type": "integer"
          },
          "store": {
            "type": "string"
          },
          "terms": {
            "$ref": "#/components/schemas/AppsPolicy"
          },
          "totalDays": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ShopChoice": {
        "properties": {
          "name": {
            "type": "string"
          },
          "price": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ShopCoupon": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "applies": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "endsAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "maxUses": {
            "type": "integer"
          },
          "minTotal": {
            "format": "int64",
            "type": "integer"
          },
          "perPhone": {
            "type": "integer"
          },
          "startsAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "used": {
            "type": "integer"
          },
          "value": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ShopCustomer": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastSeenAt": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "points": {
            "type": "integer"
          },
          "totalSpent": {
            "format": "int64",
            "type": "integer"
          },
          "visits": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ShopInfo": {
        "properties": {
          "apps": {
            "$ref": "#/components/schemas/ShopApps"
          },
          "items": {
            "format": "int64",
            "type": "integer"
          },
          "openBills": {
            "format": "int64",
            "type": "integer"
          },
          "rentalRates": {
            "type": "boolean"
          },
          "rentalRooms": {
            "format": "int64",
            "type": "integer"
          },
          "resources": {
            "format": "int64",
            "type": "integer"
          },
          "rooms": {
            "format": "int64",
            "type": "integer"
          },
          "services": {
            "format": "int64",
            "type": "integer"
          },
          "shop": {
            "$ref": "#/components/schemas/ShopSettings"
          }
        },
        "type": "object"
      },
      "ShopItemInput": {
        "properties": {
          "available": {
            "type": "boolean"
          },
          "category": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "options": {
            "items": {
              "$ref": "#/components/schemas/ShopOption"
            },
            "type": "array"
          },
          "position": {
            "type": "integer"
          },
          "price": {
            "format": "int64",
            "type": "integer"
          },
          "stock": {
            "type": "integer"
          },
          "wifi": {
            "$ref": "#/components/schemas/WifiTerms"
          }
        },
        "type": "object"
      },
      "ShopItemView": {
        "properties": {
          "available": {
            "type": "boolean"
          },
          "category": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "options": {
            "items": {
              "$ref": "#/components/schemas/ShopOption"
            },
            "type": "array"
          },
          "position": {
            "type": "integer"
          },
          "price": {
            "format": "int64",
            "type": "integer"
          },
          "stock": {
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "wifi": {
            "$ref": "#/components/schemas/WifiTerms"
          }
        },
        "type": "object"
      },
      "ShopLimits": {
        "properties": {
          "approvePointsOver": {
            "type": "integer"
          },
          "bookingHoldMinutes": {
            "type": "integer"
          },
          "earnDailyLimit": {
            "type": "integer"
          },
          "orderHourCap": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ShopLine": {
        "properties": {
          "itemId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "options": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "qty": {
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          },
          "unit": {
            "format": "int64",
            "type": "integer"
          },
          "wifi": {
            "$ref": "#/components/schemas/WifiTerms"
          }
        },
        "type": "object"
      },
      "ShopMemberView": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastSeenAt": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "points": {
            "type": "integer"
          },
          "recent": {
            "items": {
              "$ref": "#/components/schemas/ShopPointEntry"
            },
            "type": "array"
          },
          "totalSpent": {
            "format": "int64",
            "type": "integer"
          },
          "visits": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ShopOption": {
        "properties": {
          "choices": {
            "items": {
              "$ref": "#/components/schemas/ShopChoice"
            },
            "type": "array"
          },
          "multi": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ShopOrderInput": {
        "properties": {
          "address": {
            "type": "string"
          },
          "bill": {
            "type": "string"
          },
          "branch": {
            "type": "string"
          },
          "coupon": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "expectTotal": {
            "format": "int64",
            "type": "integer"
          },
          "fulfilment": {
            "type": "string"
          },
          "items": {
            "items": {
              "properties": {
                "choices": {
                  "items": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "type": "array"
                },
                "id": {
                  "type": "string"
                },
                "qty": {
                  "type": "integer"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "key": {
            "type": "string"
          },
          "member": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "payment": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "points": {
            "type": "integer"
          },
          "pow": {
            "$ref": "#/components/schemas/ShopPow"
          },
          "table": {
            "type": "string"
          },
          "wantedAt": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ShopOrderView": {
        "properties": {
          "address": {
            "type": "string"
          },
          "billId": {
            "type": "string"
          },
          "branchId": {
            "type": "string"
          },
          "carrier": {
            "type": "string"
          },
          "couponCode": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customerEmail": {
            "type": "string"
          },
          "customerName": {
            "type": "string"
          },
          "customerPhone": {
            "type": "string"
          },
          "deliveryFee": {
            "format": "int64",
            "type": "integer"
          },
          "discount": {
            "format": "int64",
            "type": "integer"
          },
          "fulfilment": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/ShopLine"
            },
            "type": "array"
          },
          "note": {
            "type": "string"
          },
          "number": {
            "type": "integer"
          },
          "paid": {
            "type": "boolean"
          },
          "payment": {
            "type": "string"
          },
          "paymentClaimed": {
            "type": "boolean"
          },
          "pointsEarned": {
            "type": "integer"
          },
          "pointsUsed": {
            "type": "integer"
          },
          "preorder": {
            "type": "boolean"
          },
          "receiptNo": {
            "type": "string"
          },
          "shiftId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tableLabel": {
            "type": "string"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          },
          "tracking": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "vatAmount": {
            "format": "int64",
            "type": "integer"
          },
          "wantedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ShopPointEntry": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "orderId": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "points": {
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ShopPow": {
        "properties": {
          "nonce": {
            "type": "string"
          },
          "ts": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ShopReport": {
        "properties": {
          "average": {
            "format": "int64",
            "type": "integer"
          },
          "bookingPaid": {
            "format": "int64",
            "type": "integer"
          },
          "bookingRevenue": {
            "format": "int64",
            "type": "integer"
          },
          "bookings": {
            "type": "integer"
          },
          "bookingsLost": {
            "type": "integer"
          },
          "branches": {
            "items": {
              "$ref": "#/components/schemas/ReportRow"
            },
            "type": "array"
          },
          "categories": {
            "items": {
              "$ref": "#/components/schemas/ReportRow"
            },
            "type": "array"
          },
          "creditNotes": {
            "type": "integer"
          },
          "creditTotal": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "days": {
            "items": {
              "$ref": "#/components/schemas/ReportDay"
            },
            "type": "array"
          },
          "discounts": {
            "format": "int64",
            "type": "integer"
          },
          "from": {
            "type": "string"
          },
          "hours": {
            "items": {
              "$ref": "#/components/schemas/ReportHour"
            },
            "type": "array"
          },
          "month": {
            "type": "string"
          },
          "orderPaid": {
            "format": "int64",
            "type": "integer"
          },
          "orderRevenue": {
            "format": "int64",
            "type": "integer"
          },
          "orders": {
            "type": "integer"
          },
          "ordersCancelled": {
            "type": "integer"
          },
          "otherCurrency": {
            "type": "integer"
          },
          "payments": {
            "items": {
              "$ref": "#/components/schemas/ReportRow"
            },
            "type": "array"
          },
          "pointsEarned": {
            "type": "integer"
          },
          "pointsUsed": {
            "type": "integer"
          },
          "staff": {
            "items": {
              "$ref": "#/components/schemas/ReportRow"
            },
            "type": "array"
          },
          "to": {
            "type": "string"
          },
          "topItems": {
            "items": {
              "$ref": "#/components/schemas/ReportRow"
            },
            "type": "array"
          },
          "topResources": {
            "items": {
              "$ref": "#/components/schemas/ReportRow"
            },
            "type": "array"
          },
          "vat": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ShopSettings": {
        "properties": {
          "bills": {
            "type": "boolean"
          },
          "bookingAutoConfirm": {
            "type": "boolean"
          },
          "bookingClosed": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "bookingDaysAhead": {
            "type": "integer"
          },
          "bookingHours": {
            "items": {
              "$ref": "#/components/schemas/BookingDay"
            },
            "type": "array"
          },
          "bookingLeadMinutes": {
            "type": "integer"
          },
          "bookingOpen": {
            "type": "boolean"
          },
          "bookingSlotMinutes": {
            "type": "integer"
          },
          "cancelHours": {
            "type": "integer"
          },
          "closedDates": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "currency": {
            "type": "string"
          },
          "delivery": {
            "type": "boolean"
          },
          "deliveryFee": {
            "format": "int64",
            "type": "integer"
          },
          "deliveryNote": {
            "type": "string"
          },
          "depositPercent": {
            "type": "integer"
          },
          "dineIn": {
            "type": "boolean"
          },
          "earnPer100": {
            "type": "integer"
          },
          "emailLanguage": {
            "type": "string"
          },
          "freeDeliveryOver": {
            "format": "int64",
            "type": "integer"
          },
          "hours": {
            "items": {
              "$ref": "#/components/schemas/BookingDay"
            },
            "type": "array"
          },
          "laoQr": {
            "type": "string"
          },
          "limits": {
            "$ref": "#/components/schemas/ShopLimits"
          },
          "lineId": {
            "type": "string"
          },
          "loyalty": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "notice": {
            "type": "string"
          },
          "notifyBookings": {
            "type": "boolean"
          },
          "notifyCustomer": {
            "type": "boolean"
          },
          "notifyEmail": {
            "type": "string"
          },
          "notifyOrders": {
            "type": "boolean"
          },
          "open": {
            "type": "boolean"
          },
          "payCash": {
            "type": "boolean"
          },
          "phone": {
            "type": "string"
          },
          "pickup": {
            "type": "boolean"
          },
          "preorderDays": {
            "type": "integer"
          },
          "promptPayId": {
            "type": "string"
          },
          "promptPayName": {
            "type": "string"
          },
          "receiptFooter": {
            "type": "string"
          },
          "receiptPrefix": {
            "type": "string"
          },
          "receiptWidth": {
            "type": "integer"
          },
          "redeemPoints": {
            "type": "integer"
          },
          "redeemValue": {
            "format": "int64",
            "type": "integer"
          },
          "reminderHours": {
            "type": "integer"
          },
          "replyTo": {
            "type": "string"
          },
          "servicePercent": {
            "type": "integer"
          },
          "smtpCheckedAt": {
            "format": "date-time",
            "type": "string"
          },
          "smtpError": {
            "type": "string"
          },
          "smtpFrom": {
            "type": "string"
          },
          "smtpHost": {
            "type": "string"
          },
          "smtpPassword": {
            "type": "string"
          },
          "smtpPort": {
            "type": "integer"
          },
          "smtpSecurity": {
            "type": "string"
          },
          "smtpSet": {
            "type": "boolean"
          },
          "smtpUsername": {
            "type": "string"
          },
          "taxAddress": {
            "type": "string"
          },
          "taxId": {
            "type": "string"
          },
          "taxName": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "useHours": {
            "type": "boolean"
          },
          "vatRate": {
            "type": "integer"
          },
          "vatRegistered": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "StaffInput": {
        "properties": {
          "available": {
            "type": "boolean"
          },
          "branchId": {
            "type": "string"
          },
          "hours": {
            "items": {
              "$ref": "#/components/schemas/BookingDay"
            },
            "type": "array"
          },
          "image": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "useHours": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "UnitStatusInput": {
        "properties": {
          "status": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "UnitUpdateInput": {
        "properties": {
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "UnitsCreateInput": {
        "properties": {
          "names": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "resource": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "VoucherCreateInput": {
        "properties": {
          "count": {
            "type": "integer"
          },
          "devices": {
            "type": "integer"
          },
          "downMbps": {
            "type": "number"
          },
          "minutes": {
            "type": "integer"
          },
          "note": {
            "type": "string"
          },
          "upMbps": {
            "type": "number"
          },
          "validDays": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WifiBoxSetup": {
        "properties": {
          "cloud": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "codeExpiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "command": {
            "type": "string"
          },
          "downloads": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "scriptUrl": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiBoxUpdate": {
        "properties": {
          "error": {
            "type": "string"
          },
          "latest": {
            "type": "string"
          },
          "running": {
            "type": "string"
          },
          "state": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiBoxView": {
        "properties": {
          "ackSeq": {
            "format": "int64",
            "type": "integer"
          },
          "arch": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "enrollExpiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "hostname": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "lan": {
            "type": "string"
          },
          "lastSeenAt": {
            "format": "date-time",
            "type": "string"
          },
          "leases": {
            "type": "integer"
          },
          "locationId": {
            "type": "string"
          },
          "natSuspects": {
            "type": "integer"
          },
          "netApply": {
            "type": "string"
          },
          "netMode": {
            "type": "string"
          },
          "networks": {
            "type": "string"
          },
          "offlineSince": {
            "format": "date-time",
            "type": "string"
          },
          "online": {
            "type": "integer"
          },
          "pairedAt": {
            "format": "date-time",
            "type": "string"
          },
          "problems": {
            "type": "string"
          },
          "sourceIp": {
            "type": "string"
          },
          "spooled": {
            "format": "int64",
            "type": "integer"
          },
          "state": {
            "type": "string"
          },
          "update": {
            "$ref": "#/components/schemas/WifiBoxUpdate"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiCertView": {
        "properties": {
          "expires": {
            "format": "date-time",
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "trusted": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "WifiDetail": {
        "properties": {
          "acctMissingSince": {
            "format": "date-time",
            "type": "string"
          },
          "billingPeriod": {
            "type": "string"
          },
          "box": {
            "$ref": "#/components/schemas/WifiBoxView"
          },
          "boxList": {
            "items": {
              "$ref": "#/components/schemas/WifiBoxView"
            },
            "type": "array"
          },
          "boxSetup": {
            "$ref": "#/components/schemas/WifiBoxSetup"
          },
          "boxState": {
            "type": "string"
          },
          "boxes": {
            "type": "integer"
          },
          "branchId": {
            "type": "string"
          },
          "bypass": {
            "items": {
              "$ref": "#/components/schemas/Bypass"
            },
            "type": "array"
          },
          "canManageBilling": {
            "type": "boolean"
          },
          "connection": {
            "type": "string"
          },
          "contract": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "devices": {
            "type": "integer"
          },
          "directory": {
            "type": "string"
          },
          "directoryId": {
            "type": "string"
          },
          "eap": {
            "$ref": "#/components/schemas/WifiEAPView"
          },
          "id": {
            "type": "string"
          },
          "lastSeenAt": {
            "format": "date-time",
            "type": "string"
          },
          "lastSourceIp": {
            "type": "string"
          },
          "linkedSite": {
            "type": "string"
          },
          "logGbHours": {
            "type": "number"
          },
          "logPeriod": {
            "type": "string"
          },
          "logs": {
            "$ref": "#/components/schemas/WifiLogView"
          },
          "look": {
            "$ref": "#/components/schemas/Look"
          },
          "manualCodes": {
            "format": "int64",
            "type": "integer"
          },
          "maxDevices": {
            "type": "integer"
          },
          "mode": {
            "type": "string"
          },
          "monthly": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "nasIdentifier": {
            "type": "string"
          },
          "nextBillAt": {
            "format": "date-time",
            "type": "string"
          },
          "online": {
            "format": "int64",
            "type": "integer"
          },
          "overCycles": {
            "type": "integer"
          },
          "overflow": {
            "type": "string"
          },
          "package": {
            "type": "string"
          },
          "packageInfo": {
            "$ref": "#/components/schemas/WifiPackage"
          },
          "packageName": {
            "type": "string"
          },
          "paidUntil": {
            "format": "date-time",
            "type": "string"
          },
          "passes": {
            "$ref": "#/components/schemas/WifiPasses"
          },
          "pausedFor": {
            "type": "string"
          },
          "paygCost": {
            "format": "int64",
            "type": "integer"
          },
          "paygDeviceMinutes": {
            "format": "int64",
            "type": "integer"
          },
          "paygHeld": {
            "type": "boolean"
          },
          "paygHourMicro": {
            "format": "int64",
            "type": "integer"
          },
          "paygHours": {
            "type": "number"
          },
          "paygPeriod": {
            "type": "string"
          },
          "paygThreshold": {
            "type": "integer"
          },
          "peakDevices": {
            "type": "integer"
          },
          "peakPeriod": {
            "type": "string"
          },
          "pending": {
            "$ref": "#/components/schemas/WifiPendingView"
          },
          "pendingDevices": {
            "type": "integer"
          },
          "pendingFrom": {
            "format": "date-time",
            "type": "string"
          },
          "pendingOff": {
            "type": "boolean"
          },
          "pendingPackage": {
            "type": "string"
          },
          "portal": {
            "$ref": "#/components/schemas/WifiPortalView"
          },
          "portalDomain": {
            "type": "string"
          },
          "portalDomainVerified": {
            "type": "boolean"
          },
          "portalShop": {
            "$ref": "#/components/schemas/PortalShopView"
          },
          "portalSlug": {
            "type": "string"
          },
          "product": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "radius": {
            "type": "string"
          },
          "radiusSecret": {
            "type": "string"
          },
          "retentionDays": {
            "type": "integer"
          },
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/WifiSession"
            },
            "type": "array"
          },
          "setup": {
            "$ref": "#/components/schemas/WifiSetup"
          },
          "siteId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "teamOn": {
            "type": "boolean"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "upgrade": {
            "$ref": "#/components/schemas/WifiUpgradeView"
          },
          "vendor": {
            "type": "string"
          },
          "welcome": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiDirectoryView": {
        "properties": {
          "connector": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "eapName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "locations": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "ssid": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "users": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WifiEAPView": {
        "properties": {
          "caCert": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "host": {
            "type": "string"
          },
          "hostIps": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "port": {
            "type": "integer"
          },
          "secret": {
            "type": "string"
          },
          "serverName": {
            "type": "string"
          },
          "trusted": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "WifiGroup": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "devices": {
            "type": "integer"
          },
          "directoryId": {
            "type": "string"
          },
          "downKbps": {
            "type": "integer"
          },
          "external": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "upKbps": {
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "vlan": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WifiGroupInput": {
        "properties": {
          "devices": {
            "type": "integer"
          },
          "downMbps": {
            "type": "number"
          },
          "external": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "upMbps": {
            "type": "number"
          },
          "vlan": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WifiGuestContact": {
        "properties": {
          "consent": {
            "type": "string"
          },
          "consentAt": {
            "format": "date-time",
            "type": "string"
          },
          "firstSeenAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "lang": {
            "type": "string"
          },
          "lastSeenAt": {
            "format": "date-time",
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "marketing": {
            "type": "boolean"
          },
          "value": {
            "type": "string"
          },
          "visits": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WifiLocationView": {
        "properties": {
          "acctMissingSince": {
            "format": "date-time",
            "type": "string"
          },
          "billingPeriod": {
            "type": "string"
          },
          "boxState": {
            "type": "string"
          },
          "boxes": {
            "type": "integer"
          },
          "branchId": {
            "type": "string"
          },
          "connection": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "devices": {
            "type": "integer"
          },
          "directory": {
            "type": "string"
          },
          "directoryId": {
            "type": "string"
          },
          "eap": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "lastSeenAt": {
            "format": "date-time",
            "type": "string"
          },
          "lastSourceIp": {
            "type": "string"
          },
          "linkedSite": {
            "type": "string"
          },
          "logGbHours": {
            "type": "number"
          },
          "logPeriod": {
            "type": "string"
          },
          "logs": {
            "$ref": "#/components/schemas/WifiLogView"
          },
          "manualCodes": {
            "format": "int64",
            "type": "integer"
          },
          "maxDevices": {
            "type": "integer"
          },
          "mode": {
            "type": "string"
          },
          "monthly": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "nasIdentifier": {
            "type": "string"
          },
          "nextBillAt": {
            "format": "date-time",
            "type": "string"
          },
          "online": {
            "format": "int64",
            "type": "integer"
          },
          "overCycles": {
            "type": "integer"
          },
          "overflow": {
            "type": "string"
          },
          "package": {
            "type": "string"
          },
          "packageName": {
            "type": "string"
          },
          "paidUntil": {
            "format": "date-time",
            "type": "string"
          },
          "pausedFor": {
            "type": "string"
          },
          "paygCost": {
            "format": "int64",
            "type": "integer"
          },
          "paygDeviceMinutes": {
            "format": "int64",
            "type": "integer"
          },
          "paygHeld": {
            "type": "boolean"
          },
          "paygHourMicro": {
            "format": "int64",
            "type": "integer"
          },
          "paygHours": {
            "type": "number"
          },
          "paygPeriod": {
            "type": "string"
          },
          "paygThreshold": {
            "type": "integer"
          },
          "peakDevices": {
            "type": "integer"
          },
          "peakPeriod": {
            "type": "string"
          },
          "pending": {
            "$ref": "#/components/schemas/WifiPendingView"
          },
          "pendingDevices": {
            "type": "integer"
          },
          "pendingFrom": {
            "format": "date-time",
            "type": "string"
          },
          "pendingOff": {
            "type": "boolean"
          },
          "pendingPackage": {
            "type": "string"
          },
          "portalDomain": {
            "type": "string"
          },
          "portalDomainVerified": {
            "type": "boolean"
          },
          "portalSlug": {
            "type": "string"
          },
          "product": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "radius": {
            "type": "string"
          },
          "retentionDays": {
            "type": "integer"
          },
          "siteId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "teamOn": {
            "type": "boolean"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "upgrade": {
            "$ref": "#/components/schemas/WifiUpgradeView"
          },
          "vendor": {
            "type": "string"
          },
          "welcome": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiLogView": {
        "properties": {
          "billableGb": {
            "type": "number"
          },
          "billableOldOnly": {
            "type": "boolean"
          },
          "cost": {
            "format": "int64",
            "type": "integer"
          },
          "estimate": {
            "format": "int64",
            "type": "integer"
          },
          "freeDays": {
            "type": "integer"
          },
          "freeGb": {
            "type": "integer"
          },
          "gbMonthMicro": {
            "format": "int64",
            "type": "integer"
          },
          "gbMonths": {
            "type": "number"
          },
          "oldGb": {
            "type": "number"
          },
          "recentGb": {
            "type": "number"
          },
          "storedGb": {
            "type": "number"
          }
        },
        "type": "object"
      },
      "WifiPackage": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "custom": {
            "type": "boolean"
          },
          "graceBasisPoints": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "logFreeGb": {
            "type": "integer"
          },
          "maxDevices": {
            "type": "integer"
          },
          "minDevices": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "nameEn": {
            "type": "string"
          },
          "nameLo": {
            "type": "string"
          },
          "overageCredits": {
            "format": "int64",
            "type": "integer"
          },
          "paygBasisPoints": {
            "type": "integer"
          },
          "priceCredits": {
            "format": "int64",
            "type": "integer"
          },
          "product": {
            "type": "string"
          },
          "rank": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "yearLogsCredits": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WifiPassRule": {
        "properties": {
          "devices": {
            "type": "integer"
          },
          "downKbps": {
            "type": "integer"
          },
          "minutes": {
            "type": "integer"
          },
          "on": {
            "type": "boolean"
          },
          "upKbps": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WifiPassView": {
        "properties": {
          "code": {
            "type": "string"
          },
          "devices": {
            "type": "integer"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "minutes": {
            "type": "integer"
          },
          "network": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiPasses": {
        "properties": {
          "leases": {
            "$ref": "#/components/schemas/WifiPassRule"
          },
          "orders": {
            "$ref": "#/components/schemas/WifiPassRule"
          },
          "stays": {
            "$ref": "#/components/schemas/WifiPassRule"
          },
          "team": {
            "$ref": "#/components/schemas/WifiPassRule"
          }
        },
        "type": "object"
      },
      "WifiPasswordInput": {
        "properties": {
          "password": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiPendingView": {
        "properties": {
          "devices": {
            "type": "integer"
          },
          "from": {
            "format": "date-time",
            "type": "string"
          },
          "maxDevices": {
            "type": "integer"
          },
          "monthly": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "package": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiPortalCustomView": {
        "properties": {
          "cert": {
            "$ref": "#/components/schemas/WifiCertView"
          },
          "cname": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "own": {
            "type": "boolean"
          },
          "txtName": {
            "type": "string"
          },
          "txtValue": {
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "WifiPortalView": {
        "properties": {
          "cert": {
            "$ref": "#/components/schemas/WifiCertView"
          },
          "custom": {
            "$ref": "#/components/schemas/WifiPortalCustomView"
          },
          "host": {
            "type": "string"
          },
          "on": {
            "type": "boolean"
          },
          "serving": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiSession": {
        "properties": {
          "bytesIn": {
            "format": "int64",
            "type": "integer"
          },
          "bytesOut": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "mac": {
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          },
          "stoppedAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "via": {
            "type": "string"
          },
          "voucherId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiSetup": {
        "properties": {
          "acctPort": {
            "type": "integer"
          },
          "authPort": {
            "type": "integer"
          },
          "hostIps": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "radiusHost": {
            "type": "string"
          },
          "script": {
            "type": "string"
          },
          "syslogPort": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WifiStatsPoint": {
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "avg": {
            "type": "number"
          },
          "bytesIn": {
            "format": "int64",
            "type": "integer"
          },
          "bytesOut": {
            "format": "int64",
            "type": "integer"
          },
          "devices": {
            "type": "integer"
          },
          "max": {
            "type": "integer"
          },
          "signIns": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WifiStatsTotals": {
        "properties": {
          "avgOnline": {
            "type": "number"
          },
          "bytesIn": {
            "format": "int64",
            "type": "integer"
          },
          "bytesOut": {
            "format": "int64",
            "type": "integer"
          },
          "devicesMaxDay": {
            "type": "integer"
          },
          "devicesPerDay": {
            "type": "number"
          },
          "peak": {
            "type": "integer"
          },
          "signIns": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WifiStatsView": {
        "properties": {
          "busiest": {
            "items": {
              "type": "number"
            },
            "type": "array"
          },
          "canSeeTop": {
            "type": "boolean"
          },
          "days": {
            "items": {
              "$ref": "#/components/schemas/WifiStatsPoint"
            },
            "type": "array"
          },
          "methods": {
            "additionalProperties": {
              "format": "int64",
              "type": "integer"
            },
            "type": "object"
          },
          "noAccounting": {
            "type": "boolean"
          },
          "range": {
            "type": "string"
          },
          "series": {
            "items": {
              "$ref": "#/components/schemas/WifiStatsPoint"
            },
            "type": "array"
          },
          "since": {
            "format": "date-time",
            "type": "string"
          },
          "step": {
            "type": "string"
          },
          "top": {
            "items": {
              "$ref": "#/components/schemas/WifiTopUser"
            },
            "type": "array"
          },
          "totals": {
            "$ref": "#/components/schemas/WifiStatsTotals"
          }
        },
        "type": "object"
      },
      "WifiTerms": {
        "properties": {
          "devices": {
            "type": "integer"
          },
          "downKbps": {
            "type": "integer"
          },
          "minutes": {
            "type": "integer"
          },
          "upKbps": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WifiTopUser": {
        "properties": {
          "bytes": {
            "format": "int64",
            "type": "integer"
          },
          "mac": {
            "type": "string"
          },
          "minutes": {
            "format": "int64",
            "type": "integer"
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiUpgradeView": {
        "properties": {
          "devices": {
            "type": "integer"
          },
          "difference": {
            "format": "int64",
            "type": "integer"
          },
          "maxDevices": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "package": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiUser": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "directoryId": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "groupId": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastLoginAt": {
            "format": "date-time",
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "validUntil": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiUserInput": {
        "properties": {
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "groupId": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "validUntil": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiUserView": {
        "properties": {
          "console": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "directoryId": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "groupId": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastLoginAt": {
            "format": "date-time",
            "type": "string"
          },
          "online": {
            "format": "int64",
            "type": "integer"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "validUntil": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "WifiVoucher": {
        "properties": {
          "batch": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "devices": {
            "type": "integer"
          },
          "downKbps": {
            "type": "integer"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "firstUsedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "minutes": {
            "type": "integer"
          },
          "note": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "upKbps": {
            "type": "integer"
          },
          "validUntil": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "thk_ API key",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Business Apps and Wi-Fi Hotspot for your own systems. Authenticate with a Project API key (Integrations in the Console) as Authorization: Bearer thk_… . Calls are billed per call past the Project's free calls each month; refused calls (401, 402, 403, 429) and server errors are not, and Identity calls never are. Errors are RFC 9457 problems with a stable code. Webhooks are signed with X-TH-Signature: t=\u003cunix\u003e,v1=\u003chex HMAC-SHA256(secret, \"\u003ct\u003e.\u003cbody\u003e\")\u003e.",
    "title": "ThailandHosting API",
    "version": "1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/apps/bills": {
      "get": {
        "description": "Needs the apps:read scope.",
        "operationId": "getAppsBills",
        "parameters": [
          {
            "description": "Only this branch.",
            "in": "query",
            "name": "branch",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "closed for closed bills.",
            "in": "query",
            "name": "view",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillsView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List table bills",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      },
      "post": {
        "description": "Needs the apps:write scope.",
        "operationId": "postAppsBills",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "table": "A3",
                "guests": 2
              },
              "schema": {
                "$ref": "#/components/schemas/BillOpenInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillRow"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Open a bill for a table",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/bills/{bill}": {
      "patch": {
        "description": "Table, guests, note, discount. Money is in hundredths of the shop's currency (satang, or att for kip). Needs the apps:write scope.",
        "operationId": "patchAppsBillsBill",
        "parameters": [
          {
            "in": "path",
            "name": "bill",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillUpdateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillRow"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change an open bill",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/bills/{bill}/close": {
      "post": {
        "description": "Every order on it is completed and paid. receiptPath/reportPath are the Console's own links; with the API use the receipt and report routes. Needs the apps:write scope.",
        "operationId": "postAppsBillsBillClose",
        "parameters": [
          {
            "in": "path",
            "name": "bill",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "payment": "promptpay",
                "paid": true
              },
              "schema": {
                "$ref": "#/components/schemas/BillCloseInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "bill": {
                      "$ref": "#/components/schemas/BillRow"
                    },
                    "receiptPath": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Pay and close a bill",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/bills/{bill}/orders": {
      "post": {
        "description": "Needs the apps:write scope.",
        "operationId": "postAppsBillsBillOrders",
        "parameters": [
          {
            "in": "path",
            "name": "bill",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "items": [
                  {
                    "id": "ITEM_ID",
                    "qty": 1
                  }
                ],
                "payment": "cash"
              },
              "schema": {
                "$ref": "#/components/schemas/ShopOrderInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "order": {
                      "$ref": "#/components/schemas/ShopOrderView"
                    },
                    "receiptPath": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Add an order to a bill",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/bills/{bill}/receipt": {
      "get": {
        "description": "A printable HTML page; the receipt is numbered the first time it is printed. Needs the apps:read scope.",
        "operationId": "getAppsBillsBillReceipt",
        "parameters": [
          {
            "in": "path",
            "name": "bill",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Bill receipt",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      }
    },
    "/apps/bookings": {
      "get": {
        "description": "Upcoming, in progress and pending bookings, soonest first; view=all pages through every booking, newest first. Needs the apps:read scope.",
        "operationId": "getAppsBookings",
        "parameters": [
          {
            "description": "all for every booking.",
            "in": "query",
            "name": "view",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "With view=all: entries older than this time (RFC 3339), for the next page.",
            "in": "query",
            "name": "before",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Booking"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List bookings",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      },
      "post": {
        "description": "Confirmed at once, for a phone or walk-in booking. Money is in hundredths of the shop's currency (satang, or att for kip). Needs the apps:write scope.",
        "operationId": "postAppsBookings",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "resource": "RESOURCE_ID",
                "date": "2027-01-15",
                "time": "14:30",
                "guests": 1,
                "name": "Somchai",
                "phone": "0812345678"
              },
              "schema": {
                "$ref": "#/components/schemas/BookingInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a booking",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/bookings/{booking}": {
      "patch": {
        "description": "Status (pending, confirmed, completed, cancelled, no_show), paid, reason. Needs the apps:write scope.",
        "operationId": "patchAppsBookingsBooking",
        "parameters": [
          {
            "in": "path",
            "name": "booking",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "status": "completed",
                "paid": true
              },
              "schema": {
                "$ref": "#/components/schemas/BookingUpdateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change a booking",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/bookings/{booking}/charges": {
      "get": {
        "description": "Needs the apps:read scope.",
        "operationId": "getAppsBookingsBookingCharges",
        "parameters": [
          {
            "in": "path",
            "name": "booking",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "charges": {
                      "items": {
                        "$ref": "#/components/schemas/BookingCharge"
                      },
                      "type": "array"
                    },
                    "paidUpFront": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "total": {
                      "format": "int64",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List a stay's charges",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      },
      "post": {
        "description": "Needs the apps:write scope.",
        "operationId": "postAppsBookingsBookingCharges",
        "parameters": [
          {
            "in": "path",
            "name": "booking",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChargeAddInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingCharge"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Charge something to a room",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/bookings/{booking}/charges/{charge}": {
      "delete": {
        "description": "Needs the apps:write scope.",
        "operationId": "deleteAppsBookingsBookingChargesCharge",
        "parameters": [
          {
            "in": "path",
            "name": "booking",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "charge",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Remove a charge",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/bookings/{booking}/checkin": {
      "post": {
        "description": "Needs the apps:write scope.",
        "operationId": "postAppsBookingsBookingCheckin",
        "parameters": [
          {
            "in": "path",
            "name": "booking",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckInInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Check a stay in",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/bookings/{booking}/checkout": {
      "post": {
        "description": "Needs the apps:write scope.",
        "operationId": "postAppsBookingsBookingCheckout",
        "parameters": [
          {
            "in": "path",
            "name": "booking",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckOutInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Check a stay out",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/bookings/{booking}/folio": {
      "get": {
        "description": "The printable bill of a stay. Needs the apps:read scope.",
        "operationId": "getAppsBookingsBookingFolio",
        "parameters": [
          {
            "in": "path",
            "name": "booking",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Stay folio",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      }
    },
    "/apps/bookings/{booking}/move": {
      "post": {
        "description": "Needs the apps:write scope.",
        "operationId": "postAppsBookingsBookingMove",
        "parameters": [
          {
            "in": "path",
            "name": "booking",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveRoomInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Move a stay to another room",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/branches": {
      "get": {
        "description": "Needs the apps:read scope.",
        "operationId": "getAppsBranches",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BranchesView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List branches",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      },
      "post": {
        "description": "Needs the apps:write scope.",
        "operationId": "postAppsBranches",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BranchInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "branch": {
                      "$ref": "#/components/schemas/BranchView"
                    },
                    "message": {
                      "type": "string"
                    },
                    "walletCharge": {
                      "format": "int64",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a branch",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/branches/{branch}": {
      "delete": {
        "description": "Needs the apps:write scope.",
        "operationId": "deleteAppsBranchesBranch",
        "parameters": [
          {
            "in": "path",
            "name": "branch",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Delete a branch",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      },
      "put": {
        "description": "Needs the apps:write scope.",
        "operationId": "putAppsBranchesBranch",
        "parameters": [
          {
            "in": "path",
            "name": "branch",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BranchInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BranchView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change a branch",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/coupons": {
      "get": {
        "description": "Needs the apps:read scope.",
        "operationId": "getAppsCoupons",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ShopCoupon"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List coupons",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      },
      "post": {
        "description": "Needs the apps:write scope.",
        "operationId": "postAppsCoupons",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "code": "WELCOME10",
                "kind": "percent",
                "value": 10,
                "applies": "orders",
                "active": true
              },
              "schema": {
                "$ref": "#/components/schemas/CouponInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShopCoupon"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a coupon",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/coupons/{coupon}": {
      "delete": {
        "description": "Needs the apps:write scope.",
        "operationId": "deleteAppsCouponsCoupon",
        "parameters": [
          {
            "in": "path",
            "name": "coupon",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Delete a coupon",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      },
      "put": {
        "description": "Needs the apps:write scope.",
        "operationId": "putAppsCouponsCoupon",
        "parameters": [
          {
            "in": "path",
            "name": "coupon",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CouponInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShopCoupon"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change a coupon",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/customers": {
      "get": {
        "description": "Loyalty members, by phone number. Needs the apps:read scope.",
        "operationId": "getAppsCustomers",
        "parameters": [
          {
            "description": "Search by name or phone.",
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ShopCustomer"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List members",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      }
    },
    "/apps/customers/{member}": {
      "get": {
        "description": "With their points history. Needs the apps:read scope.",
        "operationId": "getAppsCustomersMember",
        "parameters": [
          {
            "in": "path",
            "name": "member",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShopMemberView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get a member",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      },
      "patch": {
        "description": "Add or take points (with a reason), name and note. Needs the apps:write scope.",
        "operationId": "patchAppsCustomersMember",
        "parameters": [
          {
            "in": "path",
            "name": "member",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "points": 50,
                "reason": "Birthday bonus"
              },
              "schema": {
                "$ref": "#/components/schemas/CustomerAdjustInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShopCustomer"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change a member",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/frontdesk": {
      "get": {
        "description": "Today's arrivals, stays and departures, and every room's state. Needs the apps:read scope.",
        "operationId": "getAppsFrontdesk",
        "parameters": [
          {
            "description": "Only this branch.",
            "in": "query",
            "name": "branch",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The day, YYYY-MM-DD.",
            "in": "query",
            "name": "date",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FrontDeskView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Front desk",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      }
    },
    "/apps/items": {
      "get": {
        "description": "Needs the apps:read scope.",
        "operationId": "getAppsItems",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ShopItemView"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List items",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      },
      "post": {
        "description": "Price in hundredths of the currency; stock null means not tracked. Needs the apps:write scope.",
        "operationId": "postAppsItems",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "name": "Latte",
                "category": "Coffee",
                "price": 6500,
                "available": true,
                "stock": null
              },
              "schema": {
                "$ref": "#/components/schemas/ShopItemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShopItemView"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create an item",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/items/{item}": {
      "delete": {
        "description": "Needs the apps:write scope.",
        "operationId": "deleteAppsItemsItem",
        "parameters": [
          {
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Delete an item",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      },
      "put": {
        "description": "Needs the apps:write scope.",
        "operationId": "putAppsItemsItem",
        "parameters": [
          {
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShopItemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShopItemView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change an item",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/orders": {
      "get": {
        "description": "Open orders and the last 12 hours; view=all pages through every order, 200 at a time. Needs the apps:read scope.",
        "operationId": "getAppsOrders",
        "parameters": [
          {
            "description": "all for every order.",
            "in": "query",
            "name": "view",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "With view=all: entries older than this time (RFC 3339), for the next page.",
            "in": "query",
            "name": "before",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ShopOrderView"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List orders",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      },
      "post": {
        "description": "Items by id with qty and the chosen option indexes; payment cash, promptpay, transfer or card. Money is in hundredths of the shop's currency (satang, or att for kip). receiptPath/reportPath are the Console's own links; with the API use the receipt and report routes. Needs the apps:write scope.",
        "operationId": "postAppsOrders",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "items": [
                  {
                    "id": "ITEM_ID",
                    "qty": 2
                  }
                ],
                "fulfilment": "pickup",
                "payment": "cash",
                "name": "Walk-in"
              },
              "schema": {
                "$ref": "#/components/schemas/ShopOrderInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "order": {
                      "$ref": "#/components/schemas/ShopOrderView"
                    },
                    "receiptPath": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a counter order",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/orders/{order}": {
      "patch": {
        "description": "Status (new, preparing, ready, shipped, completed, cancelled), paid, refund (with a reason), carrier and tracking. A change that needs a manager's approval answers 403 with the reason. Needs the apps:write scope.",
        "operationId": "patchAppsOrdersOrder",
        "parameters": [
          {
            "in": "path",
            "name": "order",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "paid": true,
                "status": "completed"
              },
              "schema": {
                "$ref": "#/components/schemas/OrderUpdateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShopOrderView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change an order",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/orders/{order}/receipt": {
      "get": {
        "description": "A printable HTML page; the receipt is numbered the first time it is printed. Needs the apps:read scope.",
        "operationId": "getAppsOrdersOrderReceipt",
        "parameters": [
          {
            "in": "path",
            "name": "order",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Order receipt",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      }
    },
    "/apps/payment-qr": {
      "get": {
        "description": "The shop's (or a branch's) PromptPay, or LaoQR for a kip shop: payload is the EMV text to draw, qr the same as SVG. Money is in hundredths of the shop's currency (satang, or att for kip). Needs the apps:read scope.",
        "operationId": "getAppsPaymentQr",
        "parameters": [
          {
            "description": "Required. The amount, in hundredths of the shop's currency.",
            "in": "query",
            "name": "amount",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only this branch.",
            "in": "query",
            "name": "branch",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "amount": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "qr": {
                      "$ref": "#/components/schemas/PromptPayQR"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Payment QR for an amount",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      }
    },
    "/apps/report": {
      "get": {
        "description": "Needs the apps:read scope.",
        "operationId": "getAppsReport",
        "parameters": [
          {
            "description": "Only this branch.",
            "in": "query",
            "name": "branch",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM.",
            "in": "query",
            "name": "month",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "today, yesterday, week or month.",
            "in": "query",
            "name": "range",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "First day, YYYY-MM-DD.",
            "in": "query",
            "name": "from",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Last day, YYYY-MM-DD.",
            "in": "query",
            "name": "to",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShopReport"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Sales report",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      }
    },
    "/apps/resources": {
      "get": {
        "description": "Needs the apps:read scope.",
        "operationId": "getAppsResources",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ResourceView"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List bookable services and room types",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      },
      "post": {
        "description": "Needs the apps:write scope.",
        "operationId": "postAppsResources",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceView"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a service or room type",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/resources/{res}": {
      "delete": {
        "description": "Needs the apps:write scope.",
        "operationId": "deleteAppsResourcesRes",
        "parameters": [
          {
            "in": "path",
            "name": "res",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Delete a service or room type",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      },
      "put": {
        "description": "Needs the apps:write scope.",
        "operationId": "putAppsResourcesRes",
        "parameters": [
          {
            "in": "path",
            "name": "res",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change a service or room type",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/shifts": {
      "get": {
        "description": "Needs the apps:read scope.",
        "operationId": "getAppsShifts",
        "parameters": [
          {
            "description": "Only this branch.",
            "in": "query",
            "name": "branch",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ShiftView"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List till shifts",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      },
      "post": {
        "description": "With the float in the drawer. Money is in hundredths of the shop's currency (satang, or att for kip). Needs the apps:write scope.",
        "operationId": "postAppsShifts",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "name": "Morning",
                "openingFloat": 200000
              },
              "schema": {
                "$ref": "#/components/schemas/ShiftOpenInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShiftView"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Open a till shift",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/shifts/{shift}/close": {
      "post": {
        "description": "Open bills are in the way unless force is set. receiptPath/reportPath are the Console's own links; with the API use the receipt and report routes. Needs the apps:write scope.",
        "operationId": "postAppsShiftsShiftClose",
        "parameters": [
          {
            "in": "path",
            "name": "shift",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "countedCash": 458000,
                "note": ""
              },
              "schema": {
                "$ref": "#/components/schemas/ShiftCloseInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "reportPath": {
                      "type": "string"
                    },
                    "shift": {
                      "$ref": "#/components/schemas/ShiftView"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Count and close a shift",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/shifts/{shift}/report": {
      "get": {
        "description": "The printable close-of-shift slip. Needs the apps:read scope.",
        "operationId": "getAppsShiftsShiftReport",
        "parameters": [
          {
            "in": "path",
            "name": "shift",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Shift report",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      }
    },
    "/apps/shop": {
      "get": {
        "description": "Settings (shop) and what the shop runs (apps). Needs the apps:read scope.",
        "operationId": "getAppsShop",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShopInfo"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get the shop",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      },
      "put": {
        "description": "Send back the shop object from GET apps/shop with your changes; it is replaced whole. Needs the apps:write scope.",
        "operationId": "putAppsShop",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShopSettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShopInfo"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change the shop's settings",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/staff": {
      "get": {
        "description": "Needs the apps:read scope.",
        "operationId": "getAppsStaff",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/BookingStaffRow"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List people customers book",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      },
      "post": {
        "description": "Needs the apps:write scope.",
        "operationId": "postAppsStaff",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingStaffRow"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Add a person customers book",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/staff/{staff}": {
      "delete": {
        "description": "Needs the apps:write scope.",
        "operationId": "deleteAppsStaffStaff",
        "parameters": [
          {
            "in": "path",
            "name": "staff",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Remove a person",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      },
      "put": {
        "description": "Needs the apps:write scope.",
        "operationId": "putAppsStaffStaff",
        "parameters": [
          {
            "in": "path",
            "name": "staff",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingStaffRow"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change a person",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/units": {
      "get": {
        "description": "Needs the apps:read scope.",
        "operationId": "getAppsUnits",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/BookingUnit"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List rooms",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:read"
      },
      "post": {
        "description": "Needs the apps:write scope.",
        "operationId": "postAppsUnits",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnitsCreateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/BookingUnit"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Add rooms of a room type",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/units/{unit}": {
      "delete": {
        "description": "Needs the apps:write scope.",
        "operationId": "deleteAppsUnitsUnit",
        "parameters": [
          {
            "in": "path",
            "name": "unit",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Delete a room",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      },
      "put": {
        "description": "Needs the apps:write scope.",
        "operationId": "putAppsUnitsUnit",
        "parameters": [
          {
            "in": "path",
            "name": "unit",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnitUpdateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingUnit"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change a room",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/apps/units/{unit}/status": {
      "post": {
        "description": "Needs the apps:write scope.",
        "operationId": "postAppsUnitsUnitStatus",
        "parameters": [
          {
            "in": "path",
            "name": "unit",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnitStatusInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingUnit"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Set a room's housekeeping status",
        "tags": [
          "Business Apps"
        ],
        "x-scope": "apps:write"
      }
    },
    "/key": {
      "get": {
        "description": "The key's Project, scopes, limits and expiry. Not billed, so an integration can check its setup for free.",
        "operationId": "getKey",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "expiresAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "locationIds": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "name": {
                      "type": "string"
                    },
                    "projectId": {
                      "type": "string"
                    },
                    "scopes": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "siteIds": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Describe the calling key",
        "tags": [
          "Keys"
        ]
      }
    },
    "/wifi/directories": {
      "get": {
        "description": "Empty for a key limited to some locations. Needs the wifi:read scope.",
        "operationId": "getWifiDirectories",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/WifiDirectoryView"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List staff directories",
        "tags": [
          "Identity"
        ],
        "x-scope": "wifi:read"
      }
    },
    "/wifi/directories/{dir}": {
      "get": {
        "description": "Needs the wifi:read scope.",
        "operationId": "getWifiDirectoriesDir",
        "parameters": [
          {
            "in": "path",
            "name": "dir",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "directory": {
                      "$ref": "#/components/schemas/WifiDirectoryView"
                    },
                    "groups": {
                      "items": {
                        "$ref": "#/components/schemas/WifiGroup"
                      },
                      "type": "array"
                    },
                    "users": {
                      "items": {
                        "$ref": "#/components/schemas/WifiUserView"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get a directory with its users and groups",
        "tags": [
          "Identity"
        ],
        "x-scope": "wifi:read"
      }
    },
    "/wifi/directories/{dir}/groups": {
      "post": {
        "description": "Needs the wifi:write scope.",
        "operationId": "postWifiDirectoriesDirGroups",
        "parameters": [
          {
            "in": "path",
            "name": "dir",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WifiGroupInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WifiGroup"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a group",
        "tags": [
          "Identity"
        ],
        "x-scope": "wifi:write"
      }
    },
    "/wifi/directories/{dir}/groups/{group}": {
      "delete": {
        "description": "Needs the wifi:write scope.",
        "operationId": "deleteWifiDirectoriesDirGroupsGroup",
        "parameters": [
          {
            "in": "path",
            "name": "dir",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "group",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Delete a group",
        "tags": [
          "Identity"
        ],
        "x-scope": "wifi:write"
      },
      "put": {
        "description": "Needs the wifi:write scope.",
        "operationId": "putWifiDirectoriesDirGroupsGroup",
        "parameters": [
          {
            "in": "path",
            "name": "dir",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "group",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WifiGroupInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WifiGroup"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change a group",
        "tags": [
          "Identity"
        ],
        "x-scope": "wifi:write"
      }
    },
    "/wifi/directories/{dir}/users": {
      "post": {
        "description": "Leave password empty to have one generated; it is answered once. Needs the wifi:write scope.",
        "operationId": "postWifiDirectoriesDirUsers",
        "parameters": [
          {
            "in": "path",
            "name": "dir",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "username": "somchai",
                "displayName": "Somchai J.",
                "email": "somchai@example.com"
              },
              "schema": {
                "$ref": "#/components/schemas/WifiUserInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "password": {
                      "type": "string"
                    },
                    "user": {
                      "$ref": "#/components/schemas/WifiUser"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a staff account",
        "tags": [
          "Identity"
        ],
        "x-scope": "wifi:write"
      }
    },
    "/wifi/directories/{dir}/users/import": {
      "post": {
        "description": "A CSV body: username, display name, email, group, password (empty: generated). Up to 5,000 rows; existing usernames are updated. Needs the wifi:write scope.",
        "operationId": "postWifiDirectoriesDirUsersImport",
        "parameters": [
          {
            "in": "path",
            "name": "dir",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "text/csv": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created": {
                      "type": "integer"
                    },
                    "passwords": {
                      "items": {
                        "properties": {
                          "password": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "updated": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Import staff accounts",
        "tags": [
          "Identity"
        ],
        "x-scope": "wifi:write"
      }
    },
    "/wifi/directories/{dir}/users/{user}": {
      "delete": {
        "description": "Needs the wifi:write scope.",
        "operationId": "deleteWifiDirectoriesDirUsersUser",
        "parameters": [
          {
            "in": "path",
            "name": "dir",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Delete a staff account",
        "tags": [
          "Identity"
        ],
        "x-scope": "wifi:write"
      },
      "put": {
        "description": "Needs the wifi:write scope.",
        "operationId": "putWifiDirectoriesDirUsersUser",
        "parameters": [
          {
            "in": "path",
            "name": "dir",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WifiUserInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WifiUser"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change a staff account",
        "tags": [
          "Identity"
        ],
        "x-scope": "wifi:write"
      }
    },
    "/wifi/directories/{dir}/users/{user}/password": {
      "post": {
        "description": "Needs the wifi:write scope.",
        "operationId": "postWifiDirectoriesDirUsersUserPassword",
        "parameters": [
          {
            "in": "path",
            "name": "dir",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WifiPasswordInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "password": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Set or generate a password",
        "tags": [
          "Identity"
        ],
        "x-scope": "wifi:write"
      }
    },
    "/wifi/locations": {
      "get": {
        "description": "The locations the key reaches. Needs the wifi:read scope.",
        "operationId": "getWifiLocations",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/WifiLocationView"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List locations",
        "tags": [
          "Wi-Fi Hotspot"
        ],
        "x-scope": "wifi:read"
      }
    },
    "/wifi/locations/{id}": {
      "get": {
        "description": "With its devices online in the last day. Needs the wifi:read scope.",
        "operationId": "getWifiLocationsId",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WifiDetail"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get a location",
        "tags": [
          "Wi-Fi Hotspot"
        ],
        "x-scope": "wifi:read"
      }
    },
    "/wifi/locations/{id}/contacts": {
      "get": {
        "description": "Personal data: needs the wifi:write scope. Needs the wifi:write scope.",
        "operationId": "getWifiLocationsIdContacts",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "contacts": {
                      "items": {
                        "$ref": "#/components/schemas/WifiGuestContact"
                      },
                      "type": "array"
                    },
                    "marketing": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "total": {
                      "format": "int64",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List guest contacts",
        "tags": [
          "Wi-Fi Hotspot"
        ],
        "x-scope": "wifi:write"
      }
    },
    "/wifi/locations/{id}/contacts/{contact}": {
      "delete": {
        "description": "Needs the wifi:write scope.",
        "operationId": "deleteWifiLocationsIdContactsContact",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "contact",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Delete a guest contact",
        "tags": [
          "Wi-Fi Hotspot"
        ],
        "x-scope": "wifi:write"
      },
      "put": {
        "description": "Needs the wifi:write scope.",
        "operationId": "putWifiLocationsIdContactsContact",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "contact",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactUpdateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change a guest contact",
        "tags": [
          "Wi-Fi Hotspot"
        ],
        "x-scope": "wifi:write"
      }
    },
    "/wifi/locations/{id}/stats": {
      "get": {
        "description": "Needs the wifi:read scope.",
        "operationId": "getWifiLocationsIdStats",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "24h, 7d, 30d, 90d or 1y.",
            "in": "query",
            "name": "range",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WifiStatsView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Usage statistics",
        "tags": [
          "Wi-Fi Hotspot"
        ],
        "x-scope": "wifi:read"
      }
    },
    "/wifi/locations/{id}/vouchers": {
      "get": {
        "description": "Needs the wifi:read scope.",
        "operationId": "getWifiLocationsIdVouchers",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only this batch.",
            "in": "query",
            "name": "batch",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "batches": {
                      "items": {
                        "properties": {
                          "createdAt": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "minutes": {
                            "type": "integer"
                          },
                          "note": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "vouchers": {
                      "items": {
                        "$ref": "#/components/schemas/WifiVoucher"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List access codes",
        "tags": [
          "Wi-Fi Hotspot"
        ],
        "x-scope": "wifi:read"
      },
      "post": {
        "description": "count codes, each good for minutes after first use, on up to devices devices at once. Needs the wifi:write scope.",
        "operationId": "postWifiLocationsIdVouchers",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "count": 1,
                "minutes": 1440,
                "devices": 2,
                "note": "Room 1204"
              },
              "schema": {
                "$ref": "#/components/schemas/VoucherCreateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "batch": {
                      "type": "string"
                    },
                    "vouchers": {
                      "items": {
                        "$ref": "#/components/schemas/WifiVoucher"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Issue access codes",
        "tags": [
          "Wi-Fi Hotspot"
        ],
        "x-scope": "wifi:write"
      }
    },
    "/wifi/locations/{id}/vouchers/print": {
      "get": {
        "description": "A printable HTML page of cards. Needs the wifi:read scope.",
        "operationId": "getWifiLocationsIdVouchersPrint",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only this batch.",
            "in": "query",
            "name": "batch",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Print access codes",
        "tags": [
          "Wi-Fi Hotspot"
        ],
        "x-scope": "wifi:read"
      }
    },
    "/wifi/locations/{id}/vouchers/{voucher}/void": {
      "post": {
        "description": "Needs the wifi:write scope.",
        "operationId": "postWifiLocationsIdVouchersVoucherVoid",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "voucher",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "402": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Void an access code",
        "tags": [
          "Wi-Fi Hotspot"
        ],
        "x-scope": "wifi:write"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.thailandhosting.com/v1"
    }
  ],
  "tags": [
    {
      "name": "Keys"
    },
    {
      "description": "The Project's Business Apps API shop. Turn the Business Apps API on under Integrations.",
      "name": "Business Apps"
    },
    {
      "description": "The Project's Wi-Fi locations. Turn the Wi-Fi Hotspot API on under Integrations.",
      "name": "Wi-Fi Hotspot"
    },
    {
      "description": "The Project's company users, for Wi-Fi Hotspot and VPN sign-in. Free: calls are not billed. Uses the Wi-Fi Hotspot API's switch and scopes.",
      "name": "Identity"
    }
  ]
}