openapi: 3.0.2
info:
    title: Shopbox API
    version: "3.0"
    contact:
        email: tech@shopbox.com
    description: Shopbox API
servers:
    - url: "https://api-dev.shopbox.com/api/v3"
      description: Development
    - url: "https://api.shopbox.com/api/v3"
      description: Production
tags:
    - name: Access Tokens
      description: Tokens are used to identify the account and it should be attached with each request that requires authentiaction
    - name: Accounts
    - name: Clients 
    - name: Products
    - name: Modifiers
      description: Product modifiers (options/add-ons). Price and group membership are set on the modifier.
    - name: Modifier groups
      description: Groups that contain modifiers (e.g. "Extras"). Link modifiers via modifiers_group_ids on create/update modifier.
    - name: Discount Groups
      description: Discount Groups are used to create discounts on specific tags for that client it can be attached later to customer so they can get specific discounts when attached to basket.
paths:
    /authenticate/credentials:
        post:
            tags:
                - Access Tokens
            summary: Create new access token
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreateAccessTokenRequest"
                        examples: {}
            security: []
            responses:
                "201":
                    description: Created
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/AccessToken"
                            examples: {}
            description: ""
    /products:
        get:
            operationId: getProducts
            description: Get client products
            parameters:
                - $ref: "#/components/parameters/client"
                - schema:
                      type: string
                  in: query
                  name: name
                - schema:
                      type: string
                  in: query
                  name: prevent_custom_price_products
                - schema:
                      type: string
                  in: query
                  name: tag
                  description: tag id to filter by
                - schema:
                      type: string
                  in: query
                  name: sort
                  description: sort by for example "name" or "-name" for descending order
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - type: object
                                      properties:
                                          data:
                                              type: array
                                              items:
                                                  $ref: "#/components/schemas/Product"
                                    - $ref: "#/components/schemas/CollectionPage"
            summary: Get Products
            tags:
                - Products
        post:
            summary: Create Product
            operationId: post-products
            responses:
                "201":
                    description: Created
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EProduct"
            description: "Create new product "
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreateProductRequest"
            tags:
                - Products
    /tags:
        get:
            tags:
                - tags
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - type: object
                                      properties:
                                          data:
                                              type: array
                                              items:
                                                  $ref: "#/components/schemas/Tag"
                                    - $ref: "#/components/schemas/CollectionPage"
        post:
            summary: ""
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/ETag"
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreateTagRequest"
                    application/xml:
                        schema:
                            type: object
                            properties: {}
                    multipart/form-data:
                        schema:
                            type: object
                            properties: {}
                    text/html:
                        schema:
                            type: object
                            properties: {}
                    text/plain:
                        schema:
                            type: object
                            properties: {}
                    application/EDI-X12:
                        schema:
                            type: object
                            properties: {}
                description: ""
            description: Create new tag
            tags:
                - tags
    /filters:
        get:
            tags:
                - filters
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - type: object
                                      properties:
                                          data:
                                              type: array
                                              items:
                                                  $ref: "#/components/schemas/Filter"
                                    - $ref: "#/components/schemas/CollectionPage"
            parameters:
                - $ref: "#/components/parameters/client"
    /filters/catalog:
        get:
            tags:
                - filters
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - type: object
                                      properties:
                                          data:
                                              type: array
                                              items:
                                                  $ref: "#/components/schemas/FilterItemRel"
                                    - $ref: "#/components/schemas/CollectionPage"
    /baskets:
        get:
            description: Get list of baskets belong to passed client
            parameters:
                - $ref: "#/components/parameters/client"
            tags:
                - baskets
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - type: object
                                      properties:
                                          data:
                                              type: array
                                              items:
                                                  $ref: "#/components/schemas/Basket"
                                    - $ref: "#/components/schemas/CollectionPage"
            summary: Get Baskets
        post:
            tags:
                - baskets
            summary: Create new basket
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreateBasketRequest"
            responses:
                "201":
                    description: Created
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EBasket"
    "/baskets/{id}":
        parameters:
            - in: path
              name: id
              schema:
                  type: integer
              required: true
              description: The basket ID.
        get:
            tags:
                - baskets
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/Basket"
                            examples: {}
            summary: Get Basket By ID
    /baskets/top-tag-sales:
        get:
            tags:
                - baskets
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    collection:
                                        type: object
                                        properties:
                                            name:
                                                type: string
                                            total:
                                                type: number
                                            units:
                                                type: number
            summary: Get Top Tag Sales
    /baskets/top-item-sales:
        get:
            tags:
                - baskets
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    collection:
                                        type: object
                                        properties:
                                            name:
                                                type: string
                                            b_product:
                                                type: integer
                                            total:
                                                type: number
                                            units:
                                                type: number
            summary: Get Top Item Sales
    /baskets/top-staff:
        get:
            tags:
                - baskets
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    collection:
                                        type: object
                                        properties:
                                            name:
                                                type: string
                                            total:
                                                type: number
                                            transactionss:
                                                type: number
            summary: Get Top Staff
    /baskets/compare-staff:
        get:
            tags:
                - baskets
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    name:
                                        type: string
                                    uid:
                                        type: integer
                                    revenue:
                                        type: number
                                    cash_amount:
                                        type: number
                                    card_amount:
                                        type: number
                                    mixed_amount:
                                        type: number
                                    others_amount:
                                        type: number
                                    transactions_average:
                                        type: number
                                    transactions_count:
                                        type: number
                                    items_count:
                                        type: number
            summary: Compare Staff
    /baskets/payment-types:
        get:
            tags:
                - baskets
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    payment_types:
                                        type: array
                                        items:
                                            type: string
            summary: Get Available Payment Types
    /baskets/dashboard:
        get:
            tags:
                - baskets
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    graph:
                                        type: object
                                        properties:
                                            creation_date:
                                                type: string
                                            creation_hour:
                                                type: string
                                            total_amount:
                                                type: number
                                    total_revenue:
                                        type: number
                                    total_number:
                                        type: number
                                    average_revenue:
                                        type: number
                                    shares:
                                        type: array
                                        items:
                                            type: object
                                            properties:
                                                type:
                                                    type: integer
                                                share_percent:
                                                    type: number
                                    shares_revenue:
                                        type: array
                                        items:
                                            type: object
                                            properties:
                                                type:
                                                    type: integer
                                                share_amount:
                                                    type: number
                                    customers:
                                        type: integer
                                    new_customers:
                                        type: integer
                                    not_registered:
                                        type: integer
                                    new_registered:
                                        type: number
                                    last_10_sales:
                                        type: array
                                        items:
                                            $ref: "#/components/schemas/Basket"
                                    transactions:
                                        type: integer
                                    average_item:
                                        type: number
                                    returns %:
                                        type: number
                                    returned:
                                        type: number
            summary: Get Baskets Dashboard Data
    /customers:
        get:
            tags:
                - customers
            responses:
                "200":
                    description: ok
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - type: object
                                      properties:
                                          data:
                                              type: array
                                              items:
                                                  $ref: "#/components/schemas/Customer"
                                    - $ref: "#/components/schemas/CollectionPage"
            summary: List Customers
        post:
            summary: Create Customer
            operationId: post-customers
            responses:
                "201":
                    description: Created
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/Customer"
            description: ""
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreateCustomerRequest"
                description: ""
            tags:
                - customers
    /customers/search:
        get:
            tags:
                - customers
            responses:
                "200":
                    description: ok
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - type: object
                                      properties:
                                          data:
                                              type: array
                                              items:
                                                  $ref: "#/components/schemas/Customer"
                                    - $ref: "#/components/schemas/CollectionPage"
            summary: Customer Search
    "/customers/custom-number/{customNumber}":
        parameters:
            - in: path
              name: customNumber
              schema:
                  type: integer
              required: true
              description: Customer Number.
        get:
            tags:
                - customers
            responses:
                "200":
                    description: ok
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/Customer"
            summary: Get Customer By Customer Number
    "/customers/{id}/extend-credit-limit":
        parameters:
            - in: path
              name: id
              schema:
                  type: integer
              required: true
              description: Customer Id.
        get:
            tags:
                - customers
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            summary: Get Extend Credit Limit For Customer
    /discount-groups:
        get:
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            summary: GET discount-groups
            description: Get list of discount groups
            tags:
                - Discount Groups
        post:
            summary: POST discount-groups
            operationId: post-discount-groups
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EDiscountGroup"
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreateDiscountGroupRequest"
            description: Create new discount group for client tags
            tags:
                - Discount Groups
    "/discount-groups/{id}":
        parameters:
            - in: path
              name: id
              schema:
                  type: integer
              required: true
              description: Discount Group Id.
        get:
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            summary: "GET discount-groups/{id}"
            description: get single discount group by uid
            tags:
                - Discount Groups
        put:
            summary: "PUT discount-groups/{id}"
            operationId: put-discount-groups-id
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/DiscountGroup"
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreateDiscountGroupRequest"
            description: Update discount group
            tags:
                - Discount Groups
    /cash-registers:
        get:
            tags:
                - Cash Registers
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            summary: Get Cash Registers
    "/cash-registers/{id}":
        parameters:
            - in: path
              name: id
              schema:
                  type: integer
              required: true
              description: Cash Register Id.
        get:
            tags:
                - Cash Registers
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            summary: Get Cash Register By Id
    /branches:
        get:
            tags:
                - Branches
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            summary: Get Branches
    "/branches/{id}":
        parameters:
            - in: path
              name: id
              schema:
                  type: integer
              required: true
              description: Branch Id.
        get:
            tags:
                - Branches
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            summary: Get Branch By ID
    "/branches/{id}/your-pay":
        parameters:
            - in: path
              name: id
              schema:
                  type: integer
              required: true
              description: Branch Id.
        get:
            tags:
                - Branches
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            summary: Get Branch Yourpay
    /variance-value:
        get:
            tags:
                - Variance Values
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /menus:
        get:
            tags:
                - Menus
            summary: Get Menus
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - $ref: "#/components/schemas/Menu"
                                    - $ref: "#/components/schemas/AbstractModel"
        post:
            summary: Create Menu
            operationId: post-menus
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EMenu"
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreateMenuRequest"
            tags:
                - Menus
    /product-variances:
        get:
            tags:
                - Product Variances
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            parameters:
                - $ref: "#/components/parameters/client"
    /product-inventories:
        get:
            tags:
                - Inventory
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            parameters: []
    /inventory-warning-emails:
        get:
            tags:
                - Inventory
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /inventory-importer:
        get:
            tags:
                - Inventory
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /excel:
        get:
            tags:
                - Product Variances
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    "/taxes/{id}":
        put:
            summary: ""
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/Tax"
            description: Update tax
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/UpdateTaxRequest"
            tags:
                - Taxes
        parameters:
            - schema:
                  type: string
              name: id
              in: path
              required: true
              description: id of tax
    /images:
        get:
            tags:
                - images
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /rooms:
        get:
            tags:
                - rooms
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    $ref: "#/components/schemas/Room"
        post:
            summary: ""
            operationId: post-rooms
            responses:
                "201":
                    description: Created
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/Room"
                            examples: {}
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreateRoom"
            tags:
                - rooms
    /rooms-object:
        get:
            tags:
                - rooms
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /roles:
        get:
            tags:
                - rooms
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /expenses:
        get:
            tags:
                - rooms
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /coupons:
        get:
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            tags:
                - Coupons
            summary: Get Coupons List
    /printer-groups:
        get:
            tags:
                - printer_groups
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /device-tokens:
        get:
            tags:
                - device_tokens
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            summary: Get Device Tokens
    /dashboard:
        get:
            tags:
                - dashboard
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /configs:
        get:
            tags:
                - configs
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /staff:
        get:
            tags:
                - staff
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /sales:
        get:
            tags:
                - sales
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    "/sales/{id}":
        parameters:
            - in: path
              name: id
              schema:
                  type: integer
              required: true
              description: Sale Id.
        get:
            tags:
                - sales
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /tables:
        get:
            tags:
                - tables
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    "/tables/{id}":
        parameters:
            - in: path
              name: id
              schema:
                  type: integer
              required: true
              description: Table Id.
        get:
            tags:
                - tables
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /weorder:
        get:
            tags:
                - weorder
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /weorder-client:
        get:
            tags:
                - weorder
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /planday-departments:
        get:
            tags:
                - plan_departments
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /reports:
        get:
            tags:
                - reports
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /modifiers-groups:
        get:
            tags:
                - Modifier groups
            summary: List modifier groups
            description: Lists modifier groups for a client. Use archived=1 to include hidden groups.
            parameters:
                - $ref: "#/components/parameters/client"
                - name: archived
                  in: query
                  schema:
                      type: integer
                      enum: [0, 1]
                      default: 0
                  description: 0 = active, 1 = archived (hidden)
                - name: filter
                  in: query
                  schema:
                      type: integer
                  description: Optional filter id
                - name: page
                  in: query
                  schema:
                      type: integer
                - name: per-page
                  in: query
                  schema:
                      type: integer
                      maximum: 100
                - name: sort
                  in: query
                  schema:
                      type: string
                  description: Sort field, e.g. name, -name, modifiers_count, -modifiers_count
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - type: object
                                      properties:
                                          data:
                                              type: array
                                              items:
                                                  $ref: "#/components/schemas/EModifierGroup"
                                    - $ref: "#/components/schemas/CollectionPage"
        post:
            tags:
                - Modifier groups
            summary: Create modifier group
            description: |
                Creates a group container only. Modifiers are linked to groups using
                `modifiers_group_ids` on POST or PUT /modifiers (not on this endpoint).
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreateModifierGroupRequest"
                        examples:
                            minimal:
                                summary: Minimal create
                                value:
                                    client: 123
                                    name: Extras
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    data:
                                        $ref: "#/components/schemas/ModifierGroup"
    "/modifiers-groups/{id}":
        parameters:
            - name: id
              in: path
              required: true
              schema:
                  type: integer
              description: Modifier group uid
        get:
            tags:
                - Modifier groups
            summary: Get modifier group
            parameters:
                - $ref: "#/components/parameters/client"
                - name: filter
                  in: query
                  schema:
                      type: integer
                  description: Optional filter id for modifier prices in nested modifiers
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    data:
                                        $ref: "#/components/schemas/ModifierGroup"
        put:
            tags:
                - Modifier groups
            summary: Update modifier group
            description: Admin role required.
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/UpdateModifierGroupRequest"
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    data:
                                        $ref: "#/components/schemas/ModifierGroup"
        delete:
            tags:
                - Modifier groups
            summary: Delete modifier group
            description: Soft delete (hidden=1). Admin role required. Client is taken from the group record.
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    data:
                                        type: object
    /modifiers:
        get:
            tags:
                - Modifiers
            summary: List modifiers
            parameters:
                - $ref: "#/components/parameters/client"
                - name: archived
                  in: query
                  schema:
                      type: integer
                      enum: [0, 1]
                      default: 0
                  description: 0 = active, 1 = archived (hidden)
                - name: page
                  in: query
                  schema:
                      type: integer
                - name: per-page
                  in: query
                  schema:
                      type: integer
                      maximum: 100
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - type: object
                                      properties:
                                          data:
                                              type: array
                                              items:
                                                  $ref: "#/components/schemas/Modifier"
                                    - $ref: "#/components/schemas/CollectionPage"
        post:
            tags:
                - Modifiers
            summary: Create modifier
            description: |
                Admin role required. Use `selling_price` for customer price (integer, minor units).
                Use `modifiers_group_ids` to attach the modifier to one or more groups.
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreateModifierRequest"
                        examples:
                            withGroup:
                                summary: Create with price and group
                                value:
                                    client: 123
                                    name: Extra cheese
                                    official_name: Extra cheese
                                    tax: 1
                                    tag: 5
                                    selling_price: 1500
                                    stock_price: 500
                                    modifiers_group_ids: [456]
            responses:
                "201":
                    description: Created
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    data:
                                        $ref: "#/components/schemas/Modifier"
    "/modifiers/{id}":
        parameters:
            - name: id
              in: path
              required: true
              schema:
                  type: integer
              description: Modifier uid
        get:
            tags:
                - Modifiers
            summary: Get modifier
            description: Admin or Staff role required.
            parameters:
                - $ref: "#/components/parameters/client"
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    data:
                                        $ref: "#/components/schemas/EModifier"
        put:
            tags:
                - Modifiers
            summary: Update modifier
            description: |
                Admin role required. `client` is required in the body.
                If `modifiers_group_ids` is sent, it replaces all group links (send every group id the modifier should belong to).
                `selling_price` updates the price for the active/default filter.
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/UpdateModifierRequest"
                        examples:
                            priceOnly:
                                summary: Update price only
                                value:
                                    client: 123
                                    selling_price: 2000
                            relinkGroups:
                                summary: Change group membership
                                value:
                                    client: 123
                                    modifiers_group_ids: [456, 457]
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    data:
                                        $ref: "#/components/schemas/Modifier"
        delete:
            tags:
                - Modifiers
            summary: Delete modifier
            description: Soft delete (hidden=1). Admin role required.
            parameters:
                - $ref: "#/components/parameters/client"
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    data:
                                        $ref: "#/components/schemas/Modifier"
    /payment-types:
        get:
            tags:
                - payment_types
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/PaymentType"
                    description: OK
            parameters:
                - $ref: "#/components/parameters/client"
        post:
            summary: ""
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/PaymentType"
            description: create new payment type to be used for paying the basket
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreatePaymentRequest"
            tags:
                - payment_types
    /payment-types-settings:
        get:
            tags:
                - payment_type_settings
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /discount-reasons:
        get:
            tags:
                - discount_reasons
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /expense-reasons:
        get:
            tags:
                - expense-resaons
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /time-zones:
        get:
            tags:
                - time-zones
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /archived:
        get:
            tags:
                - archived
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            summary: Archived
    /countries:
        get:
            tags:
                - countries
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            summary: Get Countries
    /journal:
        get:
            tags:
                - journal
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /counter-items:
        get:
            tags:
                - counter_items
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            summary: Get Counter Items
    /currencies:
        get:
            tags:
                - currencies
            responses:
                "200":
                    $ref: "#/components/responses/Default"
            summary: Get Currencies
    /picasso:
        get:
            tags:
                - picasso
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /mobile-pay:
        get:
            tags:
                - mobilepay
            responses:
                "200":
                    $ref: "#/components/responses/Default"
    /baskets/by-order-hash:
        get:
            summary: Get basket using order hash
            tags:
                - baskets
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EBasket"
            description: Get single basket using order hash
            parameters:
                - schema:
                      type: string
                  in: query
                  name: orderHash
                  description: order hash stored with basket
                  required: true
    /integration-accounts/accounts:
        get:
            summary: Get integration accounts
            tags:
                - Integration Accounts
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    type: object
                                    properties:
                                        account_number:
                                            type: integer
                                        name:
                                            type: string
            description: Get intgration accounts according to active account integration
            parameters:
                - $ref: "#/components/parameters/client"
    /integration-accounts/tax-codes:
        get:
            summary: Get integration tax codes
            tags:
                - Integration Accounts
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    type: object
                                    properties:
                                        name:
                                            type: string
                                        vat_code:
                                            type: string
            parameters:
                - $ref: "#/components/parameters/client"
    /clients:
        get:
            summary: GET clients
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - type: object
                                      properties:
                                          data:
                                              $ref: "#/components/schemas/Client"
                                    - $ref: "#/components/schemas/CollectionPage"
            tags:
                - Clients
            description: Get list of all clients connected to account
        post:
            summary: POST clients
            operationId: post-clients
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EClient"
            description: Create new client under that account
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreateClientRequest"
            tags:
                - Clients
    /yourpay-pax/start-payment:
        post:
            summary: Start Payment
            tags:
                - Yourpay
            responses:
                "200":
                    description: OK
            requestBody:
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                cash_register:
                                    type: integer
                                pax:
                                    type: integer
                                amount:
                                    type: integer
                description: ""
    "/yourpay-pax/{cash_register}/get-pax":
        parameters:
            - schema:
                  type: string
              name: cash_register
              in: path
              required: true
              description: cash register id
        get:
            summary: get cash register pax
            tags:
                - Yourpay
            responses:
                "200":
                    description: OK
    /taxes:
        get:
            summary: Get Taxes
            tags:
                - Taxes
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    data:
                                        type: array
                                        items:
                                            $ref: "#/components/schemas/Tax"
            description: Get list of taxes
            parameters:
                - $ref: "#/components/parameters/client"
    /webhooks:
        get:
            summary: ""
            tags:
                - Webhooks
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - type: object
                                      properties:
                                          data:
                                              type: array
                                              items:
                                                  $ref: "#/components/schemas/Webhook"
                                    - $ref: "#/components/schemas/CollectionPage"
            operationId: get-webooks
            description: List of client webhooks
            parameters:
                - $ref: "#/components/parameters/client"
        post:
            summary: ""
            operationId: post-webooks
            responses:
                "200":
                    description: OK
                "201":
                    description: Created
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/Webhook"
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreateWebhookRequest"
            tags:
                - Webhooks
        parameters: []
    "/webhooks/{id}":
        parameters:
            - schema:
                  type: string
              name: id
              in: path
              required: true
              description: Webhook Id
        put:
            summary: ""
            operationId: put-webhooks-id
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/Webhook"
            description: Update webhook
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/UpdateWebhookRequest"
                description: ""
            tags:
                - Webhooks
        delete:
            summary: ""
            operationId: delete-webhooks-id
            responses:
                "204":
                    description: No Content
            description: Delete webhook
            tags:
                - Webhooks
    "/products/{id}":
        parameters:
            - schema:
                  type: string
              name: id
              in: path
              required: true
        put:
            summary: Update product details
            tags:
                - products
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EProduct"
            operationId: put-products-id
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/UpdateProductRequest"
            description: ""
        get:
            summary: get product details
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EProduct"
            operationId: get-products-id
            tags:
                - Products
    "/products/{id}/product-variances":
        parameters:
            - schema:
                  type: string
              name: id
              in: path
              required: true
        get:
            summary: Get product variances
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    data:
                                        type: array
                                        items:
                                            $ref: "#/components/schemas/ProductVariance"
            operationId: get-products-id-product-variances
            tags:
                - Products
    "/prooducts/{code}/by-code":
        parameters:
            - schema:
                  type: string
              name: code
              in: path
              required: true
              description: bar code of product
        get:
            summary: get product by bar code
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/Product"
            operationId: get-prooducts-code-by-code
            tags:
                - Products
    /products/units:
        get:
            summary: Get product units
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    data:
                                        type: array
                                        items:
                                            $ref: "#/components/schemas/Unit"
            operationId: get-products-units
            tags:
                - Products
    "/products/{id}/filter-price":
        parameters:
            - schema:
                  type: string
              name: id
              in: path
              required: true
              description: product id
        get:
            summary: Get product filter price
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    data:
                                        type: array
                                        items:
                                            $ref: "#/components/schemas/ProductFilterRel"
            operationId: get-products-id-filter-price
            parameters:
                - $ref: "#/components/parameters/client"
            tags:
                - Products
    /products/search:
        get:
            summary: Search for products
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    data:
                                        type: array
                                        items:
                                            $ref: "#/components/schemas/CounterItem"
            operationId: get-products-search
            parameters:
                - $ref: "#/components/parameters/client"
                - schema:
                      type: string
                  in: query
                  name: name
                  description: search by name
                - schema:
                      type: string
                  in: query
                  name: bar_code
                  description: search by bar code
                - schema:
                      type: string
                  in: query
                  name: sku_code
                  description: search by sku code
            tags:
                - Products
    "/products/{id}/assign-to-filter":
        parameters:
            - schema:
                  type: string
              name: id
              in: path
              required: true
        put:
            summary: assign product to filter
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EProduct"
            operationId: put-products-id-assign-to-filter
            parameters:
                - schema:
                      type: string
                  in: query
                  name: filter
                  description: filter id
                  required: true
            requestBody:
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                is_visible:
                                    type: boolean
            tags:
                - Products
    "/products/{id}/history":
        parameters:
            - schema:
                  type: string
              name: id
              in: path
              required: true
        get:
            summary: Get product change history
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EntityHistory"
            operationId: get-id-history
            parameters:
                - $ref: "#/components/parameters/client"
                - schema:
                      type: string
                  in: query
                  name: filter
                  description: filter id
            tags:
                - Products
    /takeaway/order:
        post:
            summary: ""
            operationId: post-takeaway-order
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/TableBasket"
            description: create takeaway order from app
            requestBody:
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                cash_register:
                                    type: integer
                                discount:
                                    type: number
                                discount_type:
                                    type: integer
                                is_final_price:
                                    type: boolean
                                is_discount_group:
                                    type: boolean
                                number_of_persons:
                                    type: integer
                                discount_reason_id:
                                    type: integer
                                discount_margin:
                                    type: integer
                                staff:
                                    type: number
                                customer:
                                    type: integer
                                type:
                                    type: integer
                                pickup_time:
                                    type: string
                                order_type:
                                    type: string
                                    enum:
                                        - pickup
                                        - dinein
                                        - delivery
                                delivery_price:
                                    type: number
                                note:
                                    type: string
                                provider:
                                    type: integer
                                    description: "7: interticket"
                                basket_items:
                                    type: array
                                    items:
                                        type: object
                                        properties:
                                            uid:
                                                type: integer
                                            course:
                                                type: integer
                                            model:
                                                type: integer
                                            menu:
                                                type: integer
                                            product:
                                                type: integer
                                            product_variance:
                                                type: integer
                                            is_final_price:
                                                type: boolean
                                            name:
                                                type: string
                                            discount:
                                                type: integer
                                            discount_type:
                                                type: integer
                                            discount_margin:
                                                type: integer
                                            custom_price:
                                                type: integer
                                            quantity:
                                                type: number
                                            note:
                                                type: string
                                            printed:
                                                type: boolean
                                            sent:
                                                type: boolean
                                            tax:
                                                type: integer
                                            printer_Types:
                                                type: array
                                                items:
                                                    type: string
                                            amount:
                                                type: integer
                                            item_hash:
                                                type: string
                                            discount_reason_id:
                                                type: integer
                                            tax_type:
                                                type: integer
                                            ticket:
                                                type: object
                                                properties:
                                                    event_name:
                                                        type: string
                                                    event_address:
                                                        type: string
                                                    date:
                                                        type: string
                                                    time:
                                                        type: string
                                                    type:
                                                        type: string
                                                    auditorium:
                                                        type: string
                                                    code:
                                                        type: string
                                                        description: qr code string
                                                required:
                                                    - event_name
                                                    - event_address
                                                    - date
                                                    - time
                                                    - type
                                                    - auditorium
                                                    - code
                                address:
                                    type: object
                                    properties:
                                        country:
                                            type: integer
                                        city:
                                            type: string
                                        zipCode:
                                            type: integer
                                        street:
                                            type: string
                                        apartment:
                                            type: string
                            required:
                                - cash_register
                                - staff
                                - type
                                - pickup_time
                                - order_type
    "/takeaway/{cash_register}/parked-orders":
        parameters:
            - schema:
                  type: string
              name: cash_register
              in: path
              required: true
        get:
            summary: Get Cash Register Parked Orders
            tags: []
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/TableBasket"
                            examples: {}
            operationId: get-takeaway-cash_register-parked-orders
            description: get parked orders for cash register
    "/takeaway/{cash_register}/accepted-orders":
        parameters:
            - schema:
                  type: string
              name: cash_register
              in: path
              required: true
        get:
            summary: Get Cash Register Accepted Orders
            tags: []
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/TableBasket"
                            examples: {}
            operationId: get-takeaway-cash_register-accepted-orders
            description: get takeaway accepted orders for cash register
    "/takeaway/{cash_register}/completed-orders":
        parameters:
            - schema:
                  type: string
              name: cash_register
              in: path
              required: true
        get:
            summary: Get Cash Register Completed Orders
            tags: []
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/TableBasket"
            operationId: get-takeaway-cash_register-completed-orders
            description: get takeaway completed orders for cash register
    "/takeaway/{cash_register}/accept-order/{table_basket)":
        parameters:
            - schema:
                  type: string
              name: cash_register
              in: path
              required: true
        put:
            summary: ""
            operationId: put-takeaway-cash_register-accept-order-table_basket)
            responses:
                "200":
                    description: OK
            description: mark the takeaway order as accepted
    "/takeaway/{cash_register}/complete-order/{basket_id)":
        parameters:
            - schema:
                  type: string
              name: cash_register
              in: path
              required: true
        put:
            summary: ""
            operationId: put-takeaway-cash_register-complete-order-basket_id)
            responses:
                "200":
                    description: OK
            description: mark order as completed
    "/takeaway/{cash_register}/decline-order/{table_basket)":
        parameters:
            - schema:
                  type: string
              name: cash_register
              in: path
              required: true
        put:
            summary: ""
            operationId: put-takeaway-cash_register-decline-order-table_basket)
            responses:
                "200":
                    description: OK
            description: mark order as declined
    "/customers/{id}":
        parameters:
            - schema:
                  type: string
              name: id
              in: path
              required: true
        put:
            summary: Update Customer
            tags:
                - customers
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/Customer"
            operationId: put-customers-id
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/UpdateCustomerRequest"
        get:
            summary: Customer Details
            tags:
                - customers
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/Customer"
            operationId: get-customers-id
        delete:
            summary: Delete Customer
            operationId: delete-customers-id
            responses:
                "200":
                    description: OK
            tags:
                - customers
    /customers/import-customers:
        post:
            summary: Import customers from excel sheet
            tags:
                - customers
            responses:
                "200":
                    description: OK
            operationId: post-customers-import-customers
            parameters: []
            requestBody:
                content:
                    multipart/form-data:
                        schema:
                            type: object
                            properties:
                                csv:
                                    type: string
                                    format: binary
                                client:
                                    type: string
                                custom_number:
                                    type: string
                                street:
                                    type: string
                                name:
                                    type: string
                                phone:
                                    type: string
                description: ""
    "/menus/{id}":
        parameters:
            - schema:
                  type: string
              name: id
              in: path
              required: true
        put:
            summary: Update Menu
            tags:
                - Menus
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/EMenu"
            operationId: put-menus-id
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/UpdateMenuRequest"
    /accounts:
        post:
            summary: POST accounts
            tags:
                - Accounts
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/Account"
            operationId: post-accounts
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/CreateAccountRequest"
            security: []
        put:
            summary: PUT accounts
            tags:
                - Accounts
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/Account"
            operationId: put-accounts
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "#/components/schemas/UpdateAccountRequest"
    /accounts/pin-token:
        get:
            summary: GET pin-token
            tags:
                - Accounts
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/AccessToken"
            operationId: get-accounts-pin-token
            description: return Token for given pin number
            parameters:
                - schema:
                      type: string
                  in: query
                  name: code
                - schema:
                      type: string
                  in: query
                  name: client
    /acccounts/generate-token:
        post:
            summary: POST acccounts/generate-token
            tags:
                - Accounts
            responses: 
                "200":
                    description: OK
            operationId: post-acccounts-generate-token
            description: Send reset password email
            requestBody:
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                email:
                                    type: string
            security: []
    "/accounts/{id}/change-lang":
        parameters:
            - schema:
                  type: string
              name: id
              in: path
              required: true
        put:
            summary: "PUT accounts/{id}/change-lang"
            description: Change Language
            tags:
                - Accounts
            responses:
                "200":
                    description: OK
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/Account"
            operationId: put-accounts-id-change-lang
            parameters: []
            requestBody:
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                lang:
                                    type: string
    /clients/create-company:
        post:
            summary: POST clients/create-company
            description: Create Client
            tags:
                - Clients
            responses: 
                "200":
                    description: OK
            operationId: post-clients-create-company
    /all-barcodes:
        get:
            operationId: get-all-barcodes
            description: 'Get all barcodes'
            tags:
                - Products
            parameters: []
            responses:
                '200':
                    description: OK
                    content:
                      application/json:
                        schema:
                            $ref: "#/components/schemas/AllBarcode"
                    
