openapi: 3.0.0
info:
  title: Kiolyn POS API
  description: Kiolyn POS API
  contact:
    name: Chinh Nguyen
    url: 'https://willbe.vn'
    email: chinh@willbe.vn
  license:
    name: Copyright 2018 of ChaChaPOS INc.
    url: 'https://kiolyn.com/copyright'
  version: v2
servers:
  - url: 'https://api-staging.kiolyn.com'
    description: Staging API Server
  - url: 'https://api-production.kiolyn.com'
    description: Production API Server
tags:
  - name: meta
    description: API info related API.
  - name: user
    description: User authentication API.
  - name: password
    description: 'Password related (reset password, request new password, etc.) API.'
  - name: store
    description: Store related functions.
  - name: merchant
    description: Merchant related functions
  - name: employee
    description: Employee related functions
  - name: customer
    description: Customer related functions
  - name: giftcard
    description: Gift card related functions
  - name: area
    description: Area related functions
  - name: category
    description: Category related functions
  - name: item
    description: Item related functions
  - name: modifier
    description: Modifier related functions
  - name: station
    description: Station related functions
  - name: ccdevice
    description: CC Device related functions
  - name: printer
    description: Printer related functions
  - name: screen
    description: Screen related functions
  - name: kiosk
    description: Kiosk related functions
  - name: settings
    description: Settings related functions
  - name: image
    description: Image related functions
  - name: maps
    description: Maps related functions
  - name: shopItem
    description: Shop item related functions
  - name: shopOrder
    description: Shop order related functions
  - name: promoCode
    description: Promo code related functions
  - name: kitchenDisplay
    description: Kitchen display related functions
  - name: promotion
    description: Promotion related functions
  - name: delivery
    description: Delivery related functions
  - name: menuTemplate
    description: Menu template related functions
  - name: kitchenReceiptTemplate
    description: Kitchen receipt template related functions
  - name: order
    description: Order template related functions
  - name: statusBoard
    description: status board related functions
  - name: audio
    description: audio related functions
  - name: auth
    description: Auth related functions
  - name: report
    description: Report related functions
  - name: onlineOrder
    description: Online Order related functions
  - name: superAdmin
    description: Super Admin Account Related functions
  - name: admin
    description: Admin Account Related functions
  - name: appSettings
    description: App Settings Related functions
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    ErrorResponse:
      type: object
      properties:
        code:
          type: number
        type:
          type: string
        message:
          type: string
    ResultResponse:
      type: object
      properties:
        result:
          type: boolean
          description: true if the result is positive and false otherwise
        message:
          type: string
          description: the detail message of the result
    OnlineOrderResponse:
      allOf:
        - $ref: '#/components/schemas/ResultResponse'
        - type: object
          properties:
            postmates_delivery_time:
              type: number
              description: >-
                the time by minutes that Postmates couriers need to delivery
                goods for customer.
            postmates_response:
              $ref: '#/components/schemas/ModelRef'
    QuerySummary:
      type: object
      required:
        - count
      properties:
        count:
          type: number
          description: Total of available records
        tip:
          type: number
          description: Total of tip
        total:
          type: number
          description: The total of all value of the records if any
    BaseModel:
      type: object
      required:
        - id
        - name
        - type
      discriminator:
        propertyName: type
      properties:
        id:
          type: string
          format: timestamp
          description: Object ID in timestamp format to 10 milliseconds
        type:
          type: string
        name:
          type: string
          description: name of the object.
        name2:
          type: string
          description: >-
            extra name of the object (normally for naming in different
            language).
        merchantid:
          type: string
          description: The ID of the merchant that this model belong to
        storeid:
          type: string
          description: The ID of the store that this model belong to
        updated_at:
          type: string
          description: The timestamp of last updated time
        updated_by:
          type: string
          description: The ID of user who made the last updated
    ModelRef:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          format: timestamp
          description: Object ID in timestamp format to 10 milliseconds
    Permissions:
      type: object
      properties:
        weblogin:
          type: boolean
          description: True if this user can login to web admin
        max_discount:
          type: number
          description: The maximum discount that this user is able to use
        max_discount_amount:
          type: number
          description: The maximum discount amount that this user is able to use
        all_transactions:
          type: boolean
          description: True if this user is able to edit all transactions
        manage_all_tables:
          type: boolean
          description: True if this user is able to manage all tables
        employee:
          type: boolean
          description: True if this user is able to manage employee list
        view_customer:
          type: boolean
          description: True if this user is able to manage customer list
        giftcard:
          type: boolean
          description: True if this user is able to manage gift card list
        area:
          type: boolean
          description: True if this user is able to manage area list
        online_ordering:
          type: boolean
          description: True if this user is able to view edit online ordering permission
        waitlist:
          type: boolean
          description: True if this user is able to manage waitlist
        gallery:
          type: boolean
          description: True if this user is able to manage gallery
        screen:
          type: boolean
          description: True if this user is able to enable and disable manage TV signage
        tip_report:
          type: boolean
          description: True if this user is able to edit tip
        tax:
          type: boolean
          description: True if this user is able to manage settings
        website:
          type: boolean
          description: True if this user is able to manage website
        reservation:
          type: boolean
          description: True if this user is able to manage reservation
        edit_modifiers:
          type: boolean
          description: True if this user is able to edit modifiers
        view_report:
          type: boolean
          description: True if this user is able view reports
        device:
          type: boolean
          description: True if this user is able to manage device list
        printtpl:
          type: boolean
          description: True if this user is able to manage print templates
        menu:
          type: boolean
          description: >-
            True if this user is able to manage menu (categories, items,
            modifiers)
        refund_void_unpaid_settle:
          type: boolean
          description: >-
            True if this user is able refund, void, unpaid and settle using POS
            app
        delete_edit_sent_items:
          type: boolean
          description: True if this user is able to delete or edit sent items using POS app
        price_adjustment:
          type: boolean
          description: True if this user is able to adjust item price using POS app.
        change_order_tax:
          type: boolean
          description: True if this user is able to change tax using POS app.
        report:
          type: boolean
        show_save_price:
          type: boolean
          description: True if this user is able to see save price button on POS app.
        open_item:
          type: boolean
          description: True if this user is able to open new item on POS app.
        cash_report_edit:
          type: boolean
          description: True if this user is able to edit cash report using POS app.
        tip_calculator:
          type: boolean
          description: True if this user is able to open tip calculator using POS app.
        customer:
          type: boolean
        order:
          type: boolean
          description: True if this user is able to create order using POS app.
        activate_gift_card:
          type: boolean
          description: True if this user is able to activate gift card using POS app.
        must_clockin:
          type: boolean
          description: True if this user is must clockin before using POS app.
        view_shop:
          type: boolean
          description: True if this user is able to order shop item.
        send_offline_mode:
          type: boolean
          description: True if this user is able to send offline mode to pax device.
        promotion:
          type: boolean
          description: True if this user is able to manage promotion.
        promocode:
          type: boolean
          description: True if this user is able to manage promocode.
        allow_close_batch:
          type: boolean
          description: True if allow employee close batch.
        close_all_orders:
          type: boolean
          description: True if allow employee close all orders.
        change_order_employee:
          type: boolean
        delete_item_on_menu:
          type: boolean
          description: True if allow employee delete items on Menu.
    Employee:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            country:
              type: string
            state:
              type: string
            zip:
              type: string
            status:
              type: string
              description: 'Status of this employee, possible values are active and inactive'
            email:
              type: string
              description: Use as web admin login account
            password:
              type: string
              description: Use as web admin login account
            permissions:
              $ref: '#/components/schemas/Permissions'
            address:
              type: string
            city:
              type: string
            passkey:
              type: string
              description: Use as POS app identification
            fobkey:
              type: string
            start:
              type: string
              description: The date that employee start working
            payrate:
              type: string
            overtime_payrate:
              type: string
            cash_tip_percentage:
              type: number
              description: The percentage used for tip calculating
            dob:
              type: string
            mobilephone:
              type: string
            delivery_driver:
              type: boolean
              description: True is this employee is also a delivery driver
            jobtitle:
              type: string
            location:
              type: string
            co_owner:
              type: boolean
    Merchant:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          required:
            - email
            - password
            - biz_first_name
            - biz_last_name
            - partnerid
          properties:
            partnerid:
              type: string
            biz_legal_country:
              type: string
            owner_country:
              type: string
            status:
              type: string
            store_name:
              type: string
            email:
              type: string
            password:
              type: string
            biz_first_name:
              type: string
            biz_last_name:
              type: string
            biz_phone:
              type: string
            biz_city:
              type: string
            stores:
              type: array
              items:
                $ref: '#/components/schemas/Store'
            groups:
              type: array
              items:
                $ref: '#/components/schemas/GcGroup'
    Image:
      type: object
      required:
        - mime
        - file
        - size
      properties:
        mime:
          type: string
        size:
          type: integer
        file:
          type: string
    GcGroup:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            stores:
              type: array
              description: list of stores this group belongs to.
              items:
                type: string
            giftcards:
              type: array
              items:
                $ref: '#/components/schemas/Giftcard'
    Store:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          required:
            - partnerid
          properties:
            partnerid:
              type: string
              description: the partner's id that this store belongs to.
            status:
              type: string
              description: 'status of a store, can be either active and inactive.'
            biz_legal_country:
              type: string
            owner_country:
              type: string
            store_name:
              type: string
              description: store's brand name.
            biz_first_name:
              type: string
              description: store's contact first name.
            biz_last_name:
              type: string
              description: store's contact last name.
            biz_phone:
              type: string
              description: store's contact phone.
            biz_city:
              type: string
              description: store's city.
            biz_email:
              type: string
              description: store's contact email.
            biz_country:
              type: string
              description: store's country.
            biz_zip:
              type: string
              description: store's zip.
            biz_address:
              type: string
              description: store's address.
            logo:
              $ref: '#/components/schemas/Image'
            expiration_date:
              type: string
            incorp:
              type: string
            isActive:
              type: boolean
            vaultKey:
              type: string
            creditCardId:
              type: integer
            cardInfo:
              type: object
              properties:
                cardNoFirst6:
                  type: string
                cardNoLast4:
                  type: string
                cardExpMM:
                  type: string
                cardExpYY:
                  type: string
                cardType:
                  type: string
            achId:
              type: integer
            bankInfo:
              type: object
              properties:
                ddaLast4:
                  type: string
                abaLast4:
                  type: string
                achName:
                  type: string
                accountType:
                  type: string
            isPaymentActive:
              type: boolean
            current_version:
              type: string
              description: The current main PC version
            latest_version:
              type: string
              description: The latest main PC version that is available
            owner_security_number:
              type: string
            account_number:
              type: string
            timezone:
              type: string
            owner_dob:
              type: string
            terminal_id:
              type: string
            emails:
              type: array
              items:
                type: string
    Customer:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            address:
              type: string
            city:
              type: string
            country:
              type: string
            email:
              type: string
            note:
              type: string
            state:
              type: string
            zip:
              type: string
            mobilephone:
              type: string
            company:
              type: string
            customer_no:
              type: number
            reward_points:
              type: number
            deposit_amount:
              type: number
    GiftcardLog:
      type: object
      description: Log the history of operation of a giftcard
      properties:
        by:
          type: string
          description: User ID that perform the action
        by_name:
          type: string
          description: User name that perform the action
        at:
          type: string
          description: Station ID that perform the action
        at_name:
          type: string
          description: Station name that perform the action
        type:
          type: string
          description: >-
            The type of actions that was perform, possible value are add and
            subtract
        amount:
          type: number
          description: The amount of this action log
        balance:
          type: number
          description: The balance amount after this action log
    Giftcard:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            status:
              type: string
              description: 'Status of this giftcard, possible value are active/inactive'
            balance:
              type: number
              description: The current balance amount
            card_number:
              type: string
              description: The unique number of this card
            logs:
              type: array
              items:
                $ref: '#/components/schemas/GiftcardLog'
            gc_group:
              type: string
              description: Gift card group
    Area:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            area_type:
              type: string
              description: Area Type
            layout:
              type: array
              items:
                $ref: '#/components/schemas/Table'
            delivery_auto_increment:
              type: boolean
              description: True if this area is for delivery
            customer_info:
              type: boolean
              description: True if this area should prompt for customer info
            order:
              type: number
              description: The order in which this area will be displayed in POS app
            apply_tax:
              type: boolean
              description: >-
                True if this created order for this area should have tax by
                default
            item_price_type:
              type: string
              description: Item price type
            quick_pay:
              type: boolean
              description: True if apply quick pay
            quick_payment_type:
              type: string
              description: quick payment type
            pay_with_save_send:
              type: boolean
              description: True if order belongs to this area should pay when send/save
            auto_claim:
              type: boolean
              description: True if auto claim
            show_time_lapsed:
              type: boolean
              description: True if show time lapsed
            print_check_with_save_send:
              type: boolean
              description: >-
                True if order belongs to this area should print check when
                send/save
            no_of_guest:
              type: boolean
              description: True if this area should prompt for number of guest
            service_fee_prompt:
              type: boolean
              description: True if this area should prompt for service fee inputs
            delivery_fee_prompt:
              type: boolean
              description: True if this area should prompt for delivery fee inputs
            misc_prompt:
              type: boolean
              description: True if this area should prompt for misc prompt
            condiments:
              type: boolean
              description: True if this area should prompt for condiments
            plastic_utensils:
              type: boolean
              description: True if this area should prompt for plastic utensils
            pickup_delivery_prompt:
              type: boolean
              description: True if this area should prompt for pickup/delivery time inputs
            time_delay:
              type: number
              description: Pickup/delivery time inputs
            togo_auto_increment:
              type: boolean
              description: True if this area is for TOGO
            check_copies:
              type: string
            receipt_settings:
              type: array
              items:
                $ref: '#/components/schemas/ReceiptSettings'
            kitchen_receipts:
              type: array
              items:
                type: string
            payment_types:
              type: array
              items:
                type: string
            auto_assign:
              type: boolean
            assigned_employee:
              type: string
            payment_type_for_order_pay:
              type: string
            printer_group_items:
              type: array
              items:
                type: object
                properties:
                  printer_id:
                    type: string
                  items:
                    type: array
                    items:
                      type: number
            pay_first_send_later:
              type: boolean
    ReceiptSettings:
      type: object
      description: Receipt settings for an Area.
      properties:
        payment_type:
          type: string
          description: payment type's id.
        auto:
          type: boolean
          description: auto print ReceiptSettings
        merchant_copy:
          type: boolean
          description: print merchant copy
        customer_copy:
          type: boolean
          description: print customer copy
        check_copy:
          type: boolean
          description: check copy
    Table:
      type: object
      description: >-
        Contain information about a single table including its position and
        size.
      properties:
        ppl:
          type: number
          description: Number of people that can sit this table
        type:
          type: string
          description: 'Shape of this table, possible values are rectangle/ellipse'
        left:
          type: number
          description: Left position
        top:
          type: number
          description: Top position
        width:
          type: number
          description: Table width
        height:
          type: number
          description: Table height
        angle:
          type: number
          description: Rotation angle
    Category:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            hidden:
              type: boolean
              description: >-
                True if this category should not be displayed in POS app for
                ordering
            show_on_web_order:
              type: boolean
              description: True if this category should be displayed in web order
            category_types:
              type: array
              items:
                type: string
              description: The types of category to be grouped in POS app
            category_buckets:
              type: array
              items:
                type: string
              description: The bucket of category
            printers:
              type: array
              items:
                $ref: '#/components/schemas/PrinterReceipt'
            kitchen_displays:
              type: array
              items:
                $ref: '#/components/schemas/KitchenDisplay'
            color:
              type: string
              description: The display color on menu of POS app
            order:
              type: string
              description: The display order inside a category group
            open_item:
              type: boolean
              description: True if this category can open new item when ordering on PC/iPad
            description:
              type: string
              description: Category description
            schedules:
              $ref: '#/components/schemas/CategorySchedules'
            gift_card:
              type: boolean
              description: True if user can create gift cards for this category
            gift_certificate:
              type: boolean
              description: True if user can create gift certificates for this category
            display_order:
              type: number
              description: The display order of this category in online ordering.
            max_display_count:
              type: number
    CategorySchedules:
      type: object
      properties:
        always_available:
          type: boolean
          description: True if this category is always available to order
        unavailable_message:
          type: string
          description: The message show in web order when category is not available.
        available_hours:
          description: list of from/to available hours in weeks.
          type: array
          items:
            $ref: '#/components/schemas/CategoryScheduleHour'
    CategoryScheduleHour:
      type: object
      properties:
        day_of_week:
          type: number
          description: date of week in number.
        is_available:
          type: boolean
          description: 'true if it this is a available day, false otherwise.'
        from_1:
          type: string
          description: first period start time.
        to_1:
          type: string
          description: first period end time.
        from_2:
          type: string
          description: second period start time.
        to_2:
          type: string
          description: second period end time.
    CategorySummary:
      type: object
      properties:
        id:
          type: string
          description: the Category's ID
        name:
          type: string
          description: the Category's Name
        item_count:
          type: number
          description: the number of Items belongs to this Category
    Item:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            hidden:
              type: boolean
              description: >-
                True if this item is unavaible in store and should not be
                displayed in POS app for ordering
            modifiers:
              type: array
              items:
                $ref: '#/components/schemas/ModelRef'
            notes:
              type: array
              items:
                $ref: '#/components/schemas/ModelRef'
            printers:
              type: array
              items:
                $ref: '#/components/schemas/ModelRef'
            color:
              type: string
              description: The display color on menu of POS app
            imported_id:
              type: string
            name2:
              type: string
              description: The second name of item with special language
            oldmodifiers:
              type: array
              items:
                $ref: '#/components/schemas/ModelRef'
            price:
              type: number
              description: The price of item
            barcode:
              type: number
              description: The item barcode
            non_taxable:
              type: boolean
              description: True if this item is non-taxable
            category:
              type: string
              description: The category ID that this item belong to
            category_name:
              type: string
              description: The category name that this item belong to
            selected:
              type: boolean
              description: >-
                True if this item is selected for modifier (use in editting
                modifier)
            image:
              $ref: '#/components/schemas/Image'
            quantity:
              type: number
            online:
              type: number
            display_order:
              type: number
            kitchen_displays:
              type: array
              items:
                $ref: '#/components/schemas/ModelRef'
    Modifier:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            multiple:
              type: boolean
              description: True if this modifier can select multiple options
            global:
              type: boolean
              description: True if this modifier can be applied to all items
            prefix:
              type: string
              description: >-
                The prefix of modifier that will be added next to option
                modifier name
            online_ordering:
              type: boolean
              description: True if this modifier will be shown in online ordering
            options:
              type: array
              items:
                $ref: '#/components/schemas/ModifierOption'
            items:
              type: array
              description: The items that this modifier is used
              items:
                $ref: '#/components/schemas/ModelRef'
            olditems:
              type: array
              description: Old references of items
              items:
                $ref: '#/components/schemas/ModelRef'
            color:
              type: string
            modifier_display:
              type: string
    ModifierOption:
      allOf:
        - $ref: '#/components/schemas/ModelRef'
        - type: object
          properties:
            name:
              type: string
              description: the name of this option.
            name2:
              type: string
              description: the extra name (normally in different language) of this option.
            display_order:
              type: number
            price:
              type: number
              description: the price of this option.
            percent:
              type: number
            sub_modifier_id:
              type: string
              description: the ID of sub-modifier.
            color:
              type: string
              description: the color of this option.
            required_level:
              type: string
              description: required level for sub modifier.
            is_modifier_color:
              type: boolean
            display_on:
              type: string
    Station:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            enabled:
              type: boolean
              description: True if this station is one of devices to run POS.
            location:
              type: string
              description: This is location that station belong to
            ccdevice:
              type: string
              description: This device will be used on station
            station_type:
              type: string
              description: The type of station can be PC or iPad
            printer:
              type: string
              description: This is printer default of station
            oo_printer:
              type: string
            ip_address:
              type: string
            station_id:
              type: string
              description: iPad station id
            mac_address:
              type: string
            mac_address_2:
              type: string
            mac_address_3:
              type: string
            main:
              type: boolean
              description: True if this station is Main.
            on_screen_signature:
              type: boolean
              description: >-
                If it's true, allow customer signature when make a payment by
                card.
            on_screen_tip_prompt:
              type: boolean
            main_print:
              type: boolean
    BillingStation:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            stationType:
              type: string
              description: The type of station can be PC or iPad
            main:
              type: boolean
              description: True if this station is Main.
            quantity:
              type: number
            storeName:
              type: string
            fee:
              type: number
            flatFee:
              type: number
            rate:
              type: number
            total:
              type: number
    CCDevice:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            enabled:
              type: boolean
              description: True if this device still be connected.
            location:
              type: string
              description: This is location that device belong to
            ccdevice_type:
              type: string
              description: This is cc device type.
            ip_address:
              type: string
            mac_address:
              type: string
            serial_number:
              type: string
            show_tip_guide_on_pax_device:
              type: boolean
    Admin:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            email:
              type: string
            first_name:
              type: string
            last_name:
              type: string
            password:
              type: string
            passkey:
              type: string
            access_all_stores:
              type: boolean
            permissions:
              $ref: '#/components/schemas/AdminPermissions'
    AdminPermissions:
      type: object
      properties:
        access_partners:
          type: boolean
        access_reports:
          type: boolean
        all_stations:
          type: boolean
        app_setting:
          type: boolean
        billings:
          type: boolean
        error_log_list:
          type: boolean
        invoices:
          type: boolean
        partners:
          type: boolean
        reports:
          type: boolean
        shop_items:
          type: boolean
        shop_orders:
          type: boolean
        stores:
          type: boolean
        store_info:
          type: boolean
        holidays:
          type: boolean
    SuperAdmin:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            email:
              type: string
            password:
              type: string
    AppSettings:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            masterPickupRate:
              type: number
            masterDeliveryRate:
              type: number
            masterPickupFlatFee:
              type: number
            masterDeliveryFlatFee:
              type: number
            master_pin:
              type: number
            support_emails:
              type: array
              description: list of support email
              items:
                $ref: '#/components/schemas/SuperAdminSupportEmail'
            goemerchant:
              $ref: '#/components/schemas/GoEConfig'
            doordash:
              $ref: '#/components/schemas/DoorDashConfig'
            holidays:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  date:
                    type: string
                  country:
                    type: string
    SuperAdminSupportEmail:
      type: object
      description: Super admin Support Emails
      properties:
        email:
          type: string
    GoEConfig:
      type: object
      description: Go E-Merchant Config
      properties:
        merchantKey:
          type: string
        achProcessorId:
          type: string
        motoProcessorId:
          type: string
        categoryText:
          type: string
    DoorDashConfig:
      type: object
      description: Door Dash Config
      properties:
        apiKey:
          type: string
        apiKeyStaging:
          type: string
        webhookApiKey:
          type: string
    Settings:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            published:
              type: boolean
              description: true if this Store can be listed under WebOrder's stores page.
            is_show_auth:
              type: boolean
            accept_online_order:
              type: boolean
              description: >-
                true if this Store is accepting online order, false if the
                online store is for preview only.
            accept_dinein:
              type: boolean
              description: true if this Store is allowing dinein for online.
            accept_delivery:
              type: boolean
              description: true if this Store is allowing delivery for online orders.
            delay_delivery_time:
              type: number
              description: >-
                the time delay that we do auto Move and Send before delivery
                time.
            accept_pickup:
              type: boolean
              description: true if this Store is allowing pickup for online orders.
            delay_pickup_time:
              type: number
              description: the time delay that we do auto Move and Send before pickup time.
            delay_dinein_time:
              description: the auto move/send time in minutes for delay dinein time.
              type: number
            accept_online_payment:
              type: boolean
              description: true if this Store is allowing online payment.
            auto_move_send:
              type: boolean
              description: true if online Order should be automatically moved and sent.
            auto_move_send_right_way:
              type: boolean
            payment_settings:
              $ref: '#/components/schemas/PaymentSettings'
            auto_close_batch_settings:
              $ref: '#/components/schemas/AutoCloseBatchSettings'
            email_close_batch_settings:
              $ref: '#/components/schemas/EmailCloseBatchSettings'
            web_order_confirm_message:
              type: string
              description: the message to be displayed after online order is submitted.
            web_order_notification_emails:
              type: string
              description: the list of emails to received new order notification.
            ffd_images:
              type: array
              description: list of images to be display on WebOrder's front facing screen.
              items:
                $ref: '#/components/schemas/Image'
            ffd_show_item_name_2:
              type: boolean
              description: show name 2
            ffd_messages_line1:
              type: string
              description: >-
                1st line to be diplayed on front facing screen after finishing
                an Order.
            ffd_messages_line2:
              type: string
              description: >-
                2nd line to be diplayed on front facing screen after finishing
                an Order.
            ffd_messages_line3:
              type: string
              description: >-
                3rd line to be diplayed on front facing screen after finishing
                an Order.
            ffd_idle_timeout:
              type: number
            thanks_messages_line1:
              type: string
              description: >-
                1st line to be diplayed on confirm tip screen after adjuting
                tip.
            thanks_messages_line2:
              type: string
              description: >-
                2nd line to be diplayed on confirm tip screen after adjuting
                tip.
            thanks_messages_line3:
              type: string
              description: >-
                3rd line to be diplayed on confirm tip screen after adjuting
                tip.
            thanks_messages_line4:
              type: string
              description: >-
                4th line to be diplayed on confirm tip screen after adjuting
                tip.
            thanks_messages_line5:
              type: string
              description: >-
                5th line to be diplayed on confirm tip screen after adjuting
                tip.
            fixed_delivery_fee:
              type: number
              description: fixed delivery fee to be applied to online orders.
            payment_types:
              type: array
              description: list of custom payment types.
              items:
                $ref: '#/components/schemas/PaymentType'
            default_payment_types:
              type: array
              description: list of default payment types.
              items:
                $ref: '#/components/schemas/PaymentType'
            deliverect_sub_payment_types:
              type: array
              description: list of deliverect sub payment types.
              items:
                $ref: '#/components/schemas/PaymentType'
            delivery_settings:
              $ref: '#/components/schemas/OnlineOrderDeliverySettings'
            web_order_tip_settings:
              $ref: '#/components/schemas/OnlineOrderTipSettings'
            web_order_footnotes_settings:
              $ref: '#/components/schemas/OnlineOrderFootnotesSettings'
            web_order_landing_page_settings:
              $ref: '#/components/schemas/OnlineOrderInfoPageSettings'
            web_order_biz_hour_settings:
              $ref: '#/components/schemas/OrderingBizHourSettings'
            web_order_holiday_settings:
              $ref: '#/components/schemas/OrderingHolidaySettings'
            web_order_locale_settings:
              description: locale settings for online store.
              $ref: '#/components/schemas/OrderingLocale'
            web_order_custom_fee_settings:
              $ref: '#/components/schemas/OnlineOrderCustomFeeSettings'
            web_order_table_ordering_settings:
              $ref: '#/components/schemas/OnlineOrderTableOrderingSettings'
            web_order_view:
              type: boolean
              description: the way web order is displayed.
            kiosk_landing_page_settings:
              $ref: '#/components/schemas/KioskLandingPageSettings'
            kiosk_discount_settings:
              type: array
              description: kiosk discount settings
              items:
                $ref: '#/components/schemas/KioskDiscountSettings'
            kiosk_tip_settings:
              $ref: '#/components/schemas/KioskTipSettings'
            online_order_catering_settings:
              $ref: '#/components/schemas/OnlineOrderCateringSettings'
            status_board_settings:
              $ref: '#/components/schemas/StatusBoardSettings'
            show_name_2:
              type: boolean
              description: show item name 2.
            web_order_show_category_types:
              type: boolean
              description: 'true to enable displaying of category types, false otherwise.'
            web_order_show_special_note:
              description: >-
                true to show special note and special note amount, false
                otherwise.
              type: boolean
            web_order_sync_handle_order:
              description: true to live sync the handle online order process.
              type: boolean
            web_order_version:
              description: the version of the web order.
              type: string
            pause_online_ordering:
              description: >-
                type of online order pause period. Value is stored as a number
                based on the enum defined on the client.
              type: number
            pause_online_ordering_before:
              description: The time is determine to able submit online order
              type: string
            sms_order_received:
              description: 'true to send sms when order received, false otherwise.'
              type: boolean
            sms_order_prepared:
              description: 'true send sms when order prepared, false otherwise.'
              type: boolean
            refund_code:
              type: object
              properties:
                code:
                  type: string
                owner_list:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      information:
                        type: string
            onscreen_signature:
              type: object
              properties:
                tip_1:
                  type: number
                tip_2:
                  type: number
                tip_3:
                  type: number
                no_tip_button:
                  type: boolean
                tip_for_gg:
                  type: array
                  items:
                    type: number
            nicha_auto_trim:
              type: boolean
            nicha_frequency:
              type: string
            nicha_payment_settings:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  type:
                    type: string
                  minimum_cc_charge:
                    type: number
                  surcharge_amt:
                    type: number
                  surcharge_percent:
                    type: number
                  surcharge_name:
                    type: number
                  prompt_surcharge:
                    type: boolean
                  always_prompt_surcharge:
                    type: boolean
            online_channels:
              type: array
              description: online channels (include Deliverect)
              items:
                $ref: '#/components/schemas/OnlineOrderingChannel'
            deliverect_price_type:
              type: string
              description: the price type for Deliverect.
            deliverect_sync_name_type:
              type: string
              description: the name type need to be sync for Deliverect.
            is_ffd_show_email_and_text:
              type: boolean
              description: Show/Hide the email field and the text field
            taxes:
              type: array
              items:
                $ref: '#/components/schemas/SettingTax'
            discounts:
              type: array
              items:
                $ref: '#/components/schemas/SettingDiscount'
            apply_cash_discount:
              type: boolean
            cash_discount_percentage:
              type: number
            void_order_reasons:
              type: array
              items:
                $ref: '#/components/schemas/SettingReason'
            void_transaction_reasons:
              type: array
              items:
                $ref: '#/components/schemas/SettingReason'
            min_cc_charge:
              type: number
            surcharge_amt:
              type: number
            surcharge_percent:
              type: number
            prompt_surcharge:
              type: boolean
            always_prompt_surcharge:
              type: boolean
            show_debit:
              type: boolean
            card_sub_payment_types:
              type: array
              items:
                $ref: '#/components/schemas/PaymentType'
            debit_sub_payment_types:
              type: array
              items:
                $ref: '#/components/schemas/PaymentType'
            cash_sub_payment_types:
              type: array
              items:
                $ref: '#/components/schemas/PaymentType'
            gift_card_sub_payment_types:
              type: array
              items:
                $ref: '#/components/schemas/PaymentType'
            gift_certificate_sub_payment_types:
              type: array
              items:
                $ref: '#/components/schemas/PaymentType'
            r_points_sub_payment_types:
              type: array
              items:
                $ref: '#/components/schemas/PaymentType'
            deposit_sub_payment_types:
              type: array
              items:
                $ref: '#/components/schemas/PaymentType'
            auto_clock_out_time:
              type: string
            work_hours:
              type: string
            timecard_from:
              type: string
            timecard_to:
              type: string
            clockoutreasons:
              type: array
              items:
                $ref: '#/components/schemas/ClockOutReason'
            is_default_tip_1:
              type: boolean
            is_default_tip_2:
              type: boolean
            is_default_tip_3:
              type: boolean
            is_default_no_tip:
              type: boolean
            is_default_custom_tip:
              type: boolean
            no_tip:
              type: boolean
            show_tip_line_only:
              type: boolean
            tip_1:
              type: number
            tip_2:
              type: number
            tip_3:
              type: number
            tip_for_ggs:
              type: array
              items:
                $ref: '#/components/schemas/TipForGG'
            spent_amount:
              type: number
              description: The amount spent.
            earned_points:
              type: number
              description: The points earned.
            show_customer_no:
              type: boolean
              description: Flag to show the customer number field.
            show_r_point:
              type: boolean
              description: Flag to show the R-Point field.
            auto_accumulative:
              type: boolean
              description: Flag for auto accumulative.
            show_add_subtract_buttons:
              type: boolean
              description: Flag to show the add/subtract buttons.
            redeem_amount:
              type: number
              description: The amount to redeem.
            redeem_points:
              type: number
              description: The points to redeem.
            close_batch_email:
              type: boolean
            close_shift_email:
              type: boolean
            close_shift_reports:
              type: array
              items:
                type: string
            available_color:
              type: string
              description: The available color.
            occupied_color:
              type: string
              description: The occupied color.
            selected_color:
              type: string
              description: The selected color.
            checked_color:
              type: string
              description: The checked color.
            must_close_all_tables:
              type: boolean
              description: Flag to close all tables when closing batch.
            check_owner_table:
              type: boolean
              description: Flag to check table ownership.
            auto_sync_at_shift_close:
              type: boolean
              description: Flag for auto sync at shift close.
            start_time:
              type: string
              format: date-time
              description: The start time.
            end_time:
              type: string
              format: date-time
              description: The end time.
            timeout:
              type: integer
              description: The idle timeout.
            auto_ok:
              type: integer
              description: The auto OK time.
            close_shift_time:
              type: string
              format: date-time
              description: The automatic close shift time.
            inactive_close_batch:
              type: string
              format: date-time
              description: The time when batch becomes inactive.
            beep_sound:
              type: boolean
              description: Flag for beep on touch.
            sound:
              type: string
              description: The sound type.
            max_shift_duration:
              type: integer
              description: The maximum shift duration.
            support_1:
              type: string
              description: The first support text.
            support_2:
              type: string
              description: The second support text.
            support_3:
              type: string
              description: The third support text.
            group_gratuities:
              type: array
              items:
                $ref: '#/components/schemas/GroupGratuity'
            auto_trim:
              type: boolean
            frequency:
              type: string
            group_gratuity_tax:
              type: number
            show_send_later:
              type: boolean
            send_prompt:
              type: boolean
            print_void_receipt:
              type: boolean
            live_sync:
              type: boolean
            allow_cashback:
              type: boolean
            maximum_cashback:
              type: number
            is_use_with_credit:
              type: boolean
            is_use_with_debit:
              type: boolean
            quick_options:
              type: array
              items:
                $ref: '#/components/schemas/QuickOption'
            default_tip:
              type: number
              description: The default tip.
    QuickOption:
      type: object
      properties:
        type:
          type: string
        is_default:
          type: boolean
        amount:
          type: boolean
    GroupGratuity:
      type: object
      properties:
        id:
          type: string
        percent:
          type: number
        number:
          type: number
    ClockOutReason:
      type: object
      properties:
        id:
          type: string
        duration:
          type: string
        time:
          type: string
        name:
          type: string
    TipForGG:
      type: object
      properties:
        id:
          type: string
        percent:
          type: number
    SettingTax:
      type: object
      properties:
        id:
          type: string
        created_at:
          type: string
        name:
          type: string
        percent:
          type: number
        default:
          type: boolean
    SettingDiscount:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        percent:
          type: number
        amount:
          type: number
    SettingReason:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        created_at:
          type: string
        type:
          type: string
    StatusBoardSettings:
      type: object
      description: status board settings
      properties:
        apply:
          type: boolean
          description: True if the status board is applied
        areas:
          type: array
          description: List of area that apply status board
          items:
            type: string
    PaymentSettings:
      type: object
      description: payment settings for accepting online payment
      properties:
        payment_type:
          type: string
        auth_net_name:
          type: string
          description: Auth.NET transaction name.
        auth_net_transaction_key:
          type: string
          description: Auth.NET transaction key.
        nmi_name:
          type: string
          description: NMI transaction name.
        nmi_transaction_key:
          type: string
          description: NMI transaction key.
        nmi_apple_wallet_token:
          type: string
          description: NMI Apple Wallet token.
        accept_apple_pay:
          description: Accept Apple Pay
          type: boolean
        sandbox:
          description: Turn on sandbox payment
          type: boolean
    AutoCloseBatchSettings:
      type: object
      description: auto close batch settings
      properties:
        enable:
          type: boolean
          description: true if auto close batch enable.
        start_time:
          type: string
          description: The time start to auto close batch.
        end_time:
          type: string
          description: The time end to auto close batch.
        retry_interval:
          type: number
          description: The number to retry.
    EmailCloseBatchSettings:
      type: object
      description: email close batch settings
      properties:
        enable:
          type: boolean
          description: true if email close batch enable.
        total_report_by_server:
          type: boolean
          description: true if total report by server.
    PaymentType:
      type: object
      description: info about a payment type.
      properties:
        id:
          type: string
        name:
          type: string
          description: name of the payment type.
        sub_payment_types:
          type: array
          description: list of sub payment types.
          items:
            $ref: '#/components/schemas/PaymentType'
    OnlineOrderDeliverySettings:
      type: object
      properties:
        accept_delivery:
          type: boolean
          description: true if this Store is allowing delivery for online orders.
        delay_delivery_time:
          type: number
          description: the time delay that we do auto Move and Send before delivery time.
        delivery_time:
          type: number
          description: the time that we delivery.
        delivery_type:
          type: string
        third_party_delivery_button_link:
          type: string
          description: text of delivery button link.
        third_party_delivery_button_text:
          type: string
          description: text of third party delivery button
        accept_delivery_amount:
          type: number
          description: minimum order amount to accept delivery.
        free_delivery_amount:
          type: number
          description: the minimum order amount to have free delivery.
        maximum_delivery_distance:
          type: number
          description: the maximum distance to accept delivery.
        use_fixed_delivery_fee:
          type: boolean
          description: true if a fixed delivery fee should be applied.
        fixed_delivery_fee:
          type: number
          description: the fixed delivery fee to be applied.
        delivery_from_address:
          description: the address where order got delivered from.
          $ref: '#/components/schemas/Place'
        delivery_fees:
          type: array
          description: list of distance/fee combinations.
          items:
            $ref: '#/components/schemas/DeliveryFee'
        postmates_settings:
          $ref: '#/components/schemas/PostmatesSettings'
        doordash_settings:
          $ref: '#/components/schemas/DoordashSettings'
    PostmatesSettings:
      type: object
      properties:
        customer_id:
          type: string
        authorize_key:
          type: string
    DoordashSettings:
      type: object
      properties:
        is_api_key_production:
          type: boolean
    OnlineOrderTipSettings:
      type: object
      properties:
        enable_tip_guides:
          type: boolean
          description: 'true to enable tip guides, false otherwise.'
        split_tip_for_restaurant_staff:
          type: boolean
        default_tip_for_staff:
          type: number
        default_tip_for_driver:
          type: number
        tip_guides:
          description: the tip guides to be suggested for online ordering.
          type: array
          items:
            type: number
        default_tip_guide:
          type: number
          description: the default selected tip guide index
        note:
          type: string
          description: the note for tip guide
        note_for_online_ordering:
          type: string
    OnlineOrderCateringSettings:
      type: object
      properties:
        enable_online_catering:
          type: boolean
          description: 'true to enable online catering, false otherwise.'
        area:
          type: string
          description: area of online catering
    OnlineOrderFootnotesSettings:
      type: object
      properties:
        enable_footnotes:
          type: boolean
          description: 'true to enable footnotes on weborder, false otherwise.'
        no_plastic_utensils:
          type: boolean
          description: true if no use plastic utensils.
        no_contactless_delivery:
          type: boolean
          description: true if dont use contactless delivery.
        custom_note:
          type: boolean
          description: true to enable custom note
    KioskTipSettings:
      type: object
      properties:
        enable_tip_guides:
          type: boolean
          description: 'true to enable tip guides, false otherwise.'
        tip_guides:
          description: the tip guides to be suggested for online ordering.
          type: array
          items:
            type: number
    KioskDiscountSettings:
      type: object
      properties:
        is_apply:
          type: boolean
          description: true to apply discount
        name_discount:
          type: string
          description: name of discount
        percent:
          type: number
          description: number percentage of discount
    KioskLandingPageSettings:
      type: object
      properties:
        enable_landing_page:
          type: boolean
          description: 'true to enable info page, false otherwise.'
        enable_table_tent_prompt:
          type: boolean
        use_kiosk:
          type: boolean
          description: 'true to display kiosk areas on station, false otherwise.'
        kiosk_view:
          type: boolean
          description: the type that menu kiosk will be displayed .
        special_note:
          type: boolean
          description: 'true to show special note and special note amount, false otherwise.'
        text_line:
          type: boolean
          description: 'true to enable text lines, false otherwise.'
        text_1:
          type: string
          description: Introduction text 1 on Kiosk landing Page
        text_2:
          type: string
          description: Introduction text 2 on Kiosk landing Page
        dine_in_order_button_text:
          type: string
          description: text of delivery button
        to_go_order_button_text:
          type: string
          description: text of pickup button
    OnlineOrderInfoPageSettings:
      type: object
      properties:
        show_store_logo:
          type: boolean
        enable_info_page:
          type: boolean
          description: 'true to enable info page, false otherwise.'
        enable_text_line:
          type: boolean
          description: 'true to enable text line, false otherwise.'
        delivery_button_text:
          type: string
          description: text of delivery button
        pickup_button_text:
          type: string
          description: text of pickup button
        dinein_button_text:
          type: string
          description: text of dinein button
        third_party_delivery_button_link:
          type: string
          description: text of delivery button link
        enable_store_address:
          type: boolean
          description: 'true to enable store address, false otherwise.'
        enable_store_phone:
          type: boolean
          description: 'true to enable store phone, false otherwise.'
        enable_store_email:
          type: boolean
          description: 'true to enable store email, false otherwise.'
        store_email:
          type: string
          description: to be displayed as email of store.
        enable_payment_icon:
          type: boolean
          description: 'true to enable payment icon, false otherwise.'
        intro_text_1:
          type: string
          description: to be displayed as introduction to store.
        intro_text_2:
          type: string
          description: to be displayed as introduction to store.
    OrderingBizHourSettings:
      type: object
      properties:
        enable_biz_hours:
          type: boolean
          description: 'true to enable biz hours, false otherwise.'
        biz_hours:
          description: list of from/to working hours in weeks.
          type: array
          items:
            $ref: '#/components/schemas/OrderingBizHour'
    OrderingBizHour:
      type: object
      properties:
        day_of_week:
          type: number
          description: date of week in number.
        is_working:
          type: boolean
          description: 'true if it this is a working day, false otherwise.'
        from_1:
          type: string
          description: first period start time.
        to_1:
          type: string
          description: first period end time.
        from_2:
          type: string
          description: second period start time.
        to_2:
          type: string
          description: second period end time.
    OrderingHolidaySettings:
      type: object
      description: holidays and special days setting for online ordering.
      properties:
        holidays:
          type: array
          description: list of holidays and special days for this store
          items:
            $ref: '#/components/schemas/OrderingHoliday'
    OnlineOrderingChannel:
      type: object
      description: channel for online ordering (include Deliverect).
      properties:
        name:
          type: string
          description: name of channel
        channel_link:
          type: string
          description: channel link
        pickup_display_name:
          type: string
          description: pick-up display name
        delivery_display_name:
          type: string
          description: delivery display name
        payment_type:
          type: string
          description: payment type
    OrderingHoliday:
      allOf:
        - $ref: '#/components/schemas/ModelRef'
        - type: object
          description: holiday or special day for ordering.
          properties:
            name:
              type: string
              description: the name of this holiday.
            date:
              type: string
              description: the date (YYYY-MM-DD) of this holiday.
            displayDate:
              type: string
              description: the display date for Web Admin of this holiday.
            is_working:
              type: boolean
              description: True if the store is still working in this holiday.
            from_1:
              type: string
              description: first period start time.
            to_1:
              type: string
              description: first period end time.
            from_2:
              type: string
              description: second period start time.
            to_2:
              type: string
              description: second period end time.
    OrderingLocale:
      type: object
      properties:
        locale:
          type: string
          description: 'standard locale-string, ex. en-US, fi-FI, vi-VN'
        currency:
          type: string
          description: 'standard currency, ex. USD, EUR, VND'
    OnlineOrderTableOrderingSettings:
      type: object
      properties:
        show_customer_info:
          type: boolean
          description: 'true to show customer info, false otherwise.'
        show_tip:
          type: boolean
          description: 'true to show tip, false otherwise.'
        show_payment_info:
          type: boolean
          description: 'true to show payment info, false otherwise.'
        auto_send_to_kitchen:
          type: boolean
          description: 'true to auto send to kitchen, false otherwise.'
    OnlineOrderCustomFeeSettings:
      type: object
      properties:
        name:
          type: string
        amount:
          type: number
        custom_fee_percent:
          $ref: '#/components/schemas/CustomFeePercent'
    CustomFeePercent:
      type: object
      properties:
        name:
          type: string
        percent:
          type: number
          description: the percent to be applied to the subtotal amount.
    DeliveryFee:
      type: object
      description: combination of minimum distance and fee to apply.
      properties:
        distance:
          type: number
          description: the mininum distance (in miles) for the fee to be applied.
        fee:
          type: number
          description: the delivery fee amount to be applied.
    Printer:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            location:
              type: string
              description: This is location that printer belong to
            printer_model:
              type: string
              description: >-
                This is model of printers. Currently, we have StarTSP100,
                StartSP700 and BrotherQL820
            printer_type:
              type: string
              description: This is printer type.
            mac_address:
              type: string
            ip_address:
              type: string
            backup_printer:
              type: string
              description: >-
                If the printer is not connected or fail printing, kitchen
                receipt will be printed on Backup printer.
            enabled:
              type: boolean
              description: True if this printer still be connected.
            has_buzzer:
              type: boolean
              description: True if this printer has buzzer.
    Screen:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            screen_type:
              type: string
              description: Type of the screen
            top_image:
              description: the image to be displayed on top of the screen.
              $ref: '#/components/schemas/Image'
            top_image_height:
              type: number
              description: height of the top image.
            bottom_image:
              description: the image to be displayed on bottom of the screen.
              $ref: '#/components/schemas/Image'
            bottom_image_height:
              type: number
              description: height of the top image.
            menu:
              $ref: '#/components/schemas/ScreenMenuSettings'
    ScreenMenuSettings:
      type: object
      description: the menu settings of this screen
      properties:
        background:
          type: string
          description: TV signage background color.
        category_color:
          type: string
          description: TV signage category text color.
        category_font_size:
          type: number
          description: TV signage category text size.
        item_color:
          type: string
          description: TV signage item text color.
        item_font_size:
          type: number
          description: TV signage item text size.
        description_color:
          type: string
          description: TV signage item's description text color.
        description_font_size:
          type: number
          description: TV signage item's description text size.
        dense:
          type: boolean
          description: true to cramp items together.
        columns_count:
          type: number
          description: TV signage columns count.
        columns:
          type: array
          description: 'the list of columns in this screen, should contain 1 to 3 elements.'
          items:
            $ref: '#/components/schemas/ScreenCol'
        show_name_2:
          type: boolean
          description: true to show name 2 of item
    ScreenCol:
      type: object
      description: represent a single column inside a screen
      properties:
        cells:
          type: array
          description: the list of cells in this column
          items:
            $ref: '#/components/schemas/ScreenCell'
        list_thumbnail:
          type: string
          description: set list or thumbnail for columns
    ScreenCell:
      type: object
      description: represent a single cell inside a menu column
      properties:
        id:
          type: string
          description: >-
            the id of the cell, in fact this is the id of the source object and
            thus is not unique
        type:
          type: string
          description: >-
            the type of this cell, possible values are category, image,
            slideshow
        name:
          type: string
          description: the name of the category (applied to category cell only)
        from:
          type: number
          description: >-
            the start index of item to be displayed (applied to category cell
            only)
        to:
          type: number
          description: >-
            the end index of item to be displayed (applied to category cell
            only)
        list_thumbnail:
          type: string
          description: set list or thumbnail for screencell
        height:
          type: number
          description: >-
            the height of this cell (applied to slideshow cell and status board
            cell)
        is_full_height:
          type: boolean
          description: >-
            True if this cell is full height in the screen (applied to status
            board cell only)
        font_size:
          type: number
          description: >-
            the font size of content of this cell (applied to status board cell
            only)
        images:
          type: array
          description: the list of slides to be displayed  (applied to slideshow cell only)
          items:
            $ref: '#/components/schemas/Image'
        show_name_2:
          type: boolean
          description: true to show name 2 of item
        show_on_tv:
          type: boolean
          description: true to show cell on tv
    Tax:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            percent:
              type: number
              description: The tax percent to be applied to
    OnlineUser:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            customer_name:
              type: string
            customer_email:
              type: string
            customer_phone:
              type: string
            customer_address:
              type: string
            password:
              type: string
            api_message:
              type: string
            place_id:
              type: string
    OnlineOrder:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          required:
            - items
          properties:
            order_type:
              type: string
              description: 'type of this order, possible values are pickup and delivery.'
            customer_name:
              type: string
            unique_id:
              type: string
            customer_first_name:
              type: string
            customer_last_name:
              type: string
            customer_email:
              type: string
            customer_phone:
              type: string
            customer_place:
              description: delivery address in Google Map's format.
              $ref: '#/components/schemas/Place'
            customer_place_unit:
              type: string
              description: the apt# or suite# of the place.
            customer_address:
              type: string
            customer_state:
              type: string
            customer_city:
              type: string
            customer_zip:
              type: string
            billing_place:
              description: billing address in Google Map's format.
              $ref: '#/components/schemas/Place'
            billing_phone:
              type: string
            billing_address:
              type: string
            billing_state:
              type: string
            billing_city:
              type: string
            billing_zip:
              type: string
            billing_street:
              type: string
            time:
              type: string
              description: delivery or pickup time in string format
            timeIsoFormat:
              type: string
              description: delivery or pickup time in ISO string format
            is_asap:
              type: boolean
              description: time order type asap or
            subtotal:
              type: number
              description: the subtotal calculated from order items.
            tax_amount:
              type: number
              description: the tax amount calculated from subtotal and tax.
            delivery_distance:
              type: number
              description: the delivery fee amount.
            delivery_fee_amount:
              type: number
              description: the delivery fee amount.
            total:
              type: number
              description: the total of order.
            tip:
              type: number
              description: the tip amount of order.
            no_plastic_utensils:
              type: boolean
              description: no use of plastic utensils.
            contactless_delivery:
              type: boolean
              description: contactless when delivery
            custom_note:
              type: string
              description: custom note from customer.
            quantity:
              type: number
              description: the total items inside this order.
            card:
              $ref: '#/components/schemas/CreditCard'
            items:
              type: array
              items:
                $ref: '#/components/schemas/OrderItem'
            tax:
              $ref: '#/components/schemas/Tax'
            custom_fee:
              $ref: '#/components/schemas/OnlineOrderCustomFeeSettings'
            submit_count:
              type: number
              description: number of time this order has been submitted.
            discount_amount:
              type: number
              description: the discount amount calculated by subtotal and promo code.
            discount:
              $ref: '#/components/schema/PromoCode'
            ref_num:
              type: string
              description: reference number for online order
            quote_id:
              type: string
              description: The delivery quote's ID for Postmates delivery type.
            delivery_quote_duration:
              type: number
              description: >-
                The estimated delivery duration of the delivery quote of
                Postmates.
            is_catering:
              type: boolean
              description: Order is catering will be true. Otherwise is false
            tip_for_driver:
              type: number
            tip_for_restaurant_staff:
              type: number
            default_tip_for_driver:
              type: number
            delivery_type:
              type: string
            table_tent:
              type: number
            error:
              type: object
              properties:
                message:
                  type: string
                stack:
                  type: string
            table:
              type: string
            is_payment_by_apple_pay:
              type: boolean
            status:
              type: string
            payment_request:
              type: object
              properties:
                id:
                  type: string
                expires_at_utc:
                  type: string
                is_paying:
                  type: boolean
            deliverect:
              type: object
              properties:
                _id:
                  type: string
                channelId:
                  type: integer
                channelLink:
                  type: string
                channelName:
                  type: string
                channelOrderDisplayId:
                  type: string
                channelOrderId:
                  type: string
                location:
                  type: string
    CreditCard:
      type: object
      description: the payment card used for paying online order
      properties:
        name:
          type: string
          description: card holder name.
        cvc:
          type: string
          description: card code.
        number:
          type: string
          description: card number (no space).
        expiry:
          type: string
          description: card expiration in MMYY format.
    OrderItem:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          description: a single order item
          required:
            - modifiers
          properties:
            itemid:
              type: string
              description: id of the item in which this order item is created from.
            categoryid:
              type: string
              description: id of the category in which this order item is created from.
            price:
              type: number
              description: the price of this order item taken from original item.
            count:
              type: number
              description: the quantity of this order item.
            subtotal:
              type: number
              description: this order item subtotal.
            note:
              type: string
              description: special note for the item.
            price_note:
              type: number
              description: special price_note for the item.
            image_url:
              type: string
              description: url to the original item image.
            modifiers:
              type: array
              description: modifier for the items.
              items:
                $ref: '#/components/schemas/OrderModifier'
            non_taxable:
              type: boolean
              description: True if this item is non-taxable
            IsPromotion:
              type: boolean
              description: True if this item is promotion item
            promotion_id:
              type: string
              description: The ID of the promotion that is applied for this item.
            promotion_name:
              type: string
              description: The name of the promotion that is applied for this item.
            promotion_price:
              type: number
              description: The price of the promotion that is applied for this item.
            gift_card:
              type: boolean
              description: true if this item belong to a gift card category.
            gift_certificate:
              type: boolean
              description: true if this  belong to a gift gift certificate category.
            item_note:
              type: string
              description: Note from store.
    OrderModifier:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          description: modifier detail for an order item.
          required:
            - options
          properties:
            options:
              type: array
              description: the options of this modifier
              items:
                $ref: '#/components/schemas/OrderOption'
            prefix:
              type: string
            sameline:
              type: boolean
    OrderOption:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          description: option for a order modifier.
          properties:
            price:
              type: number
              description: the price of this option taken from original option.
            count:
              type: number
              description: the number of this option that is applied.
            subtotal:
              type: number
              description: this order option subtotal.
            suboptions:
              type: array
              description: this order option sub-options.
              items:
                $ref: '#/components/schemas/OrderOption'
            required_level:
              type: string
              description: required level for sub modifier.
    OrderingBaseModel:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: id of the ordering object.
        name:
          type: string
          description: name of the ordering object.
        name2:
          type: string
          description: extra name (normally in different language) of the ordering object.
    BaseOrderingStore:
      type: object
      properties:
        id:
          type: string
          description: id of the store.
        name:
          type: string
          description: name of the store.
        image_url:
          type: string
        address:
          type: string
          description: address of the store.
        email:
          type: string
          description: email of the store.
        phone:
          type: string
          description: phone of the store.
        description:
          type: string
          description: description of the store.
        accept_order:
          type: boolean
          description: >-
            true if this store accept order if it is false, then all the Submit
            Order must be disabled.
        default_view:
          type: boolean
          description: >-
            true if the default view is thumbnail mode. If false, it is list
            mode.
        tax:
          $ref: '#/components/schemas/Tax'
        categories:
          type: array
          description: all categories available for ordering.
          items:
            $ref: '#/components/schemas/OrderingCategory'
        modifiers:
          type: array
          description: all modifiers available for selecting.
          items:
            $ref: '#/components/schemas/OrderingModifier'
        promotions:
          type: array
          description: all promotions available when ordering.
          items:
            $ref: '#/components/schemas/Promotion'
        biz_hours:
          type: array
          description: list of from/to working hours in weeks
          items:
            $ref: '#/components/schemas/OrderingBizHour'
        holidays:
          type: array
          description: list of holidays in year
          items:
            $ref: '#/components/schemas/OrderingHoliday'
        locale:
          description: locale related settings.
          $ref: '#/components/schemas/OrderingLocale'
        show_category_types:
          description: 'true to show category types, false otherwise.'
          type: boolean
        all_category_types:
          description: all category types of store that user has arranged the order.
          type: array
          items:
            type: string
        show_special_note:
          description: 'true to show special note and special note amount, false otherwise.'
          type: boolean
        auto_move_send:
          description: true if auto move/send is enabled.
          type: boolean
        delay_pickup_time:
          description: the auto move/send time in minutes for pickup order.
          type: number
        delay_dinein_time:
          description: the auto move/send time in minutes for delay dinein time.
          type: number
        delay_delivery_time:
          description: the auto move/send time in minutes for delivery order.
          type: number
        delivery_time:
          type: number
          description: the time that we delivery.
        timezone:
          type: string
          description: timezone of the store.
    OnlineOrderingStore:
      allOf:
        - $ref: '#/components/schemas/BaseOrderingStore'
        - type: object
          properties:
            timezone:
              type: string
            accept_delivery:
              type: boolean
              description: true if this store accept delivery.
            is_show_auth:
              type: boolean
            accept_dinein:
              type: boolean
              description: true if this store accept dinein.
            accept_pickup:
              type: boolean
              description: true if this store accept pickup.
            accept_online_payment:
              type: boolean
              description: >-
                true if this store accept online payment, false then only
                in-store payment is accepted.
            show_name_2:
              type: boolean
              description: show name 2 of item on order.
            confirm_message:
              type: string
              description: to be displayed before submitting order.
            bill_minimum_amount:
              type: number
              description: given Bill minimum amount to calculate delivery fee.
            bill_maximum_amount:
              type: number
              description: given Bill maximum amount to calculate delivery fee.
            maximum_distance:
              type: number
              description: given maximum distance to calculate delivery fee.
            delivery_settings:
              description: delivery related settings.
              $ref: '#/components/schemas/OnlineOrderDeliverySettings'
            tip_settings:
              description: tip related settings.
              $ref: '#/components/schemas/OnlineOrderTipSettings'
            footnotes_settings:
              description: relates footnotes settings.
              $ref: '#/components/schemas/OnlineOrderFootnotesSettings'
            custom_fee_settings:
              description: custom fee related settings.
              $ref: '#/components/schema/OnlineOrderCustomFeeSettings'
            info_page_settings:
              description: new landing page settings.
              $ref: '#/components/schemas/OnlineOrderInfoPageSettings'
            online_order_catering_settings:
              description: online order catering settings.
              $ref: '#/components/schemas/OnlineOrderCateringSettings'
            kiosk_landing_page_settings:
              description: kiosk landing page setting.
              $ref: '#/components/schemas/KioskLandingPageSettings'
            sync_handle_order:
              description: true to live sync the handle online order process.
              type: boolean
            pause_online_ordering:
              description: >-
                type of online order pause period. Value is stored as a number
                based on the enum defined on the client.
              type: number
            is_sandbox:
              description: Is Sandbox payment
              type: boolean
            apple_wallet_token:
              description: Apple Wallet Token
              type: string
            accept_apple_pay:
              description: Accept Apple Pay
              type: boolean
            pause_online_ordering_before:
              type: string
            version:
              type: string
            category_types:
              type: array
              items:
                type: string
    KioskOrderingStore:
      allOf:
        - $ref: '#/components/schemas/BaseOrderingStore'
        - type: object
          properties:
            area_settings:
              type: object
              properties:
                is_apply_tax_kiosk_for_here:
                  type: boolean
                is_apply_tax_kiosk_for_togo:
                  type: boolean
            main:
              type: string
              description: the in store Main station's IP Address
            accept_dinein:
              type: boolean
              description: true if this store accept dinein.
            accept_takeaway:
              type: boolean
              description: true if this store accept takeaway.
            ccdevice:
              type: string
              description: the PAX device's ID that is bound to this kiosk
            printer:
              type: string
              description: the Printer's ID that is bound to this kiosk
            kiosk_landing_page_settings:
              description: kiosk landing page settings.
              $ref: '#/components/schemas/KioskLandingPageSettings'
            kiosk_discount_settings:
              type: array
              description: kiosk discount settings
              items:
                $ref: '#/components/schemas/KioskDiscountSettings'
            kiosk_tip_settings:
              description: kiosk tip settings.
              $ref: '#/components/schemas/KioskTipSettings'
            promo_codes:
              type: array
              description: the promo codes that apply for kiosk
              items:
                $ref: '#/components/schemas/PromoCode'
    OrderingCategory:
      allOf:
        - $ref: '#/components/schemas/OrderingBaseModel'
        - type: object
          properties:
            items:
              type: array
              description: list of items belong to this category.
              items:
                $ref: '#/components/schemas/OrderingItem'
            category_types:
              type: array
              description: list of types this category belongs to.
              items:
                type: string
            category_buckets:
              type: array
              description: list of bucket this category belongs to.
              items:
                type: string
            schedules:
              $ref: '#/components/schemas/CategorySchedules'
            gift_card:
              type: boolean
              description: true if this category is gift card.
            gift_certificate:
              type: boolean
              description: true if this category is gift certificate.
    OrderingItem:
      allOf:
        - $ref: '#/components/schemas/OrderingBaseModel'
        - type: object
          properties:
            description:
              type: string
              description: short description for this item
            price:
              type: number
              description: unit price for this item
            imageURL:
              type: string
              description: the full URL of the item's image
            out_of_stock:
              type: string
              description: the out of stock string
            modifiers:
              type: array
              description: the list of modifiers that can be applied to this item
              items:
                description: the extra information about binding the modifier to this item
                type: object
                properties:
                  id:
                    type: string
                    description: the modifier id
                  selection_level:
                    type: string
                    description: >-
                      the selection level to apply on this modifier for this
                      item
                  options:
                    type: array
                    items:
                      type: string
                    description: >-
                      the list of options ids that can be selected for this
                      modifier on this item
                  sameline:
                    type: boolean
                    description: is same line of modifiers
            non_taxable:
              type: boolean
              description: True if this item is non-taxable
            note:
              type: string
              description: Note to show on menu
    OrderingModifier:
      allOf:
        - $ref: '#/components/schemas/OrderingBaseModel'
        - type: object
          properties:
            selection_level:
              type: string
              description: the selection level of this modifier onto the storing item
            options:
              type: array
              description: the available options of this modifier onto the storing item
              items:
                $ref: '#/components/schemas/OrderingOption'
            prefix:
              type: string
            online_ordering:
              type: boolean
              description: True if this modifier will be shown in online ordering
            sameline:
              type: boolean
    OrderingOption:
      allOf:
        - $ref: '#/components/schemas/OrderingBaseModel'
        - type: object
          properties:
            price:
              type: number
            suboptions:
              type: array
              description: this option sub-options
              items:
                $ref: '#/components/schemas/OrderingOption'
            out_of_stock:
              type: string
              description: the out of stock type of this option (today or indefinitely).
            required_level:
              type: string
              description: required level for sub modifier.
    DSScreen:
      type: object
      description: Wrap all necessary information for displaying of a screen
      properties:
        id:
          type: string
          description: id of this screen
        name:
          type: string
          description: nameof this screen
        background:
          type: string
          description: the background of the screen
        dense:
          type: boolean
          description: true to have no spacing between items
        category_font_size:
          type: number
          description: the font size used to display category
        category_color:
          type: string
          description: the color used to display category
        item_font_size:
          type: number
          description: the font size used to display item
        item_color:
          type: string
          description: the color used to display item
        description_font_size:
          type: number
          description: the font size used to display item's description
        description_color:
          type: string
          description: the color used to display item's description
        top_image_url:
          type: string
          description: the image to be displayed as top image
        top_image_height:
          type: number
          description: the height of top image banner
        bottom_image_url:
          type: string
          description: the image to be displayed as bottom image
        bottom_image_height:
          type: number
          description: the height of bottom image banner
        show_name_2:
          type: boolean
          description: true to show name 2 of item
        columns:
          type: array
          description: >-
            The list of columns to be displayed (should have 1-3 elements only).
            This property only makes sense when the screen type is menu.
          items:
            $ref: '#/components/schemas/DSScreenColumn'
    DSScreenColumn:
      type: object
      description: a column inside a digital signage screen
      properties:
        cells:
          type: array
          description: The list of categories/slides to be displayed on this column
          items:
            oneOf:
              - $ref: '#/components/schemas/DSScreenMenuCell'
              - $ref: '#/components/schemas/DSScreenSlideshowCell'
        list_thumbnail:
          type: string
          description: set list or thumbnail for columns
    DSScreenCell:
      type: object
      description: a cell inside a digital signage screen
      required:
        - type
      discriminator:
        propertyName: type
      properties:
        type:
          type: string
          description: 'The type of of object, currently support category and slideshow.'
        show_on_tv:
          type: boolean
          description: show on tv
    DSScreenMenuCell:
      allOf:
        - $ref: '#/components/schemas/DSScreenCell'
        - properties:
            name:
              type: string
              description: The category name
            items:
              type: array
              description: The list of items in this category
              items:
                $ref: '#/components/schemas/DSScreenMenuCellItem'
            list_thumbnail:
              type: string
              description: set list or thumbnail for screencell
            show_name_2:
              type: boolean
              description: true to show name 2 of item
    DSScreenMenuCellItem:
      type: object
      description: a single menu item to be displayed in digital signage.
      properties:
        name:
          type: string
          description: The item name
        name2:
          type: string
          description: The item name2
        description:
          type: string
          description: The item description
        price:
          type: number
          description: The item price
        imageURL:
          type: string
          description: the full URL of the item's image
        show_hide_on_tv:
          type: boolean
          description: true to show item on tv
    DSScreenSlideshowCell:
      allOf:
        - $ref: '#/components/schemas/DSScreenCell'
        - description: a single slideshow to be displayed.
          properties:
            fullscreen:
              type: boolean
              description: fullscreen or not fullscreen
            height:
              type: number
              description: heigh of the cell
            images:
              type: array
              items:
                type: string
                description: url to each image
    DSScreenStatusBoardCell:
      allOf:
        - $ref: '#/components/schemas/DSScreenCell'
        - description: a single status board to be displayed.
          properties:
            is_full_height:
              type: boolean
              description: True if this status board is full height
            height:
              type: number
              description: height of the cell
            font_size:
              type: number
              description: content font size of the cell
    FFDSettings:
      type: object
      description: FFD settings
      properties:
        displaying_time:
          type: number
          description: the duration to keep 1 slide on screen
        images:
          type: array
          items:
            type: string
            description: image url
    Place:
      type: object
      description: a google map's Place
      properties:
        description:
          type: string
          description: the full detail of the Place
        place_id:
          type: string
          description: google map's place id
        city:
          type: string
        state:
          type: string
        street:
          type: string
        zip_code:
          type: string
    ShopItem:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          required:
            - point
          properties:
            in_store:
              type: boolean
            image:
              $ref: '#/components/schemas/Image'
            point:
              type: number
            image_url:
              type: string
              description: Url to the original item image.
    ShopInfo:
      type: object
      description: Shop information
      required:
        - storeBalance
        - items
      properties:
        storeBalance:
          type: number
          description: The K-Rewards Points that the store has
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrderingItem'
    ShopOrder:
      type: object
      description: Shop order
      required:
        - id
      properties:
        id:
          type: string
          description: The ID of this shop order
        status:
          type: string
        note:
          type: string
        submit_count:
          type: number
          description: number of time this order has been submitted.
        storeid:
          type: string
          description: The ID of the store that this order belong to.
        storeName:
          type: string
          description: The name of the store that this order belong to.
        totalPoints:
          type: number
          description: Total points of all order items.
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrderItem'
    PromoCode:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          required:
            - percent
          properties:
            percent:
              type: number
            apply_to_web_order:
              type: boolean
            apply_to_kiosk:
              type: boolean
            instruction_line_1:
              type: string
            instruction_line_2:
              type: string
            instruction_line_3:
              type: string
            show_on_web_order:
              type: boolean
    Gallery:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          required:
            - images
          properties:
            images:
              type: array
              description: list of images for each album.
              items:
                $ref: '#/components/schemas/Image'
    RefundCode:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            code:
              type: string
            owner_list:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  information:
                    type: string
    KitchenDisplay:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            enabled:
              type: boolean
              description: True if this kitchen display is still connected.
            local:
              type: string
              description: The location where this kitchen display is placed.
            is_ready_runner_view:
              type: boolean
            is_done_view:
              type: boolean
    Promotion:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            promotion_type:
              type: string
              description: The type of this promotion.
            apply:
              type: boolean
              description: True if this promotion is applied for POS.
            apply_to_web_order:
              type: boolean
              description: True if this promotion is applied for online ordering.
            buy_quantity:
              type: number
              description: >-
                The quantity of items that customers need to buy to use this
                promotion.
            buy_items:
              type: array
              items:
                $ref: '#/components/schemas/Item'
              description: >-
                List items, categories that customers need to buy to use this
                promotion.
            get_quantity:
              type: number
              description: >-
                The quantity of items that customers will receive when using
                this promotion.
            get_items:
              type: array
              items:
                $ref: '#/components/schemas/Item'
              description: >-
                List items, categories that customers will receive when using
                this promotion.
            promotion_percent:
              type: number
              description: >-
                The discount percent of the item when customers use this
                promotion.
            promotion_amount:
              type: number
              description: The discount amount of this promotion in the order item.
            note:
              type: string
            applied_count:
              type: number
              description: >-
                The number of times this promotion is applied in online
                ordering.
            can_apply_count:
              type: number
              description: >-
                The number of times this promotion can be applied in online
                ordering base on the order.
    DeliveryQuote:
      type: object
      description: The delivery quote for a pickup order
      properties:
        kind:
          type: string
        id:
          type: string
        created:
          type: string
        expires:
          type: string
        fee:
          type: number
        currency:
          type: string
        dropoff_eta:
          type: string
        duration:
          type: number
    KitchenReceiptTemplate:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            storeid:
              type: string
            order_type:
              type: string
            print_name:
              type: boolean
            print_date:
              type: boolean
            print_time:
              type: boolean
            print_table_no:
              type: boolean
            print_no_of_guest:
              type: boolean
            print_server_name:
              type: boolean
            print_transaction:
              type: boolean
            print_items_name_1:
              type: boolean
            print_items_name_2:
              type: boolean
            print_modifier:
              type: boolean
            print_note:
              type: boolean
            print_table_name:
              type: boolean
            print_grouping:
              type: boolean
            print_line_separator:
              type: boolean
            single_quantity:
              type: boolean
            hide_quantity_1:
              type: boolean
            is_default:
              type: boolean
            customer_info:
              type: boolean
            customer_info_table_order:
              type: boolean
            total_item_count:
              type: boolean
    PrinterReceipt:
      allOf:
        - $ref: '#/components/schemas/ModelRef'
        - type: object
          properties:
            receipt_id:
              type: string
              description: The kitchen receipt template when using the printer
    Order:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            order_no:
              type: number
            order_type:
              type: string
            instore_status:
              type: string
    TransactionDetail:
      type: object
      properties:
        transaction:
          $ref: '#/components/schemas/Transaction'
        bill:
          $ref: '#/components/schemas/BillReport'
        order:
          $ref: '#/components/schemas/Order'
    Transaction:
      type: object
      properties:
        approved_amount:
          type: number
        area:
          type: string
        area_name:
          type: string
        channels:
          type: array
          items:
            type: string
        id:
          type: string
        status:
          type: string
        trans_type:
          type: string
    BillReport:
      type: object
      properties:
        custom_fee:
          type: number
        custom_service_fee_amount:
          type: number
        delivery_fee_amount:
          type: number
        discount:
          type: object
          $ref: '#/components/schemas/DiscountReport'
    DiscountReport:
      type: object
      properties:
        adjusted_amount:
          type: number
        adjusted_percent:
          type: number
        amount:
          type: number
        created_at:
          type: string
        id:
          type: string
        name:
          type: string
        percent:
          type: number
    BillingSubscription:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              billingType:
                type: string
              amount:
                type: number
              date:
                type: string
              storeid:
                type: string
              storeName:
                type: string
              description:
                type: string
              transformedDescription:
                type: string
              ofOrders:
                type: number
              rate:
                type: number
              fee:
                type: number
              flatFee:
                type: number
              tip:
                type: number
              tipForStaff:
                type: number
              tipForDriver:
                type: number
              total:
                type: number
              secondFee:
                type: number
              percent:
                type: number
              subtotal:
                type: number
        total:
          type: number
    SerializedQueryResult:
      type: object
      description: Result of query after serialized
      required:
        - data
        - summary
      properties:
        data:
          type: array
          items:
            type: object
        summary:
          $ref: '#/components/schemas/QuerySummary'
    DetailReportQueryResult:
      allOf:
        - $ref: '#/components/schemas/SerializedQueryResult'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/DetailReportRow'
            summary:
              $ref: '#/components/schemas/QuerySummary'
            areas:
              type: array
              items:
                $ref: '#/components/schemas/NameValueRow'
            categories:
              type: array
              items:
                $ref: '#/components/schemas/NameValueRow'
            shifts:
              type: array
              items:
                $ref: '#/components/schemas/NameValueRow'
            employees:
              type: array
              items:
                $ref: '#/components/schemas/NameValueRow'
    DetailReportRow:
      allOf:
        - $ref: '#/components/schemas/ReportRow'
        - type: object
          description: The row contains server report
          properties:
            area:
              type: string
              description: The area of detail
            area_name:
              type: string
              description: The area_name of detail
            card_num:
              type: string
              description: The card_num of detail
            card_type:
              type: string
              description: The card_type of detail
            customer:
              type: string
              description: The customer of detail
            customer_address:
              type: string
              description: The customer_address of detail
            customer_email:
              type: string
              description: The customer_email of detail
            customer_name:
              type: string
              description: The customer_name of detail
            customer_phone:
              type: string
              description: The customer_phone of detail
            employee:
              type: string
              description: The employee of detail
            id:
              type: string
              description: The id of detail
            order_no:
              type: number
              description: The order_no of detail
            status:
              type: string
              description: The status of detail
            tip:
              type: number
              description: The tip of detail
            trans_num:
              type: number
              description: The trans_num of detail
            trans_type:
              type: string
              description: The trans_type of detail
    TotalReportQueryResult:
      allOf:
        - $ref: '#/components/schemas/SerializedQueryResult'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/TotalReportRow'
            summary:
              $ref: '#/components/schemas/QuerySummary'
            categories:
              type: array
              items:
                $ref: '#/components/schemas/NameValueRow'
            shifts:
              type: array
              items:
                $ref: '#/components/schemas/NameValueRow'
    TotalReportRow:
      allOf:
        - $ref: '#/components/schemas/ReportRow'
        - type: object
          description: The row contains server report
          required:
            - shift
          properties:
            card_type:
              type: string
              description: The card_type of total
            trans_type:
              type: string
              description: The card_type of total
            summary:
              type: boolean
              description: The card_type of total
            shift:
              type: number
              description: The shift of total
            count:
              type: number
              description: The shift of total
            name:
              type: string
              description: The name of total
            area_name:
              type: string
              description: The name of total
            tip:
              type: number
              description: The tip of total
            total:
              type: number
              description: The total of total
    ServerReportQueryResult:
      allOf:
        - $ref: '#/components/schemas/SerializedQueryResult'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/ServerReportRow'
            summary:
              $ref: '#/components/schemas/SummaryServerReport'
            shifts:
              type: array
              items:
                $ref: '#/components/schemas/NameValueRow'
            employees:
              type: array
              items:
                $ref: '#/components/schemas/NameValueRow'
    ServerReportRow:
      allOf:
        - $ref: '#/components/schemas/ReportRow'
        - type: object
          description: The row contains server report
          required:
            - date
          properties:
            date:
              type: string
              description: The date of server
            shift:
              type: number
              description: The shift of server
            total:
              type: number
              description: The total of server
            tip:
              type: number
              description: The tip of server
            name:
              type: string
              description: The name of server
            opening:
              type: string
              description: The opening_time of server
            closing:
              type: string
              description: The closing_time of server
            persons:
              type: number
              description: The persons of server
    SummaryServerReport:
      allOf:
        - $ref: '#/components/schemas/QuerySummary'
        - type: object
          description: The summary of daily report
          properties:
            shift:
              type: number
              description: The shift of server
            name:
              type: string
              description: The shift of server
            opening:
              type: number
              description: The opening of server
            closing:
              type: number
              description: The closing of server
            tip:
              type: number
              description: The tip of server
    InventoryReportQueryResult:
      allOf:
        - $ref: '#/components/schemas/SerializedQueryResult'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/InventoryReportRow'
            summary:
              $ref: '#/components/schemas/SummaryDailyReport'
    InventoryReportRow:
      allOf:
        - $ref: '#/components/schemas/ReportRow'
        - type: object
          description: The row contains inventory report
          properties:
            category_name:
              type: string
              description: The category_name of sale
            categoryid:
              type: string
              description: The categoryid of sale
            item_name:
              type: string
              description: The item_name of sale
            itemid:
              type: string
              description: The itemid of sale
            min_quantity:
              type: number
              description: The min_quantity of sale
            quantity:
              type: number
              description: The quantity of sale
            add_quantity:
              type: number
              description: The add_quantity of sale
    DailyReportQueryResult:
      allOf:
        - $ref: '#/components/schemas/SerializedQueryResult'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/DailyReportRow'
            summary:
              $ref: '#/components/schemas/SummaryDailyReport'
    DailyReportRow:
      allOf:
        - $ref: '#/components/schemas/ReportRow'
        - type: object
          description: The row contains daily report
          required:
            - date
          properties:
            date:
              type: string
              description: The date of sale
            shift:
              type: number
              description: The shift of sale
            service_fee:
              type: number
              description: The service_fee of sale
            service_fee_tax:
              type: number
              description: The service_fee_tax of sale
            tax:
              type: number
              description: The tax of sale
            net:
              type: number
              description: The net of sale
            cc_sales:
              type: number
              description: The cc_sales of sale
            cc_sales_with_tip:
              type: number
              description: The cc_sales_with_tip of sale
            gift_card_sales:
              type: number
              description: The gift_card_sales of sale
            gift_certificate_sales:
              type: number
              description: The gift_certificate_sales of sale
    SummaryDailyReport:
      allOf:
        - $ref: '#/components/schemas/QuerySummary'
        - type: object
          description: The summary of daily report
          properties:
            cc_sales:
              type: number
              description: The cc_sales of sale
            cc_sales_with_tip:
              type: number
              description: The cc_sales_with_tip of sale
            gift_card_sales:
              type: number
              description: The gift_card_sales of sale
            gift_certificate_sales:
              type: number
              description: The gift_certificate_sales of sale
            tax:
              type: number
              description: The tax of sale
            net:
              type: number
              description: The net of sale
    TipReportQueryResult:
      allOf:
        - $ref: '#/components/schemas/SerializedQueryResult'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/TipsByServerReportRow'
            employees:
              type: array
              items:
                $ref: '#/components/schemas/NameValueRow'
    ReportRow:
      type: object
      description: The base model for report row data
      required:
        - total
      properties:
        total:
          type: number
          description: The total value of the report data
        date:
          type: string
          description: The date of the report data
        shift:
          type: number
          description: The shift index of the report data
    TipsByServerReportRow:
      allOf:
        - $ref: '#/components/schemas/ReportRow'
        - type: object
          description: The row contains tip report by employee data
          required:
            - name
            - total
          properties:
            name:
              type: string
              description: The name of the employee of the tip report data
    NameValueRow:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
        value:
          oneOf:
            - type: string
            - type: number
    BillingReport:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            billingType:
              type: string
            description:
              type: string
            amount:
              type: number
            date:
              type: string
            storeid:
              type: string
    RefundCodeForm:
      type: object
      properties:
        code:
          type: string
        owner_list:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              information:
                type: string
    Invoice:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            total:
              type: number
            created_at:
              type: string
            code:
              type: string
            store:
              type: object
              properties:
                address:
                  type: string
                city:
                  type: string
                name:
                  type: string
                zipCode:
                  type: string
            bills:
              type: array
              items:
                type: object
                properties:
                  amount:
                    type: number
                  content:
                    type: string
                  quantity:
                    type: number
                  rate:
                    type: number
                  storeid:
                    type: string
    InvoiceQueryResult:
      allOf:
        - $ref: '#/components/schemas/SerializedQueryResult'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/Invoice'
    OnlineOrderQueryResult:
      allOf:
        - $ref: '#/components/schemas/SerializedQueryResult'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/OnlineOrder'
    FormImportStore:
      allOf:
        - type: object
          properties:
            from_store:
              type: string
            items:
              type: array
              items:
                type: string
    ResultImport:
      allOf:
        - type: object
          properties:
            importid:
              type: string
    Printtpl:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            channels:
              type: array
              items:
                type: string
            gratuity_tips:
              type: array
              items:
                $ref: '#/components/schemas/GratuityTip'
            paper_type:
              type: string
            print_address:
              type: boolean
            print_auth_code:
              type: boolean
            print_card_no:
              type: boolean
            print_card_type:
              type: boolean
            print_cashier_name:
              type: boolean
            print_date_time:
              type: boolean
            print_gift_card:
              type: boolean
            print_gratuity:
              type: boolean
            print_items:
              type: boolean
            print_merchant_id:
              type: boolean
            print_no_of_guest:
              type: boolean
            print_order_no:
              type: boolean
            print_payment_type:
              type: boolean
            print_phone:
              type: boolean
            print_receipt_no:
              type: boolean
            print_server_name:
              type: boolean
            print_signature:
              type: boolean
            print_store_id:
              type: boolean
            print_store_logo:
              type: boolean
            print_store_name:
              type: boolean
            print_table_no:
              type: boolean
            print_terminal_id:
              type: boolean
            print_text_1:
              type: boolean
            print_text_2:
              type: boolean
            print_tip:
              type: boolean
            print_transaction_no:
              type: boolean
            print_waiter_name:
              type: boolean
            text_1:
              type: string
            text_2:
              type: string
            tips:
              type: array
              items:
                $ref: '#/components/schemas/Tip'
    GratuityTip:
      type: object
      properties:
        percent:
          type: number
    Tip:
      type: object
      properties:
        percent:
          type: number
    ItemStockDetail:
      type: object
      properties:
        categoryid:
          type: string
        item_name:
          type: string
        itemid:
          type: string
        quantity:
          type: number
    Partner:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            country:
              type: string
            password:
              type: string
            first_name:
              type: string
            last_name:
              type: string
            company_name:
              type: string
            states:
              type: string
            zip:
              type: string
            address:
              type: string
            phone:
              type: string
            email:
              type: string
            goe_processor_type:
              type: boolean
            partnerid:
              type: number
    SerializedPartner:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            value:
              $ref: '#/components/schemas/Partner'
            merchants:
              type: array
              items:
                $ref: '#/components/schemas/Merchant'
    TransferMerchant:
      type: object
      properties:
        merchant:
          type: string
        partner:
          type: string
    CCPoint:
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            description:
              type: string
            percent:
              type: number
            point:
              type: integer
            subtype:
              type: string
            time:
              type: string
            total:
              type: number
            balance:
              type: integer
    AuthenticateRequest:
      type: object
      properties:
        username:
          type: string
        password:
          type: string
          format: MD5 encrypted
      required:
        - password
        - username
    AuthenticateResponse:
      type: array
      items:
        type: object
        properties:
          token:
            type: string
            description: The access token to be used as Bearer Authentication header
          merchant:
            $ref: '#/components/schemas/Merchant'
          employee:
            $ref: '#/components/schemas/Employee'
        required:
          - token
    ChangePasswordRequest:
      type: object
      properties:
        password:
          type: string
          format: MD5 encrypted
      required:
        - password