security:
    - TokenAuth: []
components:
    securitySchemes:
        TokenAuth:
            type: apiKey
            in: query
            name: accessToken
            description: Access Token you received after authentication
    parameters:
        client:
            in: query
            name: client
            required: true
            schema:
                type: integer
            description: Id of the selected client
    responses:
        Default:
            description: Default Response
            content:
                application/json:
                    schema:
                        $ref: "#/components/schemas/AbstractModel"
    schemas:
        CollectionPage:
            type: object
            properties:
                meta:
                    type: object
                    properties:
                        pagination:
                            type: object
                            properties:
                                total:
                                    type: integer
                                per_page:
                                    type: integer
                                current_page:
                                    type: integer
                                total_pages:
                                    type: integer
                                links:
                                    type: object
                                    properties:
                                        self:
                                            type: string
                                        next:
                                            type: string
                                        last:
                                            type: string
        AbstractModel:
            type: object
            properties:
                uid:
                    type: integer
                crdate:
                    type: integer
                tstamp:
                    type: integer
                crdate_formatted:
                    type: string
                tstamp_formatted:
                    type: string
        Image:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      path:
                          type: string
                      image_original:
                          type: string
                      image_large:
                          type: string
                      image_medium:
                          type: string
                      image_small:
                          type: string
        Address:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      street_name:
                          type: string
                      map_lat:
                          type: number
                      map_long:
                          type: number
                      country:
                          type: integer
                      zip_code:
                          type: string
                      note:
                          type: string
                      city_name:
                          type: string
                      cc_name:
                          type: string
                      name:
                          type: string
        Zone:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      country_code:
                          type: string
                      zone_name:
                          type: string
        Tax:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      enabled:
                          type: integer
                      percentage:
                          type: integer
                      client:
                          type: integer
                      standard_tax_codes:
                          type: integer
                      code:
                          type: string
            title: ""
        Unit:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
        TReceiptSettings:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      logo:
                          type: integer
                      print_website_address:
                          type: integer
                      print_email_address:
                          type: integer
                      print_phone_no:
                          type: integer
                      generate_and_print_order_uid:
                          type: integer
                      print_cash_reg_name:
                          type: integer
                      print_sales_person_name:
                          type: integer
                      custom_receipt_message:
                          type: integer
                      include_social_network_links:
                          type: integer
                      branch:
                          type: integer
                      client:
                          type: integer
                      custom_image:
                          type: integer
                      print_order_hash:
                          type: integer
                      print_comment:
                          type: integer
        ETReceiptSettings:
            allOf:
                - $ref: "#/components/schemas/TReceiptSettings"
                - type: object
                  properties:
                      custom_image:
                          $ref: "#/components/schemas/Image"
                      logo:
                          $ref: "#/components/schemas/Image"
        TPlatforms:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      platform:
                          type: string
        ETPlatforms:
            allOf:
                - $ref: "#/components/schemas/TPlatforms"
                - type: object
                  properties:
                      darkLogo:
                          $ref: "#/components/schemas/Image"
                      lightLogo:
                          $ref: "#/components/schemas/Image"
        TBranchPlatforms:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      branch:
                          type: integer
                      platform_uid:
                          type: integer
                      link:
                          type: string
        ETBranchPlatforms:
            allOf:
                - $ref: "#/components/schemas/TBranchPlatforms"
                - type: object
                  properties:
                      platform:
                          $ref: "#/components/schemas/ETPlatforms"
        InvoiceSettings:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      due_date_type:
                          type: integer
                      days_till_due:
                          type: integer
                      payment_terms:
                          type: string
                      emails_to_send_invoice_to:
                          type: string
                      logo:
                          type: integer
        EInvoiceSettings:
            allOf:
                - $ref: "#/components/schemas/InvoiceSettings"
                - type: object
                  properties:
                      logo0:
                          $ref: "#/components/schemas/Image"
        TDigitalReceiptSettings:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      header_logo:
                          type: integer
                      header_background_img:
                          type: integer
                      background_color:
                          type: string
                      footer_background_color:
                          type: string
                      font_color:
                          type: string
                      footer_font_color:
                          type: string
                      custom_receipt_message:
                          type: string
                      include_opening_hours:
                          type: integer
                      include_social_network_links:
                          type: integer
                      print_comment:
                          type: string
        ETDigitalReceiptSettings:
            allOf:
                - $ref: "#/components/schemas/TDigitalReceiptSettings"
                - type: object
                  properties:
                      header_logo:
                          $ref: "#/components/schemas/Image"
                      header_background_img:
                          $ref: "#/components/schemas/Image"
        UpodiCustomerIntegration:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      client_id:
                          type: integer
                      upodi_customer_id:
                          type: integer
                      upodi_plan_id:
                          type: integer
                      upodi_account_number:
                          type: string
                      upodi_subscription_id:
                          type: string
                      free_trial_starts_at:
                          type: integer
                      free_trial_ends_at:
                          type: integer
                      trial_ended:
                          type: boolean
                      is_trial:
                          type: boolean
                      plan_id:
                          type: integer
                      plan_name:
                          type: string
        CashRegister:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      branch:
                          type: integer
                      terminal_enabled:
                          type: integer
                      fiscal_register:
                          type: string
                      package:
                          type: integer
                      filter_uid:
                          type: integer
                      is_new_table_design:
                          type: integer
                      is_listview_counter:
                          type: integer
                      integrated_cash_drawer:
                          type: integer
                      order_takeaway_ability:
                          type: integer
                      order_takeaway_autoPrint:
                          type: integer
        Branch:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      branch_pin:
                          type: string
                      cash_count:
                          type: integer
                      client:
                          type: integer
                      address:
                          type: integer
                      phone:
                          type: string
                      email:
                          type: string
                      website:
                          type: string
                      time_zone:
                          type: integer
                      custom_receipt_text:
                          type: string
                      save_receipt_settings_in_all_stores:
                          type: integer
                      save_digital_receipt_settings_in_all_stores:
                          type: integer
                      save_invoice_settings_in_all_stores:
                          type: integer
                      work_offline:
                          type: integer
        EBranch:
            allOf:
                - $ref: "#/components/schemas/Branch"
                - type: object
                  properties:
                      cash_registers:
                          type: array
                          items:
                              $ref: "#/components/schemas/CashRegister"
                      address0:
                          $ref: "#/components/schemas/Address"
                      zone0:
                          $ref: "#/components/schemas/Zone"
                      receipt_settings:
                          $ref: "#/components/schemas/ETReceiptSettings"
                      platforms:
                          $ref: "#/components/schemas/ETBranchPlatforms"
                      invoice_settings:
                          $ref: "#/components/schemas/EInvoiceSettings"
                      digital_receipt_settings:
                          $ref: "#/components/schemas/ETDigitalReceiptSettings"
        Client:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      email:
                          type: string
                      url_name:
                          type: string
                      description:
                          type: string
                      phone:
                          type: string
                      website:
                          type: string
                      account_no:
                          type: string
                      reg_no:
                          type: string
                      webshop:
                          type: integer
                      vat_no:
                          type: string
                      opening_hours:
                          type: string
                      tags:
                          type: string
                      show_image:
                          type: integer
                      branch_count:
                          type: integer
                      language:
                          type: string
                      locale_format:
                          type: string
                      infrasec_id:
                          type: string
                      locale:
                          type: string
                      currency:
                          type: integer
                      pin_required:
                          type: integer
                      number_of_courses:
                          type: integer
                      image_uid:
                          type: integer
                      image:
                          type: integer
                      logo:
                          type: integer
                      address:
                          type: integer
                      time_zone:
                          type: integer
                      custom_receipt_text:
                          type: string
                      enable_inventory:
                          type: integer
                      enable_gift:
                          type: integer
                      enable_customer_loyalty:
                          type: integer
                      min_gift_amount:
                          type: integer
                      has_extend_integration:
                          type: boolean
                      mult_barcode_per_prod:
                          type: boolean
                      invoice_payment_enabled:
                          type: boolean
                      is_norwigan_client:
                          type: boolean
                      enable_receipt_settings:
                          type: integer
                      order_takeaway_ability:
                          type: integer
                      order_takeaway_autoPrint:
                          type: integer
                      partner_id:
                          type: integer
                      show_final_price:
                          type: integer
                      has_accounting_integration:
                          type: boolean
        EClient:
            allOf:
                - $ref: "#/components/schemas/Client"
                - type: object
                  properties:
                      image0:
                          $ref: "#/components/schemas/Image"
                      taxes:
                          type: array
                          items:
                              $ref: "#/components/schemas/Tax"
                      address0:
                          $ref: "#/components/schemas/Address"
                      billing_address0:
                          $ref: "#/components/schemas/Address"
                      logo0:
                          $ref: "#/components/schemas/Image"
                      zone0:
                          $ref: "#/components/schemas/Zone"
                      branches:
                          $ref: "#/components/schemas/Branch"
        Tag:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      client:
                          type: integer
                      weight:
                          type: integer
                      not_kitchen:
                          type: integer
                      color:
                          type: string
                      product_count:
                          type: integer
                      is_visible:
                          type: integer
        ETag:
            allOf:
                - $ref: "#/components/schemas/Tag"
                - type: object
                  properties:
                      image:
                          $ref: "#/components/schemas/Image"
                      integration_accounts:
                          type: array
                          items:
                              $ref: "#/components/schemas/TagIntegrationAccount"
        Filter:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      client:
                          type: integer
                      default:
                          type: integer
                      cr_number:
                          type: integer
        EFilter:
            allOf:
                - $ref: "#/components/schemas/Filter"
                - type: object
                  properties:
                      cash_registers:
                          type: array
                          items:
                              $ref: "#/components/schemas/CashRegister"
        ProductVariance:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      stock_price:
                          type: integer
                      selling_price:
                          type: integer
                      quantity:
                          type: integer
                      product:
                          type: integer
                      image:
                          type: integer
                      name:
                          type: string
                      parent:
                          type: integer
                      inventory_multiply_factor:
                          type: integer
                      weight:
                          type: integer
                      barcode:
                          type: string
        ProductsQuantitiesPrices:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      product_id:
                          type: integer
                      from_quantity:
                          type: integer
                      price:
                          type: integer
        VarianceType:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      client:
                          type: integer
                      variant_number:
                          type: integer
        VarianceValue:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      variance_type:
                          type: integer
                      weight:
                          type: integer
        EVarianceValue:
            allOf:
                - $ref: "#/components/schemas/VarianceValue"
                - type: object
                  properties:
                      varianceType:
                          $ref: "#/components/schemas/VarianceType"
        EProductVariance:
            allOf:
                - $ref: "#/components/schemas/ProductVariance"
                - type: object
                  properties:
                      variance_value:
                          $ref: "#/components/schemas/VarianceValue"
                      quantities_prices:
                          type: array
                          items:
                              $ref: "#/components/schemas/ProductsQuantitiesPrices"
        ProductBarCode:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      barcode:
                          type: string
        Modifier:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      official_name:
                          type: string
                      kitchen_name:
                          type: string
                      is_favourite:
                          type: integer
                      stock_price:
                          type: integer
                      selling_price:
                          type: integer
                          description: Customer price in minor units (from active filter or default)
                      takeaway_price:
                          type: integer
                          description: Takeaway price in minor units when enabled for client
                      code:
                          type: string
                      sku_code:
                          type: string
                      quantity:
                          type: integer
                      client_id:
                          type: integer
                      color:
                          type: string
                      weight:
                          type: integer
                      modifier_groups_ids:
                          type: array
                          description: Group uids this modifier belongs to (response field name)
                          items:
                              type: integer
                      is_visible:
                          type: integer
                      not_kitchen:
                          type: integer
                      tax0:
                          $ref: "#/components/schemas/Tax"
                      tax_in_stay0:
                          $ref: "#/components/schemas/Tax"
                      tag0:
                          $ref: "#/components/schemas/ETag"
                      unit0:
                          $ref: "#/components/schemas/Unit"
                      image0:
                          $ref: "#/components/schemas/Image"
                      product_barcods:
                          type: array
                          items:
                              $ref: "#/components/schemas/ProductBarCode"
        EModifier:
            allOf:
                - $ref: "#/components/schemas/Modifier"
        ModifierGroup:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      client:
                          type: integer
                      type:
                          type: integer
                      limit:
                          type: integer
                      modifiers_count:
                          type: integer
                      standalone_modifier_group:
                          type: integer
                          description: 0 = normal group, 1 = standalone
                      hidden:
                          type: integer
                      deleted:
                          type: integer
        EModifierGroup:
            allOf:
                - $ref: "#/components/schemas/ModifierGroup"
                - type: object
                  properties:
                      modifiers:
                          type: array
                          items:
                              $ref: "#/components/schemas/Modifier"
        CreateModifierGroupRequest:
            title: CreateModifierGroupRequest
            type: object
            description: Create a modifier group. Link modifiers via modifiers_group_ids on /modifiers.
            required:
                - client
                - name
            properties:
                client:
                    type: integer
                    description: Wallet client id
                name:
                    type: string
                    maxLength: 100
                    description: Group name (e.g. Extras)
                description:
                    type: string
                    maxLength: 255
                code:
                    type: string
                color:
                    type: string
        UpdateModifierGroupRequest:
            title: UpdateModifierGroupRequest
            type: object
            description: Update a modifier group. Admin role required.
            required:
                - client
            properties:
                client:
                    type: integer
                    description: Wallet client id
                name:
                    type: string
                    maxLength: 100
                description:
                    type: string
                    maxLength: 255
                code:
                    type: string
                color:
                    type: string
        CreateModifierRequest:
            title: CreateModifierRequest
            type: object
            description: |
                Create a modifier. Prices are integers in minor units (e.g. 1500 = 15.00).
                Use modifiers_group_ids to attach to groups after creating the group via POST /modifiers-groups.
            required:
                - client
                - name
                - official_name
                - tax
                - tag
            properties:
                client:
                    type: integer
                    description: Wallet client id
                name:
                    type: string
                    description: Display name
                official_name:
                    type: string
                    description: Name on receipt
                tax:
                    type: integer
                    description: Tax id
                tag:
                    type: integer
                    description: Tag / category id
                selling_price:
                    type: integer
                    description: Customer price in minor units
                stock_price:
                    type: integer
                    description: Cost price in minor units
                modifiers_group_ids:
                    type: array
                    description: Modifier group uids to attach this modifier to
                    items:
                        type: integer
                filter:
                    type: integer
                    description: Optional filter id for price list on create
                code:
                    type: string
                color:
                    type: string
                kitchen_name:
                    type: string
                sku_code:
                    type: integer
                unit:
                    type: integer
                description:
                    type: string
                is_favorite:
                    type: integer
                    description: 0 or 1
                image:
                    type: integer
                    description: Image id
                imageUrl:
                    type: string
        UpdateModifierRequest:
            title: UpdateModifierRequest
            type: object
            description: |
                Update a modifier. Admin role required.
                If modifiers_group_ids is provided, it replaces all group links.
            required:
                - client
            properties:
                client:
                    type: integer
                    description: Wallet client id
                name:
                    type: string
                official_name:
                    type: string
                tax:
                    type: integer
                tag:
                    type: integer
                selling_price:
                    type: integer
                    description: Updates price for active/default filter
                stock_price:
                    type: integer
                modifiers_group_ids:
                    type: array
                    description: Replaces all group links when provided
                    items:
                        type: integer
                code:
                    type: string
                color:
                    type: string
                kitchen_name:
                    type: string
                sku_code:
                    type: integer
                unit:
                    type: integer
                description:
                    type: string
                is_favorite:
                    type: integer
                image:
                    type: integer
                imageUrl:
                    type: string
        Product:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      tag:
                          type: integer
                      kitchen_name:
                          type: string
                      official_name:
                          type: string
                      is_favourite:
                          type: integer
                      stock_price:
                          type: integer
                      selling_price:
                          type: integer
                      code:
                          type: string
                      sku_code:
                          type: string
                      quantity:
                          type: integer
                      client:
                          type: integer
                      color:
                          type: string
                      weight:
                          type: integer
                      description:
                          type: string
                      type:
                          type: integer
                      integration:
                          type: string
                      type_text:
                          type: string
                      not_kitchen:
                          type: integer
                      is_visible:
                          type: integer
                      inventory_on_variants:
                          type: integer
                      closed_for_discount:
                          type: integer
                          description: 0 or 1
            x-examples: {}
        EProduct:
            allOf:
                - $ref: "#/components/schemas/Product"
                - type: object
                  properties:
                      tax0:
                          $ref: "#/components/schemas/Tax"
                      tax_in_stay0:
                          $ref: "#/components/schemas/Tax"
                      tag0:
                          $ref: "#/components/schemas/Tag"
                      unit0:
                          $ref: "#/components/schemas/Unit"
                      image0:
                          $ref: "#/components/schemas/Image"
                      product_variances:
                          type: array
                          items:
                              $ref: "#/components/schemas/ProductVariance"
                      modifier_group:
                          $ref: "#/components/schemas/EModifierGroup"
                      product_barcods:
                          type: array
                          items:
                              $ref: "#/components/schemas/ProductBarCode"
        MenuItems:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      menu:
                          type: integer
                      quantity:
                          type: integer
                      percentage:
                          type: integer
                      product:
                          type: integer
                      productVariance:
                          type: integer
                      product0:
                          $ref: "#/components/schemas/EProduct"
                      product_variance0:
                          $ref: "#/components/schemas/ProductVariance"
                      modifier0:
                          $ref: "#/components/schemas/EModifier"
        Menu:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      official_name:
                          type: string
                      printer_name:
                          type: string
                      color:
                          type: string
                      client:
                          type: integer
                      tag:
                          type: integer
                      is_favorite:
                          type: integer
                      price:
                          type: integer
                      is_visible:
                          type: integer
                      tag_name:
                          type: string
                      product_count:
                          type: integer
                      closed_for_discount:
                          type: integer
                          description: 0 or 1
        EMenu:
            allOf:
                - $ref: "#/components/schemas/Menu"
                - type: object
                  properties:
                      tag0:
                          $ref: "#/components/schemas/ETag"
                      image0:
                          $ref: "#/components/schemas/Image"
                      menu_items:
                          type: array
                          items:
                              $ref: "#/components/schemas/MenuItems"
                      closed_for_discount:
                          type: integer
                          description: 0 or 1
        ProductFilterRel:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      filter:
                          type: integer
                      product:
                          type: integer
                      modifier:
                          type: integer
                      product_variance:
                          type: integer
                      menu:
                          type: integer
                      favorite:
                          type: integer
                      visible:
                          type: integer
                      selling_price:
                          type: integer
                      tag:
                          type: integer
                      sub_tag:
                          type: integer
                      filter_item:
                          type: integer
                      position:
                          type: integer
                      menu0:
                          $ref: "#/components/schemas/EMenu"
                      filter0:
                          $ref: "#/components/schemas/Filter"
                      product0:
                          $ref: "#/components/schemas/EProduct"
                      modifier0:
                          $ref: "#/components/schemas/EModifier"
                      sub_tag0:
                          $ref: "#/components/schemas/ETag"
        FilterItemRel:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      filter:
                          type: integer
                      tag:
                          type: integer
                      product_filter:
                          type: integer
                      position:
                          type: integer
                      tag0:
                          $ref: "#/components/schemas/ETag"
                      product_filter0:
                          $ref: "#/components/schemas/ProductFilterRel"
        TableBasketItem:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      selling_price:
                          type: integer
                      custom_price:
                          type: integer
                      total_price:
                          type: integer
                      total_price_no_discount:
                          type: integer
                      discount_margin:
                          type: integer
                      discount_type:
                          type: integer
                      discount:
                          type: integer
                      discount_reason_id:
                          type: integer
                      quantity:
                          type: integer
                      menu_quantity:
                          type: number
                      menu_percentage:
                          type: number
                      name:
                          type: string
                      course:
                          type: integer
                      sent:
                          type: integer
                      printed:
                          type: integer
                      note:
                          type: string
                      table_basket:
                          type: integer
                      menu_parent:
                          type: integer
                      product_variance:
                          type: integer
                      menu:
                          type: integer
                      tax:
                          type: integer
                      product:
                          type: integer
                      product_variance0:
                          type: integer
                      menu0:
                          type: integer
                      tax0:
                          type: integer
                      model:
                          type: integer
                      gift_coupon:
                          type: integer
                      coupon0:
                          type: integer
                      item_hash:
                          type: integer
                      is_included:
                          type: integer
                      modifier_gp_id:
                          type: integer
                      tax_type:
                          type: integer
                      printer_types:
                          type: object
        GiftCoupon:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      code:
                          type: string
                      initial_amount:
                          type: integer
                      current_amount:
                          type: integer
                      active:
                          type: integer
                      expired:
                          type: boolean
                      exhausted:
                          type: boolean
                      activated_by:
                          type: integer
                      client:
                          type: integer
                      cash_register:
                          type: integer
                      type:
                          type: integer
                      type_text:
                          type: string
                      payment_type:
                          type: integer
                      voucher_number:
                          type: integer
                      external_number:
                          type: integer
                      activated_time:
                          type: string
                      expiry_date:
                          type: string
                      comment:
                          type: string
                      change_message:
                          type: string
                      customer_id:
                          type: integer
        DiscountReason:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      client:
                          type: integer
        BasketProduct:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      quantity:
                          type: integer
                      product:
                          type: integer
                      total:
                          type: integer
                      basket:
                          type: integer
                      name:
                          type: string
                      product_name:
                          type: string
                      course:
                          type: integer
                      sent:
                          type: integer
                      comment:
                          type: string
                      printed:
                          type: integer
                      product_variance:
                          type: integer
                      discount_type:
                          type: integer
                      discount:
                          type: number
                      discount_reason_id:
                          type: integer
                      total_stock:
                          type: integer
                      custom_price:
                          type: integer
                      unit:
                          type: integer
                      mixed:
                          type: integer
                      total_no_tax:
                          type: integer
                      tax:
                          type: integer
                      vat_percentage:
                          type: number
                      tag:
                          type: integer
                      menu:
                          type: integer
                      gift_coupon:
                          type: integer
                      total_no_discount:
                          type: integer
                      discount_margin:
                          type: integer
                      tax_margin:
                          type: integer
                      model:
                          type: integer
                      selling_price:
                          type: integer
                      selling_price_no_discount:
                          type: integer
                      total_minus_basket_discount:
                          type: integer
                      modifiers_amount:
                          type: integer
                      is_included:
                          type: integer
                      modifier_gp_id:
                          type: integer
                      tax_type:
                          type: integer
                      product0:
                          $ref: "#/components/schemas/EProduct"
                      product_variance0:
                          $ref: "#/components/schemas/ProductVariance"
                      tax0:
                          $ref: "#/components/schemas/Tax"
                      unit0:
                          $ref: "#/components/schemas/Unit"
                      menu0:
                          $ref: "#/components/schemas/EMenu"
                      coupon0:
                          $ref: "#/components/schemas/GiftCoupon"
                      discount_reason0:
                          $ref: "#/components/schemas/DiscountReason"
        IntegrationCustomers:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      customer_id:
                          type: integer
                      type:
                          type: integer
                      credit_limit:
                          type: integer
                      integrationNumber:
                          type: string
        DiscountGroup:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      discount:
                          type: number
                      discount_on_children:
                          type: integer
        Customer:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      mail:
                          type: string
                      phone:
                          type: string
                      prefix_country_id:
                          type: integer
                      client:
                          type: integer
                      address:
                          type: integer
                      address_text:
                          type: string
                      vat_no:
                          type: string
                      account_type:
                          type: integer
                      type:
                          type: integer
                      custom_number:
                          type: string
                      comment:
                          type: string
                      subscribed:
                          type: integer
                      discount_group_tags:
                          type: object
                      customer_number:
                          type: string
                      extend_integration:
                          $ref: "#/components/schemas/IntegrationCustomers"
                      address0:
                          $ref: "#/components/schemas/Address"
                      discount_group:
                          $ref: "#/components/schemas/DiscountGroup"
            x-examples: {}
        Account:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      username:
                          type: string
                      first_name:
                          type: string
                      middle_name:
                          type: string
                      last_name:
                          type: string
                      title:
                          type: string
                      verified_time:
                          type: integer
                      hidden_account:
                          type: integer
                      mobile:
                          type: string
                      full_name:
                          type: string
                      lang:
                          type: string
        Invoice:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      basket:
                          type: integer
                      due_date:
                          type: string
                      comment:
                          type: string
                      reference_no:
                          type: string
        BasketItem:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
        BasketType:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
        TakeawayOrder:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
        Basket:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      type:
                          type: integer
                      type_text:
                          type: string
                      total_amount:
                          type: integer
                      client:
                          type: integer
                      discount:
                          type: integer
                      disount_type:
                          type: string
                      discount_reason_id:
                          type: integer
                      customer:
                          type: integer
                      account:
                          type: integer
                      canceled:
                          type: integer
                      canceled_formatted:
                          type: string
                      branch:
                          type: integer
                      cash_register:
                          type: integer
                      table:
                          type: integer
                      total_stock_amount:
                          type: integer
                      total_no_tax:
                          type: integer
                      card_data:
                          type: object
                      status:
                          type: object
                      canceled_note:
                          type: object
                      deleted_note:
                          type: string
                      order_hash:
                          type: string
                      order_id:
                          type: integer
                      sequence_number:
                          type: integer
                      frame_text:
                          type: string
                      canceled_frame_text:
                          type: string
                      cash_return:
                          type: object
                      terminal_type:
                          type: integer
                      sales:
                          type: integer
                      fiscal_data:
                          type: object
                      copied_formatted:
                          type: string
                      parent:
                          type: integer
                      total_no_discount:
                          type: integer
                      discount_margin:
                          type: integer
                      warning:
                          type: string
                      extra_amount:
                          type: integer
                      tips:
                          type: integer
                      is_cancelable:
                          type: boolean
                      return_reason:
                          type: integer
                      currency_exchange_rate:
                          type: integer
                      total_in_custom_currency:
                          type: integer
                      currency_symbol:
                          type: string
                      currency_letters:
                          type: string
                      currency_icon_number:
                          type: integer
                      mobile_payment:
                          type: object
                          properties:
                              provider:
                                  type: integer
                              transaction_id:
                                  type: integer
                      external_id:
                          type: integer
                      card_type:
                          type: string
                      is_external_request:
                          type: boolean
                      name:
                          type: string
                          description: name for the basket
            x-examples: {}
        EBasket:
            allOf:
                - $ref: "#/components/schemas/Basket"
                - type: object
                  properties:
                      basket_items:
                          type: array
                          items:
                              $ref: "#/components/schemas/BasketItem"
                      basket_types:
                          type: array
                          items:
                              $ref: "#/components/schemas/BasketType"
                      coupon0:
                          $ref: "#/components/schemas/GiftCoupon"
                      tax_data:
                          type: array
                          items:
                              type: object
                              properties:
                                  vat_type:
                                      type: integer
                                  total_tax:
                                      type: number
                      invoice0:
                          $ref: "#/components/schemas/Invoice"
                      account0:
                          $ref: "#/components/schemas/Account"
                      customer0:
                          $ref: "#/components/schemas/Customer"
                      discount_reason0:
                          $ref: "#/components/schemas/DiscountReason"
                      takeaway_order0:
                          $ref: "#/components/schemas/TakeawayOrder"
        CreateBasketRequest:
            type: object
            properties:
                order_hash:
                    type: string
                    description: |
                        order unique id should be unique per client
                discount_type:
                    type: integer
                    enum:
                        - 0
                        - 1
                    description: |
                        0 - percentage discount 1 - amount discount
                discount:
                    type: integer
                    description: |
                        amount of discount when discount type is percentage discount [0]
                discount_margin:
                    type: integer
                    description: |
                        amount of discount when discount type is amount discount [1]
                parked_order:
                    type: integer
                    description: |
                        uid of parked order
                extend_reference_text:
                    type: string
                code:
                    type: string
                return_reason:
                    type: integer
                comment:
                    type: string
                creation_time:
                    type: integer
                    description: |
                        unix timestamp
                cash_register:
                    type: integer
                type:
                    type: integer
                    description: |
                        type of payment > default payment types are: > 0 - CARD 1 - MOBILE 2 - GIFT 3 - CASH 4 - MIXED 6 - INVOICE
                table_id:
                    type: integer
                cash_invoice:
                    type: integer
                card_data:
                    type: string
                    description: json encoded device card data
                frame_text:
                    type: string
                staff:
                    type: integer
                customer:
                    type: integer
                cash_return:
                    type: object
                    properties:
                        received:
                            type: integer
                        returned:
                            type: integer
                basket_items:
                    type: array
                    items:
                        type: object
                        properties:
                            course:
                                type: integer
                            discount_reason_id:
                                type: integer
                            menu:
                                type: integer
                            product:
                                type: integer
                            product_variance:
                                type: integer
                            name:
                                type: string
                            discount_type:
                                type: integer
                                enum:
                                    - 0
                                    - 1
                                description: |
                                    0 - percentage discount 1 - amount discount
                            discount:
                                type: integer
                                description: |
                                    amount of discount when discount type is percentage discount [0]
                            discount_margin:
                                type: integer
                                description: |
                                    amount of discount when discount type is amount discount [1]
                            selling_price:
                                type: integer
                            amount:
                                type: integer
                            quantity:
                                type: integer
                            comment:
                                type: string
                            code:
                                type: string
                            text:
                                type: string
                            gift_coupon:
                                type: integer
                            item_hash:
                                type: string
                            customer_name:
                                type: string
                            customer_mail:
                                type: string
                            tax_type:
                                type: integer
                basket_types:
                    type: array
                    items:
                        type: object
                        properties:
                            type:
                                type: integer
                            amount:
                                type: integer
                            code:
                                type: string
                            frame_text:
                                type: string
                            card_data:
                                type: string
                            cash_return:
                                type: integer
                            currency_exchange_rate:
                                type: integer
                            total_in_custom_currency:
                                type: integer
                name:
                    type: string
        CreateAccessTokenRequest:
            type: object
            properties:
                username:
                    type: string
                password:
                    type: string
            x-examples:
                example-1: {}
        AccessToken:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      account:
                          $ref: "#/components/schemas/Account"
                      accessToken:
                          type: string
        CreateProductRequest:
            title: CreateProductRequest
            type: object
            description: Object used to create new product
            properties:
                name:
                    type: string
                    description: name of the product
                    maxLength: 255
                kitchen_name:
                    type: string
                    description: kitchen name of the product
                    maxLength: 255
                official_name:
                    type: string
                    description: official name of the product
                    maxLength: 255
                selling_price:
                    type: integer
                    description: selling price in cent
                stock_price:
                    type: integer
                    description: stock price in cent
                client:
                    type: integer
                    description: client id of client that this product belongs to
                image:
                    type: integer
                    description: image id
                code:
                    type: string
                    description: bar code of the product
                color:
                    type: string
                    description: color attached to the product for example \#ffffffaa
                    maxLength: 9
                unit:
                    type: integer
                    description: unit id
                tax:
                    type: integer
                    description: takeaway tax id
                tax_in_stay:
                    type: integer
                    description: stay in tax id
                tag:
                    type: integer
                    description: tag id
                sku_code:
                    type: string
                    description: sku code
                    maxLength: 50
                inventory_on_variants:
                    type: integer
                    description: weather inventory fo variants should be calculated on variants or on products with applied percentage
                closed_for_discount:
                    type: integer
                    description: 0 or 1
            required:
                - official_name
                - client
                - tag
        UpdateProductRequest:
            title: UpdateProductRequest
            type: object
            description: Object used to update new product
            properties:
                name:
                    type: string
                    description: name of the product
                    maxLength: 255
                kitchen_name:
                    type: string
                    description: kitchen name of the product
                    maxLength: 255
                official_name:
                    type: string
                    description: official name of the product
                    maxLength: 255
                selling_price:
                    type: integer
                    description: selling price in cent
                stock_price:
                    type: integer
                    description: stock price in cent
                image:
                    type: integer
                    description: image id
                code:
                    type: string
                    description: bar code of the product
                color:
                    type: string
                    description: color attached to the product for example \#ffffffaa
                    maxLength: 9
                unit:
                    type: integer
                    description: unit id
                tax:
                    type: integer
                    description: takeaway tax id
                tax_in_stay:
                    type: integer
                    description: stay in tax id
                tag:
                    type: integer
                    description: tag id
                sku_code:
                    type: string
                    description: sku code
                    maxLength: 50
                inventory_on_variants:
                    type: integer
                    description: weather inventory fo variants should be calculated on variants or on products with applied percentage
                closed_for_discount:
                    type: integer
                    description: 0 or 1
        CreateTagRequest:
            title: CreateTagRequest
            type: object
            description: Object used to create new tag
            x-examples: {}
            properties:
                name:
                    type: string
                color:
                    type: string
                "image:":
                    type: integer
                parent_id:
                    type: integer
                client:
                    type: integer
                integration_accounts:
                    type: array
                    items:
                        type: object
                        properties:
                            tax_id:
                                type: integer
                            account:
                                type: integer
        TagIntegrationAccount:
            title: TagIntegrationAccount
            allOf:
                - type: object
                  properties:
                      tag_id:
                          type: integer
                      account:
                          type: integer
                      tax_id:
                          type: integer
                - $ref: "#/components/schemas/AbstractModel"
        PaymentType:
            title: PaymentType
            type: object
            properties:
                name:
                    type: string
                client:
                    type: integer
                is_active:
                    type: integer
                is_used:
                    type: integer
                currency_exchange_rate:
                    type: integer
                cn_currency_iso_nr:
                    type: integer
                currency_name:
                    type: string
                currency_letters:
                    type: string
                currency_symbol:
                    type: string
                deleted:
                    type: integer
                icon_number:
                    type: integer
                icon:
                    type: string
                custom_amounts:
                    type: array
                    items:
                        type: integer
            description: ""
        CreatePaymentRequest:
            title: CreatePaymentRequest
            type: object
            description: ""
            properties:
                name:
                    type: string
                is_active:
                    type: integer
                icon_number:
                    type: integer
                client:
                    type: integer
                account:
                    type: integer
        UpdateTaxRequest:
            title: UpdateTaxRequest
            type: object
            properties:
                uid:
                    type: string
                code:
                    type: string
        Webhook:
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      client:
                          type: integer
                      name:
                          type: string
                      url:
                          type: string
                      type:
                          type: integer
        CreateWebhookRequest:
            title: CreateWebhookRequest
            type: object
            properties:
                name:
                    type: string
                client:
                    type: integer
                url:
                    type: string
                type:
                    type: integer
                    enum:
                        - 1
                        - 2
                        - 3
                        - 4
                        - 5
                        - 6
                        - 7
                    description: |-
                        1 - Create Basket
                        2 - Create Product
                        3 - Edit Product
                        4 - Delete Product
                        5 - Inventory Status Below 0
                        6 - Inventory Status Changed
                        7 - End Of Day Created
            required:
                - name
                - client
                - url
                - type
        UpdateWebhookRequest:
            title: UpdateWebhookRequest
            type: object
            properties:
                type:
                    type: integer
                    enum:
                        - 1
                        - 2
                        - 3
                        - 4
                        - 5
                        - 6
                        - 7
                    description: |-
                        1 - Create Basket
                        2 - Create Product
                        3 - Edit Product
                        4 - Delete Product
                        5 - Inventory Status Below 0
                        6 - End Of Day Created
                url:
                    type: string
                client:
                    type: integer
                name:
                    type: string
        CounterItem:
            title: CounterItem
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      name:
                          type: string
                      tag:
                          type: integer
                      kitchen_name:
                          type: string
                      official_name:
                          type: string
                      is_favourite:
                          type: integer
                      stock_price:
                          type: integer
                      selling_price:
                          type: integer
                      code:
                          type: string
                      sku_code:
                          type: string
                      quantity:
                          type: integer
                      client:
                          type: integer
                      color:
                          type: string
                      weight:
                          type: integer
                      description:
                          type: string
                      type:
                          type: integer
                      integration:
                          type: string
                      type_text:
                          type: string
                      not_kitchen:
                          type: integer
                      is_visible:
                          type: integer
                      inventory_on_variants:
                          type: integer
        EntityHistory:
            title: EntityHistory
            type: object
            properties:
                uid:
                    type: integer
                before_value:
                    type: object
                after_value:
                    type: object
                entity_id:
                    type: integer
                filter_id:
                    type: integer
                account:
                    type: integer
                creation_time:
                    type: string
                filter0:
                    $ref: "#/components/schemas/Filter"
                account0:
                    $ref: "#/components/schemas/Account"
        TableBasket:
            title: TableBasket
            allOf:
                - $ref: "#/components/schemas/AbstractModel"
                - type: object
                  properties:
                      table:
                          type: integer
                      cash_register:
                          type: integer
                      total:
                          type: integer
                      total_no_discount:
                          type: integer
                      discount:
                          type: integer
                      discount_margin:
                          type: integer
                      discount_type:
                          type: integer
                      item_count:
                          type: integer
                      payment_count:
                          type: integer
                      order_hash:
                          type: string
                      type:
                          type: integer
                      auto_print_failed:
                          type: integer
                      external_id:
                          type: string
                      is_final_price:
                          type: integer
                      device_uid:
                          type: string
                      number_of_persons:
                          type: integer
                      extra_data:
                          type: object
                      editable:
                          type: integer
                      klipkort_voucher:
                          type: integer
        CreateCustomerRequest:
            title: CreateCustomerRequest
            type: object
            x-tags:
                - customers
            properties:
                name:
                    type: string
                    maxLength: 255
                mail:
                    type: string
                    format: email
                phone:
                    type: string
                prefix_country_id:
                    type: integer
                client:
                    type: integer
                vat_no:
                    type: string
                    maxLength: 255
                discount_group:
                    type: string
                comment:
                    type: string
                account_type:
                    type: string
                custom_number:
                    type: string
                ean_number:
                    type: string
                    maxLength: 255
            required:
                - name
        UpdateCustomerRequest:
            title: UpdateCustomerRequest
            type: object
            x-tags:
                - customers
            properties:
                name:
                    type: string
                mail:
                    type: string
                phone:
                    type: string
                prefix_country_id:
                    type: integer
                client:
                    type: integer
                vat_no:
                    type: string
                    maxLength: 255
                discount_group:
                    type: string
                comment:
                    type: string
                account_type:
                    type: string
                custom_number:
                    type: string
                ean_number:
                    type: string
                    maxLength: 255
        CreateMenuRequest:
            title: CreateMenuRequest
            type: object
            x-tags:
                - menus
            properties:
                name:
                    type: string
                official_name:
                    type: string
                printer_name:
                    type: string
                tag:
                    type: integer
                    description: id  of tag
                price:
                    type: integer
                    description: price in cent
                color:
                    type: string
                image:
                    type: integer
                description:
                    type: string
                products:
                    type: array
                    items:
                        type: object
                        properties:
                            percentage:
                                type: integer
                            products:
                                type: array
                                description: product ids that are allowed in this part of menu
                                items:
                                    type: integer
                            quantity:
                                type: integer
                client:
                    type: integer
                closed_for_discount:
                    type: integer
                    description: 0 or 1
        UpdateMenuRequest:
            title: UpdateMenuRequest
            type: object
            x-tags:
                - Menus
            properties:
                name:
                    type: string
                official_name:
                    type: string
                printer_name:
                    type: string
                tag:
                    type: integer
                    description: id  of tag
                price:
                    type: integer
                    description: price in cent
                color:
                    type: string
                image:
                    type: integer
                description:
                    type: string
                products:
                    type: array
                    items:
                        type: object
                        properties:
                            percentage:
                                type: integer
                            products:
                                type: array
                                description: product ids that are allowed in this part of menu
                                items:
                                    type: integer
                            quantity:
                                type: integer
                client:
                    type: integer
                closed_for_discount:
                    type: integer
                    description: 0 or 1
        Room:
            title: Room
            type: object
            properties:
                uid:
                    type: string
                name:
                    type: string
                branch:
                    type: integer
                position:
                    type: integer
                tables_count:
                    type: integer
        CreateRoom:
            title: CreateRoom
            type: object
            properties:
                name:
                    type: string
                branch:
                    type: integer
                position:
                    type: integer
        CreateDiscountGroupRequest:
            title: CreateDiscountGroupRequest
            type: object
            properties:
                name:
                    type: string
                client:
                    type: integer
                    description: client uid
                discount_on_children:
                    type: integer
                    description: |-
                        allowed values
                        0 => use discount same discount for each tag 
                        1 => use discount on each tag separately
                    enum:
                        - "0"
                        - "1"
                discount:
                    type: number
                    description: "discount percentage "
                    example: 50.5
                discount_group_tags:
                    type: array
                    items:
                        type: object
                        properties:
                            tag:
                                type: integer
                                description: tag uid
                            discount:
                                type: number
                                description: discount percentage
                                example: 50.5
        EDiscountGroup:
            title: EDiscountGroup
            allOf:
                - $ref: "#/components/schemas/DiscountGroup"
                - type: object
                  properties:
                      discount_group_tags:
                          type: object
                          properties:
                              uid:
                                  type: string
                              tag:
                                  type: string
                              discount:
                                  type: string
                              discount_group:
                                  type: string
                              tag0:
                                  $ref: "#/components/schemas/ETag"
        CreateAccountRequest:
            title: CreateAccountRequest
            type: object
            properties:
                username:
                    type: string
                password:
                    type: string
        UpdateAccountRequest:
            title: UpdateAccountRequest
            type: object
            properties:
                username:
                    type: string
                password:
                    type: string
                new_password:
                    type: string
                confirm_password:
                    type: string
                first_name:
                    type: string
                last_name:
                    type: string
                middle_name:
                    type: string
                mobile:
                    type: string
        CreateClientRequest:
            title: CreateClientRequest
            type: object
            properties:
                email:
                    type: string
                    format: email
                name:
                    type: string
                phone:
                    type: string
                website:
                    type: string
                    format: uri
                account_no:
                    type: string
                reg_no:
                    type: string
                vat_no:
                    type: string
                logo:
                    type: integer
                    description: id of logo image created by images endpoint
                image:
                    type: integer
                    description: id of image created by images endpoint
                opening_hours:
                    type: array
                    deprecated: true
                    items:
                        type: integer
                description:
                    type: string
                client_type_uid:
                    description: uid of client type returned from "categories" endpoint
                    type: integer
                time_zone:
                    type: integer
                    description: time zone id returned from "time-zones" endpoint
                custom_receipt_text:
                    type: string
                utm_tags:
                    type: object
                enable_menu_continue_prices:
                    type: integer
                    description: allow menu to continue use product price inside menu
                    enum:
                        - 0
                        - 1
                    default: 0
                use_cheaper_menu:
                    type: integer
                    enum:
                        - 0
                        - 1
                inventory_branch:
                    type: integer
                    description: branch id that manage client inventory
                address:
                    type: object
                    properties:
                        street_name:
                            type: string
                        zip_code:
                            type: number
                        city_name:
                            type: string
                        country:
                            type: string
                            description: iso code of country
                            example: DK
                        cc_name:
                            type: string
                        name:
                            type: string
                        building:
                            type: string
                        floor:
                            type: string
                        number:
                            type: string
                account:
                    type: object
                    description: "update account data "
                    properties:
                        first_name:
                            type: string
                        last_name:
                            type: string
                        mobile:
                            type: string
                        email:
                            type: string
                            format: email
        AllBarcode:
            type: object
            properties:
                code:
                    type: string
                type:
                    type: string
                type_id:
                    type: integer
                client:
                    type: integer