paths:
  /info:
    get:
      tags:
        - meta
      description: Return info about the API
      operationId: loadInfo
      responses:
        '200':
          description: list of area
          content:
            application/json:
              schema:
                type: object
                properties:
                  version:
                    type: string
                    description: current version of the API
  '/image/{storeid}':
    post:
      tags:
        - image
      description: upload image for a store
      operationId: uploadImage
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: uploaded image detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Image'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /authenticate:
    post:
      tags:
        - user
      description: Authenticate a user by username and password
      operationId: authenticate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthenticateRequest'
      responses:
        '200':
          description: successfylly authenticate a user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticateResponse'
        '400':
          description: missing either username or password
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: could not authenticate user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/password/{email}':
    post:
      tags:
        - password
      description: Submit password reset for a given email.
      operationId: requestResetPassword
      parameters:
        - name: email
          in: path
          required: true
          description: User email for reseting password
          schema:
            type: string
      responses:
        '200':
          description: successfylly send reset password email to user
        '404':
          description: email could not be found OR account is not active
  '/password/id/{resetPasswordId}':
    get:
      tags:
        - password
      description: >-
        Get a password reset request, this should be called when user click on
        forgot password link from email
      operationId: getResetPasswordRequest
      parameters:
        - name: resetPasswordId
          in: path
          required: true
          description: >-
            Reset password request id, this normally is taken from the reset
            password email
          schema:
            type: string
      responses:
        '200':
          description: 'the request is valid, user can now reset their password'
        '400':
          description: the request is either expired or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticateResponse'
        '404':
          description: the request is not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticateResponse'
    post:
      tags:
        - password
      description: Submit a new password for the corresponding request.
      operationId: setPassword
      parameters:
        - name: resetPasswordId
          in: path
          required: true
          description: >-
            Reset password request id, this normally is taken from the reset
            password email
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangePasswordRequest'
      responses:
        '200':
          description: password is reset successfully
        '400':
          description: >-
            request is either expired, invalid OR password is missing from
            request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticateResponse'
        '404':
          description: the request is not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticateResponse'
  /maccount:
    get:
      tags:
        - merchant
      description: Get Merchant detail information.
      operationId: loadMerchantAccount
      security:
        - bearerAuth: []
      responses:
        '200':
          description: merchant account detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Merchant'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - merchant
      description: Update Merchant detail information.
      operationId: saveMerchantAccount
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Merchant'
      responses:
        '200':
          description: updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    description: the new token recalculated based on changes content
                    type: string
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /merchant:
    post:
      tags:
        - merchant
      description: Update Merchant detail information.
      operationId: saveMerchant
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Merchant'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /store:
    get:
      tags:
        - store
      description: >-
        1. If the current role is Merchant, then return all Stores belong to
        this Merchant.

        2. If the current role is (Super)Admin, then return all Stores from all
        Merchant.


        **Note**&#58; Not yet support for pagination.
      operationId: listStores
      parameters:
        - name: page
          in: query
          description: Page number
          schema:
            type: number
        - name: count
          in: query
          description: Total per page
          schema:
            type: number
        - name: query
          in: query
          description: Filter by name
          schema:
            type: string
      security:
        - bearerAuth: []
      responses:
        '200':
          description: merchant account detail
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Store'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - store
      description: Update/Create Store
      operationId: saveStore
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Store'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/store/{storeid}':
    get:
      tags:
        - store
      description: Return the store with given ID
      operationId: loadStore
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: the store detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Store'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - store
      description: Delete the given store
      operationId: deleteStore
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/store/{storeid}/import':
    post:
      tags:
        - store
      description: Create process import
      operationId: importStore
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FormImportStore'
      responses:
        '200':
          description: response result import store process
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultImport'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/store/{storeid}/logo':
    post:
      tags:
        - store
      description: upload store for a store
      operationId: uploadStoreLogo
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: uploaded image detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Image'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/employee/{storeid}':
    get:
      tags:
        - employee
      description: Return all the employees belong to given store
      operationId: listEmployees
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: status
          in: query
          description: Status
          schema:
            type: string
      responses:
        '200':
          description: list of employee
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Employee'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - employee
      description: Update/Create employee
      operationId: saveEmployee
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Employee'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/employee/{storeid}/{id}':
    get:
      tags:
        - employee
      description: Return the employee with given id
      operationId: loadEmployee
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: employee detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Employee'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - employee
      description: Delete an employee with given id
      operationId: deleteEmployee
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/eaccount/{storeid}':
    get:
      tags:
        - employee
      description: Return the current employee detail
      operationId: getAccount
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: employee detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Employee'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - employee
      description: Return the current employee detail
      operationId: updateAccount
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Employee'
      responses:
        '200':
          description: updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    description: the new token recalculated based on changes content
                    type: string
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/customer/{storeid}':
    get:
      tags:
        - customer
      description: Return all the customers belong to given store
      operationId: listCustomers
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of customer
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - customer
      description: Update/Create customer
      operationId: saveCustomer
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/customer/{storeid}/{id}':
    get:
      tags:
        - customer
      description: Return the customer with given id
      operationId: loadCustomer
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: customer detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Customer'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - customer
      description: Delete a customer with given id
      operationId: deleteCustomer
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/customer/{storeid}/delete':
    post:
      tags:
        - customer
      description: Delete multiple customers
      operationId: deleteMultipleCustomers
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  items:
                    type: string
      responses:
        '204':
          description: Customers are deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/customer/{storeid}/import':
    post:
      tags:
        - customer
      description: Import customers by csv file and return an id to track import process.
      operationId: importCustomer
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: data import start
          content:
            application/json:
              schema:
                type: object
                properties:
                  importid:
                    description: import id to track import process
                    type: string
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/giftcard/{storeid}':
    get:
      tags:
        - giftcard
      description: Return all the giftcards belong to given store
      operationId: listGiftcards
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of giftcard
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Giftcard'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - giftcard
      description: Update/Create giftcard
      operationId: saveGiftcard
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Giftcard'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/giftcard/{storeid}/{id}':
    get:
      tags:
        - giftcard
      description: Return the giftcard with given id
      operationId: loadGiftcard
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: giftcard detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Giftcard'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - giftcard
      description: Delete a giftcard with given id
      operationId: deleteGiftcard
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/giftcard/{storeid}/import':
    post:
      tags:
        - giftcard
      description: Import giftcards by csv file and return an id to track import process.
      operationId: importGiftcard
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: data import start
          content:
            application/json:
              schema:
                type: object
                properties:
                  importid:
                    description: import id to track import process
                    type: string
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/merchant/giftcard/{merchantid}':
    get:
      tags:
        - giftcard
      description: Return all the giftcards belong to given merchant id.
      operationId: listGiftcardsByMerchant
      security:
        - bearerAuth: []
      parameters:
        - name: merchantid
          in: path
          required: true
          description: The merchant id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of giftcard
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Giftcard'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - giftcard
      description: Update/Create giftcard by merhcna
      operationId: saveGiftcardByMerchantId
      security:
        - bearerAuth: []
      parameters:
        - name: merchantid
          in: path
          required: true
          description: The merchant id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Giftcard'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/merchant/giftcard/{merchantid}/{id}':
    get:
      tags:
        - giftcard
      description: Return the giftcard with given id
      operationId: loadGiftcardByMerchant
      security:
        - bearerAuth: []
      parameters:
        - name: merchantid
          in: path
          required: true
          description: The merchant id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: giftcard detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Giftcard'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - giftcard
      description: Delete a giftcard with given id
      operationId: deleteGiftcardByMerchant
      security:
        - bearerAuth: []
      parameters:
        - name: merchantid
          in: path
          required: true
          description: The merchant id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/giftcard/{storeid}/{merchantid}/{id}':
    get:
      tags:
        - giftcard
      description: transfer giftcard to merchant
      operationId: transferGiftcardToMerchant
      security:
        - bearerAuth: []
      parameters:
        - name: merchantid
          in: path
          required: true
          description: The merchant id to get data from
          schema:
            type: string
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: data transfer start
          content:
            application/json:
              schema:
                type: object
                properties:
                  transferid:
                    description: transfer id to track transfer process
                    type: string
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/merchant/giftcard/{merchantid}/import':
    post:
      tags:
        - giftcard
      description: Import giftcards by csv file and return an id to track import process.
      operationId: importGiftcardByMerchant
      security:
        - bearerAuth: []
      parameters:
        - name: merchantid
          in: path
          required: true
          description: The merchant id to get data from
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: data import start
          content:
            application/json:
              schema:
                type: object
                properties:
                  importid:
                    description: import id to track import process
                    type: string
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/gcgroup/{merchantid}':
    get:
      tags:
        - gcgroup
      description: Return all giftcard groups belong to given merchant
      operationId: listGcGroups
      security:
        - bearerAuth: []
      parameters:
        - name: merchantid
          in: path
          required: true
          description: The merchant id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of giftcard groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GcGroup'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - gcgroup
      description: Update/Create giftcard groups
      operationId: saveGcGroup
      security:
        - bearerAuth: []
      parameters:
        - name: merchantid
          in: path
          required: true
          description: The merchant id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GcGroup'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/gcgroup/{merchantid}/{id}':
    get:
      tags:
        - gcgroup
      description: Return the giftcard group with given id
      operationId: loadGcGroup
      security:
        - bearerAuth: []
      parameters:
        - name: merchantid
          in: path
          required: true
          description: The merchant id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: giftcard detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Giftcard'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - gcgroup
      description: Delete a giftcard group with given id
      operationId: deleteGcGroup
      security:
        - bearerAuth: []
      parameters:
        - name: merchantid
          in: path
          required: true
          description: The merchant id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/area/{storeid}':
    get:
      tags:
        - area
      description: Return all the customers belong to given store
      operationId: listAreas
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of area
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Area'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - area
      description: Update/Create area
      operationId: saveArea
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Area'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/area/{storeid}/{id}':
    get:
      tags:
        - area
      description: Return the area with given id
      operationId: loadArea
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: area detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Area'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - area
      description: Delete a area with given id
      operationId: deleteArea
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/area/{id}/export-pdf-table':
    get:
      tags:
        - area
      description: return pdf
      operationId: getAreaTablePdf
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: template as pdf
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/category/{storeid}':
    get:
      tags:
        - category
      description: Return all the customers belong to given store
      operationId: listCategories
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of category
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Category'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - category
      description: Update/Create category
      operationId: saveCategory
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Category'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/category/{storeid}/itemcount':
    get:
      tags:
        - category
      description: 'Return the category with id, name and items count'
      operationId: listWithItemCount
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: all categories with its item count name and id
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CategorySummary'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/category/{storeid}/{id}':
    get:
      tags:
        - category
      description: Return the category with given id
      operationId: loadCategory
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: category detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Category'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - category
      description: Delete a category with given id
      operationId: deleteCategory
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/category/{storeid}/alltypes':
    get:
      tags:
        - category
      description: Return all the category types belong to given store
      operationId: listCategoryTypes
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of category types
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/category/{storeid}/allbuckets':
    get:
      tags:
        - category
      description: Return all the category buckets belong to given store
      operationId: listCategoryBuckets
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of category buckets
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/item/{storeid}':
    get:
      tags:
        - item
      description: Return all the items belong to given store
      operationId: listItems
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of item
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Item'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - item
      description: Update/Create item
      operationId: saveItem
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Item'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/item/{storeid}/{id}':
    get:
      tags:
        - item
      description: Return the item with given id
      operationId: loadItem
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: item detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Item'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - item
      description: Delete a item with given id
      operationId: deleteItem
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/item/{storeid}/byname/{name}':
    get:
      tags:
        - item
      description: >-
        Return all the items/categories belong to the given store that queried
        by name
      operationId: getMenu
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: name
          in: path
          required: true
          description: The items/categories' name
          schema:
            type: string
      responses:
        '200':
          description: list of item
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Item'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/item/{storeid}/barcode/{barcode}':
    get:
      tags:
        - item
      description: Return the item by barcode
      operationId: loadItemByBarcode
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: barcode
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: item detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Item'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/item/{storeid}/sku/{sku}':
    get:
      tags:
        - item
      description: Return the item by sku
      operationId: loadItemBySku
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: sku
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: item detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Item'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/item/{storeid}/input':
    post:
      tags:
        - item
      description: Update stock item
      operationId: updateStockItem
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ItemStockDetail'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/item/{storeid}/bulk-update':
    post:
      tags:
        - item
      description: Bulk update item
      operationId: bulkUpdateItem
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  items:
                    $ref: '#/components/schemas/Item'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/modifier/{storeid}':
    get:
      tags:
        - modifier
      description: Return all the modifiers belong to given store
      operationId: listModifiers
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of modifier
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Modifier'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - modifier
      description: Update/Create modifier
      operationId: saveModifier
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Modifier'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/modifier/{storeid}/{id}':
    get:
      tags:
        - modifier
      description: Return the modifier with given id
      operationId: loadModifier
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: modifier detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Modifier'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - modifier
      description: Delete a modifier with given id
      operationId: deleteModifier
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/modifier/{storeid}/{id}/import':
    post:
      tags:
        - modifier
      description: >-
        Import modifier options by csv file and return an id to track import
        process.
      operationId: importModifierOption
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: data import start
          content:
            application/json:
              schema:
                type: object
                properties:
                  importid:
                    description: import id to track import process
                    type: string
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/modifier/{storeid}/{id}/addOption':
    post:
      tags:
        - modifier
      description: Add a modifier option to a specific modifier for a store.
      operationId: addModifierOption
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - id
                - name
              properties:
                id:
                  type: string
                  description: Identifier for the new modifier option.
                price:
                  type: number
                  description: Price associated with the modifier option.
                percent:
                  type: number
                  description: >-
                    Optional percentage value associated with the modifier
                    option.
                name2:
                  type: string
                  description: >-
                    Secondary name or additional description for the modifier
                    option.
                name:
                  type: string
                  description: Primary name of the modifier option.
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/station/{storeid}':
    get:
      tags:
        - station
      description: Return all the stations belong to given store
      operationId: listStations
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of station
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Station'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - station
      description: Update/Create station
      operationId: saveStation
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Station'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/station/{storeid}/{id}':
    get:
      tags:
        - station
      description: Return the station with given id
      operationId: loadStation
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: station detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Station'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - station
      description: Delete a station with given id
      operationId: deleteStation
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/mainstation/{storeid}':
    get:
      tags:
        - station
      description: Return the main station of the store
      operationId: loadMainStation
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: station detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Station'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/ccdevice/{storeid}':
    get:
      tags:
        - ccdevice
      description: Return all the ccdevices belong to given store
      operationId: listCCDevices
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of ccdevice
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CCDevice'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - ccdevice
      description: Update/Create ccdevice
      operationId: saveCCDevice
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CCDevice'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/ccdevice/{storeid}/{id}':
    get:
      tags:
        - ccdevice
      description: Return the ccdevice with given id
      operationId: loadCCDevice
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: ccdevice detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/CCDevice'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - ccdevice
      description: Delete a ccdevice with given id
      operationId: deleteCCDevice
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/printer/{storeid}':
    get:
      tags:
        - printer
      description: Return all the printers belong to given store
      operationId: listPrinters
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of printer
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Printer'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - printer
      description: Update/Create printer
      operationId: savePrinter
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Printer'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/printer/{storeid}/{id}':
    get:
      tags:
        - printer
      description: Return the printer with given id
      operationId: loadPrinter
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: printer detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Printer'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - printer
      description: Delete a printer with given id
      operationId: deletePrinter
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/settings/{storeid}':
    get:
      tags:
        - settings
      description: load settings for a store.
      operationId: loadSettings
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: store settings
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Settings'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - settings
      description: saving store settings.
      operationId: saveSettings
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Settings'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/settings/{storeid}/statusboard':
    get:
      tags:
        - settings
      description: check the order status board is applied or not.
      operationId: isAppliedStatusBoard
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: true if the order status board is applied
          content:
            application/json:
              schema:
                type: boolean
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v2/saccount:
    get:
      tags:
        - superAdmin
      description: Get Super Admin Account
      operationId: getSuperAdmin
      security:
        - bearerAuth: []
      responses:
        '200':
          description: SuperAdmin Account
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/SuperAdmin'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - superAdmin
      description: Saving Super Admin Account
      operationId: saveSuperAdmin
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SuperAdmin'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /app/ordering/stores:
    get:
      tags:
        - ordering
      description: Return all the stores available for online ordering
      operationId: listPublishedStores
      security:
        - bearerAuth: []
      responses:
        '200':
          description: list of stores
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OnlineOrderingStore'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/ordering/{storeid}':
    get:
      tags:
        - ordering
      description: Return a store menu for ordering
      operationId: loadPublishedStore
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      security:
        - bearerAuth: []
      responses:
        '200':
          description: all data needed for making an online Order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnlineOrderingStore'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/ordering/{storeid}/order':
    post:
      tags:
        - ordering
      description: Submit an order
      operationId: submitOrder
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: X-Request-Recaptcha-Token
          in: header
          required: true
          description: the captcha token from user verification
          schema:
            type: string
      security:
        - bearerAuth: []
      requestBody:
        required: true
        description: The Order to be created
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnlineOrder'
      responses:
        '200':
          description: the Result of submitting Order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnlineOrderResponse'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/ordering/{storeid}/check-status/{id}':
    get:
      tags:
        - ordering
      description: >-
        Return true if the order has been handled successfully. Use for submit
        order by websocket.
      operationId: checkOrderStatus
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      security:
        - bearerAuth: []
      responses:
        '200':
          description: True if order has been handled successfully
          content:
            application/json:
              schema:
                type: boolean
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/ol-order/{storeid}/{orderId}':
    get:
      tags:
        - ordering
      description: Load order online detail
      operationId: loadOrder
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: orderId
          in: path
          required: true
          description: order id
          schema:
            type: string
      security:
        - bearerAuth: []
      responses:
        '200':
          description: null
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnlineOrder'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/ordering/stores/{storeId}/orders/{orderId}':
    get:
      tags:
        - ordering
      description: Load online order
      operationId: getOnlineOrder
      parameters:
        - name: storeId
          in: path
          required: true
          description: store id
          schema:
            type: string
        - name: orderId
          in: path
          required: true
          description: order id
          schema:
            type: string
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Online order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnlineOrder'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/ordering/stores/{storeId}/orders/{orderId}/payment-request':
    delete:
      tags:
        - ordering
      description: Delete payment request of given online order
      operationId: deleteOnlineOrderPR
      parameters:
        - name: storeId
          in: path
          required: true
          description: store id
          schema:
            type: string
        - name: orderId
          in: path
          required: true
          description: order id
          schema:
            type: string
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Payment request has been successfully deleted from order
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/ordering/stores/{storeId}/orders/{orderId}/payments':
    post:
      tags:
        - ordering
      description: Create online order payment
      operationId: postOnlineOrderPayment
      parameters:
        - name: storeId
          in: path
          required: true
          description: store id
          schema:
            type: string
        - name: orderId
          in: path
          required: true
          description: order id
          schema:
            type: string
      security:
        - bearerAuth: []
      requestBody:
        required: true
        description: Payment info
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  description: Apple Wallet payment token
                  type: string
                number:
                  description: Credit card number (last 4 digits)
                  type: string
                paymentRequestId:
                  description: Payment request id
                  type: string
      responses:
        '200':
          description: 'Post payment result, must check for details'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnlineOrderResponse'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/screen/{storeid}':
    get:
      tags:
        - screen
      description: Return all the screens belong to given store
      operationId: listScreens
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of screen
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Screen'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - screen
      description: Update or Create screen
      operationId: saveScreen
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Screen'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/screen/{storeid}/{id}':
    get:
      tags:
        - screen
      description: Return the screen with given id
      operationId: loadScreen
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: screen detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Screen'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - screen
      description: Delete a screen with given id
      operationId: deleteScreen
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/store/{storeid}/screens':
    get:
      tags:
        - screen
      description: return list of available DS Screen inside a store
      operationId: listDSScreen
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of screens
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DSScreen'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/store/{storeid}/screen/{screenid}':
    get:
      tags:
        - screen
      description: return detail of a DS Screen
      operationId: loadDSScreen
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: screenid
          in: path
          required: true
          description: The screen id to load for
          schema:
            type: string
      responses:
        '200':
          description: The screen detail information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DSScreen'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/store/{storeid}/kiosks':
    get:
      tags:
        - kiosk
      description: return all the available kiosks inside given store
      operationId: listKiosk
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of kiosks
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Station'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/store/{storeid}/kiosk/{kioskid}':
    get:
      tags:
        - kiosk
      description: return a kiosk with detail information for ordering
      operationId: loadKiosk
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: kioskid
          in: path
          required: true
          description: The kiosk station id
          schema:
            type: string
      responses:
        '200':
          description: all data needed for making an instore Order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KioskOrderingStore'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/store/{storeid}/ffd':
    get:
      tags:
        - screen
      description: return the ffd detail of this store
      operationId: loadFrontFacingDisplay
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: the ffd detail information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FFDSettings'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /places:
    get:
      tags:
        - maps
      description: return list of areas matching with google map auto complete api
      operationId: listPlaces
      parameters:
        - name: place
          in: query
          required: true
          description: the place to search for
          schema:
            type: string
      responses:
        '200':
          description: list of places
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Place'
  /shopitem:
    get:
      tags:
        - shopItem
      description: Return all the shop items belong to given store
      operationId: listShopItems
      security:
        - bearerAuth: []
      responses:
        '200':
          description: list of shop items
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ShopItem'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - shopItem
      description: Update/Create shop item
      operationId: saveShopItem
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShopItem'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/shopitem/{id}':
    get:
      tags:
        - shopItem
      description: Return the shop item with given id
      operationId: loadShopItem
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: shop item detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopItem'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - shopItem
      description: Delete a shop item with given id
      operationId: deleteShopItem
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /shoporder:
    get:
      tags:
        - shopOrder
      description: Return all the shop orders belong to given store
      operationId: listShopOrders
      security:
        - bearerAuth: []
      responses:
        '200':
          description: list of shop orders
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ShopOrder'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - shopOrder
      description: Update/Create shop order
      operationId: saveShopOrder
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShopOrder'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/shoporder/{id}':
    get:
      tags:
        - shopOrder
      description: Return the shop order with given id
      operationId: loadShopOrder
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: shop order detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopOrder'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - shopOrder
      description: Delete a shop order with given id
      operationId: deleteShopOrder
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /shoporder/apply:
    post:
      tags:
        - shopOrder
      description: Apply shop order
      operationId: applyShopOrder
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShopOrder'
      responses:
        '200':
          description: apply successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/promocode/{storeid}':
    get:
      tags:
        - promoCode
      description: Return all the promo codes belong to given store
      operationId: listPromoCodes
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of promo codes
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PromoCode'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - promoCode
      description: Update/Create promo code
      operationId: savePromoCode
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromoCode'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/promocode/{storeid}/{id}':
    get:
      tags:
        - promoCode
      description: Return the promo code with given id
      operationId: loadPromoCode
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: promo code detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/PromoCode'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - promoCode
      description: Delete a promo code with given id
      operationId: deletePromoCode
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/promocode/{storeid}/name/{name}':
    get:
      tags:
        - promoCode
      description: Return the promo code with given id
      operationId: getWebOrderPromoCodeByName
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: name
          in: path
          required: true
          description: The promo code name
          schema:
            type: string
      responses:
        '200':
          description: promo code detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromoCode'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/promocode/{storeid}/active':
    get:
      tags:
        - promoCode
      description: Return the promo code that are active to show instruction in web order
      operationId: getActiveWebOrderPromoCode
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: promo code detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromoCode'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/gallery/{storeid}':
    get:
      tags:
        - gallery
      description: Return all the galleries belong to given store
      operationId: list
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of gallery
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Gallery'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - gallery
      description: Update/Create gallery
      operationId: saveOrUpdate
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Gallery'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/gallery/{storeid}/{id}':
    get:
      tags:
        - gallery
      description: Return the gallery with given id
      operationId: load
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: promo code detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Gallery'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - gallery
      description: Delete a gallery with given id
      operationId: destroy
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/shop/{storeid}':
    get:
      tags:
        - shop
      description: Return shop items for store
      operationId: loadShopInfo
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      security:
        - bearerAuth: []
      responses:
        '200':
          description: shop information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopInfo'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/shop/{storeid}/order':
    post:
      tags:
        - shop
      description: Submit a shop order
      operationId: submitShopOrder
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: X-Request-Recaptcha-Token
          in: header
          required: true
          description: the captcha token from user verification
          schema:
            type: string
      security:
        - bearerAuth: []
      requestBody:
        required: true
        description: The shop order to be created
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShopOrder'
      responses:
        '200':
          description: the Result of submitting Order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultResponse'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/shop/{storeid}/history':
    get:
      tags:
        - shop
      description: Load shop history
      operationId: loadShopHistory
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: from_date
          in: query
          required: true
          schema:
            type: string
        - name: to_date
          in: query
          required: true
          schema:
            type: string
      security:
        - bearerAuth: []
      responses:
        '200':
          description: List of shop order of this store
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ShopOrder'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/kitchendisplay/{storeid}':
    get:
      tags:
        - kitchenDisplay
      description: Return all the kitchen displays belong to given store
      operationId: listKitchenDisplays
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of kitchen displays
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/KitchenDisplay'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - kitchenDisplay
      description: Update/Create kitchen display
      operationId: saveKitchenDisplay
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KitchenDisplay'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/kitchendisplay/{storeid}/{id}':
    get:
      tags:
        - kitchenDisplay
      description: Return the kitchen display with given id
      operationId: loadKitchenDisplay
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: kitchen display detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/KitchenDisplay'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - kitchenDisplay
      description: Delete a kitchen display with given id
      operationId: deleteKitchenDisplay
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/store/{storeid}/kitchen-displays':
    get:
      tags:
        - kitchenDisplay
      description: Return all the kitchen displays belong to given store
      operationId: listDSKitchenDisplays
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of kitchen displays
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/KitchenDisplay'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/store/{storeid}/kitchen-display/{id}':
    get:
      tags:
        - kitchenDisplay
      description: Return the kitchen display with given id
      operationId: loadDSKitchenDisplay
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: kitchen display detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/KitchenDisplay'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/promotion/{storeid}':
    get:
      tags:
        - promotion
      description: Return all the promotions belong to given store
      operationId: listPromotions
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of promotion
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Promotion'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - promotion
      description: Update/Create promotion
      operationId: savePromotion
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Promotion'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/promotion/{storeid}/{id}':
    get:
      tags:
        - promotion
      description: Return the promotion with given id
      operationId: loadPromotion
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: promotion detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Promotion'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - promotion
      description: Delete an promotion with given id
      operationId: deletePromotion
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/delivery/{storeid}/quote':
    get:
      tags:
        - delivery
      description: Return the delivery quote of a online order
      operationId: getQuote
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: origin
          in: query
          required: true
          description: The pickup address of the online order
          schema:
            type: string
        - name: destination
          in: query
          required: true
          description: The dropoff address of the online order
          schema:
            type: string
        - name: dropoff_time
          in: query
          description: The dropoff time of the online order
          schema:
            type: string
        - name: order_value
          in: query
          description: Total order this field for delivery DoorDash
          schema:
            type: number
      responses:
        '200':
          description: The delivery quote
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryQuote'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/menu-template/pdf/{storeid}/{id}/{token}':
    get:
      tags:
        - menuTemplate
      description: Return the menu template with given id
      operationId: loadMenuTemplate
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
        - name: token
          in: path
          required: true
          description: authorization token
          schema:
            type: string
      responses:
        '200':
          description: template as pdf
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/kreceipt-template/{storeid}':
    get:
      tags:
        - kitchenReceiptTemplate
      description: Return all the kitchen receipt templates belong to given store
      operationId: listKitchenReceiptTemplates
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of kitchen receipt templates
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/KitchenReceiptTemplate'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - kitchenReceiptTemplate
      description: Update/Create kitchen receipt template
      operationId: saveKitchenReceiptTemplate
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KitchenReceiptTemplate'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/kreceipt-template/{storeid}/{id}':
    get:
      tags:
        - kitchenReceiptTemplate
      description: Return the kitchen receipt template with given id
      operationId: loadKitchenReceiptTemplate
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: kitchen receipt template detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/KitchenReceiptTemplate'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - kitchenReceiptTemplate
      description: Delete a kitchen receipt template with given id
      operationId: deleteKitchenReceiptTemplate
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/order/{storeid}/{id}':
    get:
      tags:
        - order
      description: load order by ID
      operationId: loadOrderById
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: order detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Order'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/audio/{storeid}':
    get:
      tags:
        - audio
      description: Return audio from text
      operationId: textToSpeech
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: text
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: audio stream
          content:
            application/json:
              schema:
                type: string
                format: binary
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/statusboard/speech/{storeid}':
    get:
      tags:
        - statusBoard
      description: Return speech for ready order by orderNo
      operationId: getSpeechForReadyOrder
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: orderNo
          in: query
          required: true
          schema:
            type: number
      responses:
        '200':
          description: audio stream
          content:
            application/json:
              schema:
                type: string
                format: binary
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/app/auth/{storeid}/signup':
    post:
      tags:
        - auth
      description: Sign up an online user
      operationId: signupUser
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      security:
        - bearerAuth: []
      requestBody:
        required: true
        description: The Online User to be created
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnlineUser'
      responses:
        '200':
          description: the Result of sign up online user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultResponse'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /app/auth/signin:
    post:
      tags:
        - auth
      description: Sin in an online user
      operationId: signinUser
      security:
        - bearerAuth: []
      requestBody:
        required: true
        description: The Online User sign in
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnlineUser'
      responses:
        '200':
          description: the Result of sign in online user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnlineUser'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v2/admin/verify-passkey:
    post:
      tags:
        - admin
      description: Verify admin's passkey
      operationId: verifyPasskey
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                passkey:
                  description: passkey
                  type: string
      responses:
        '200':
          description: result pass or no
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    description: result is pass or no
                    type: boolean
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v2/admin:
    get:
      tags:
        - admin
      description: List Admin's Accounts
      operationId: listAdminAccounts
      security:
        - bearerAuth: []
      responses:
        '200':
          description: List Admin's Accounts
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Admin'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - admin
      description: Update/Create Admin
      operationId: saveAdmin
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Admin'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/v2/admin/{id}':
    get:
      tags:
        - admin
      description: Admin's Account
      operationId: getAdminAccount
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: Get Admin's Accounts
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Admin'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - admin
      description: Delete a admin with given id
      operationId: deleteAdmin
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v2/aaccount:
    get:
      tags:
        - admin
      description: Admin's Account
      operationId: getCurrentAdminAccount
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Get Admin's Accounts
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Admin'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - admin
      description: Admin's Account
      operationId: saveCurrentAdminAccount
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Admin'
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v2/app-settings:
    get:
      tags:
        - appSettings
      description: Get App Settings
      operationId: getAppSettings
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Get AppSettings
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/AppSettings'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - appSettings
      description: Update appSettings
      operationId: saveAppSettings
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppSettings'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v2/merchant/app-settings:
    get:
      tags:
        - appSettings
      description: Get App Settings
      operationId: getMerchantAppSettings
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Get Merchant AppSettings
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/AppSettings'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/v2/store/{storeid}/billing/subscription':
    get:
      tags:
        - billing
        - subscription
      description: data billing subscription
      operationId: loadBillingSubscription
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: date
          in: query
          description: filter by date
          schema:
            type: string
      responses:
        '200':
          description: data billing subscription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingSubscription'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v2/billing/reports:
    get:
      tags:
        - billing
        - subscription
      description: data billing subscription
      operationId: reportBilling
      security:
        - bearerAuth: []
      parameters:
        - name: date
          in: query
          description: filter by date
          schema:
            type: string
        - name: name
          in: query
          description: filter by store name
          schema:
            type: string
      responses:
        '200':
          description: data billing subscription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingSubscription'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - billing
      description: Update/Create Billing Report
      operationId: saveBillingReport
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BillingReport'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/v2/billing/reports/{id}':
    delete:
      tags:
        - billing
      description: Return result delete billing report
      operationId: deleteBillingReport
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: delete billing report
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: boolean
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/v2/store/{storeid}/billing/station':
    get:
      tags:
        - billing
      description: data billing subscription
      operationId: loadBillingStationByStore
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: data billing station
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BillingStation'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v2/billing/station:
    get:
      tags:
        - billing
      description: data billing station
      operationId: loadBillingStation
      security:
        - bearerAuth: []
      parameters:
        - name: name
          in: query
          description: filter by store name
          schema:
            type: string
      responses:
        '200':
          description: data billing station
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BillingStation'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/report/{storeid}/tip':
    get:
      tags:
        - report
      description: Return the tip report
      operationId: getTipReport
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: from_date
          in: query
          description: The date range of the tip report
          schema:
            type: string
        - name: to_date
          in: query
          description: The date range of the tip report
          schema:
            type: string
        - name: employee
          in: query
          description: The ID of specific employee for the tip report
          schema:
            type: string
      responses:
        '200':
          description: Tip report by employee data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TipReportQueryResult'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/report/{storeid}/daily':
    get:
      tags:
        - report
      description: Return the daily report
      operationId: getDailyReport
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: from_date
          in: query
          description: The date range of the daily report
          schema:
            type: string
        - name: to_date
          in: query
          description: The date range of the daily report
          schema:
            type: string
      responses:
        '200':
          description: daily report by storeid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DailyReportQueryResult'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/report-pdf/{storeid}/daily/{token}':
    get:
      tags:
        - report
      description: return daily report pdf
      operationId: getDailyReportPdf
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: token
          in: path
          required: true
          description: authorization token
          schema:
            type: string
        - name: from_date
          in: query
          description: The date range of the daily report
          schema:
            type: string
        - name: to_date
          in: query
          description: The date range of the daily report
          schema:
            type: string
      responses:
        '200':
          description: report as pdf
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/report/{storeid}/server':
    get:
      tags:
        - report
      description: Return the server report
      operationId: getServerReport
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: from_date
          in: query
          description: The date range of the server report
          schema:
            type: string
        - name: to_date
          in: query
          description: The date range of the server report
          schema:
            type: string
        - name: shift
          in: query
          description: The ID of specific shift for the server report
          schema:
            type: string
        - name: employee
          in: query
          description: The ID of specific employee for the server report
          schema:
            type: string
      responses:
        '200':
          description: server report by storeid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerReportQueryResult'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/report-pdf/{storeid}/server/{token}':
    get:
      tags:
        - report
      description: return server report pdf
      operationId: getServerReportPdf
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: token
          in: path
          required: true
          description: authorization token
          schema:
            type: string
        - name: from_date
          in: query
          description: The date range of the daily report
          schema:
            type: string
        - name: to_date
          in: query
          description: The date range of the daily report
          schema:
            type: string
        - name: shift
          in: query
          description: The ID of specific shift for the server report
          schema:
            type: string
        - name: employee
          in: query
          description: The ID of specific employee for the server report
          schema:
            type: string
      responses:
        '200':
          description: report as pdf
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/report/{storeid}/total':
    get:
      tags:
        - report
      description: Return the total report
      operationId: getTotalReport
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: totalType
          in: query
          description: The ID of specific total type for the total report
          schema:
            type: string
        - name: from_date
          in: query
          description: The date range of the total report
          schema:
            type: string
        - name: to_date
          in: query
          description: The date range of the total report
          schema:
            type: string
        - name: shift
          in: query
          description: The ID of specific shift for the total report
          schema:
            type: string
        - name: category
          in: query
          description: The ID of specific category for the total report
          schema:
            type: string
        - name: showItem
          in: query
          description: The ID of specific category for the total report
          schema:
            type: boolean
        - name: count
          in: query
          description: Total report per page
          schema:
            type: number
        - name: page
          in: query
          description: Page number
          schema:
            type: number
      responses:
        '200':
          description: server report by storeid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotalReportQueryResult'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/report-pdf/{storeid}/total/{token}':
    get:
      tags:
        - report
      description: Return the total report
      operationId: getTotalReportPdf
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: token
          in: path
          required: true
          description: authorization token
          schema:
            type: string
        - name: totalType
          in: query
          description: The ID of specific total type for the total report
          schema:
            type: string
        - name: from_date
          in: query
          description: The date range of the total report
          schema:
            type: string
        - name: to_date
          in: query
          description: The date range of the total report
          schema:
            type: string
        - name: shift
          in: query
          description: The ID of specific shift for the total report
          schema:
            type: string
        - name: category
          in: query
          description: The ID of specific category for the total report
          schema:
            type: string
        - name: showItem
          in: query
          description: The ID of specific category for the total report
          schema:
            type: boolean
      responses:
        '200':
          description: report as pdf
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/report/{storeid}/payment-type':
    get:
      tags:
        - report
      description: Return the detail report
      operationId: getDetailReport
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: from_date
          in: query
          description: The date range of the detail report
          schema:
            type: string
        - name: to_date
          in: query
          description: The date range of the detail report
          schema:
            type: string
        - name: shift
          in: query
          description: The ID of specific shift for the detail report
          schema:
            type: string
        - name: area
          in: query
          description: The ID of specific area for the detail report
          schema:
            type: string
        - name: employee
          in: query
          description: The ID of specific employee for the detail report
          schema:
            type: string
        - name: count
          in: query
          description: Total report per page
          schema:
            type: number
        - name: page
          in: query
          description: Page number
          schema:
            type: number
      responses:
        '200':
          description: server report by storeid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DetailReportQueryResult'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/report-pdf/{storeid}/payment-type/{token}':
    get:
      tags:
        - report
      description: Return the detail report
      operationId: getDetailReportPdf
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: token
          in: path
          required: true
          description: authorization token
          schema:
            type: string
        - name: from_date
          in: query
          description: The date range of the detail report
          schema:
            type: string
        - name: to_date
          in: query
          description: The date range of the detail report
          schema:
            type: string
        - name: shift
          in: query
          description: The ID of specific shift for the detail report
          schema:
            type: string
        - name: area
          in: query
          description: The ID of specific area for the detail report
          schema:
            type: string
        - name: employee
          in: query
          description: The ID of specific employee for the detail report
          schema:
            type: string
      responses:
        '200':
          description: report as pdf
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/report-csv/{storeid}/payment-type/{token}':
    get:
      tags:
        - report
      description: Return the detail report
      operationId: getDetailReportCsv
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: token
          in: path
          required: true
          description: authorization token
          schema:
            type: string
        - name: from_date
          in: query
          description: The date range of the detail report
          schema:
            type: string
        - name: to_date
          in: query
          description: The date range of the detail report
          schema:
            type: string
        - name: shift
          in: query
          description: The ID of specific shift for the detail report
          schema:
            type: string
        - name: area
          in: query
          description: The ID of specific area for the detail report
          schema:
            type: string
        - name: employee
          in: query
          description: The ID of specific employee for the detail report
          schema:
            type: string
      responses:
        '200':
          description: report as csv
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/order/transaction/{storeid}/{id}':
    get:
      tags:
        - report
      description: Return the detail report
      operationId: getTransactionDetailReport
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: server report by storeid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionDetail'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - report
      description: Return the detail report
      operationId: editTransactionReport
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionDetail'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/report/{storeid}/inventory':
    get:
      tags:
        - report
      description: Return the inventory report
      operationId: getInventoryReport
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: count
          in: query
          description: The count of the inventory report
          schema:
            type: string
        - name: page
          in: query
          description: The page of the inventory report
          schema:
            type: string
        - name: category
          in: query
          description: The category of the inventory report
          schema:
            type: string
      responses:
        '200':
          description: server report by storeid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryReportQueryResult'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/v2/online-order/{storeid}':
    get:
      tags:
        - onlineOrder
      description: Return all online order
      operationId: listOnlineOrder
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: date
          in: query
          description: filter by date
          schema:
            type: string
      responses:
        '200':
          description: list of online order
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OnlineOrder'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /online-order/error:
    get:
      tags:
        - onlineOrder
      operationId: listOnlineOrderError
      security:
        - bearerAuth: []
      parameters:
        - name: limit
          in: query
          description: limit size of page
          schema:
            type: number
        - name: page
          in: query
          description: page number
          schema:
            type: number
        - name: date
          in: query
          description: filter by date
          schema:
            type: string
        - name: search
          in: query
          description: 'search customer, email or phone'
          schema:
            type: string
      responses:
        '200':
          description: Online Order error data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnlineOrderQueryResult'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/{storeid}/refund-code':
    post:
      tags:
        - refundCode
      operationId: triggerRefundCode
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundCodeForm'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /activation:
    get:
      tags:
        - activation
      description: List activation
      operationId: listActivation
      security:
        - bearerAuth: []
      responses:
        '200':
          description: List activation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Station'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - activation
      description: Update/Create activation
      operationId: saveActivation
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Station'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/activation/{id}':
    delete:
      tags:
        - activation
      description: Delete a activation with given id
      operationId: deleteActivation
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /invoices:
    get:
      tags:
        - invoice
      operationId: listInvoice
      security:
        - bearerAuth: []
      parameters:
        - name: limit
          in: query
          description: limit size of page
          schema:
            type: number
        - name: page
          in: query
          description: page number
          schema:
            type: number
        - name: customerName
          in: query
          description: filter by customerName
          schema:
            type: string
      responses:
        '200':
          description: Invoice data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceQueryResult'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /invoices/generate:
    get:
      tags:
        - invoice
      operationId: generateInvoice
      security:
        - bearerAuth: []
      parameters:
        - name: limit
          in: query
          description: limit size of page
          schema:
            type: number
        - name: page
          in: query
          description: page number
          schema:
            type: number
      responses:
        '200':
          description: Generate invoice
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/invoices/export-pdf/{id}':
    get:
      tags:
        - invoice
      description: return invoice pdf
      operationId: getInvoicePdf
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: template as pdf
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/invoices/{id}':
    delete:
      tags:
        - invoice
      description: Delete a invoice with given id
      operationId: deleteInvoice
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/invoices/generate/{id}':
    get:
      tags:
        - invoice
      description: Generate invoice by id
      operationId: generateInvoiceById
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: invoice data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/printtpl/{storeid}/{type}':
    get:
      tags:
        - printtpl
      description: Get receipt config template
      operationId: getPrinttpl
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
        - name: type
          in: path
          required: true
          description: Printtpl type
          schema:
            type: string
      responses:
        '200':
          description: Data config printtpl
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    $ref: '#/components/schemas/Printtpl'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/printtpl/{storeid}':
    post:
      tags:
        - printtpl
      description: Save receipt config template
      operationId: savePrinttpl
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Printtpl'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /partner:
    get:
      tags:
        - partner
      description: Return all the partner
      operationId: listPartner
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: list of partner
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Partner'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
        - partner
      description: Update/Create partner
      operationId: savePartner
      security:
        - bearerAuth: []
      parameters:
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Partner'
      responses:
        '200':
          description: updated successfully
        '201':
          description: created successfully
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/partner/{id}':
    get:
      tags:
        - partner
      description: Return the partner with given id
      operationId: loadPartner
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '200':
          description: partner detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SerializedPartner'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
        - partner
      description: Delete an partner with given id
      operationId: deletePartner
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The object id to load for
          schema:
            type: string
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /partner/transfer:
    post:
      tags:
        - partner
      description: transfer merchant
      operationId: transferMerchant
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferMerchant'
      responses:
        '204':
          description: the store is deleted
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  '/ccpoint/{storeid}':
    get:
      tags:
        - ccpoint
      operationId: listCCPoint
      security:
        - bearerAuth: []
      parameters:
        - name: limit
          in: query
          description: limit size of page
          schema:
            type: number
        - name: page
          in: query
          description: page number
          schema:
            type: number
        - name: storeid
          in: path
          required: true
          description: The store id to get data from
          schema:
            type: string
      responses:
        '200':
          description: List CCPoint
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CCPoint'
        '400':
          description: invalid inputs (missing required information)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: current user does not have permission to access this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: the store is either not found or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
