name: Orders
description: |-

  APIs for managing orders in POS
endpoints:
  -
    custom: []
    httpMethods:
      - GET
    uri: api/v1/tenant/orders
    metadata:
      custom: []
      groupName: Orders
      groupDescription: |-

        APIs for managing orders in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'List Orders'
      description: 'Get paginated list of orders with filters'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters: []
    cleanUrlParameters: []
    queryParameters:
      status:
        custom: []
        name: status
        description: 'Filter by status (pending, confirmed, preparing, ready, served, completed, cancelled).'
        required: false
        example: pending
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      payment_status:
        custom: []
        name: payment_status
        description: 'Filter by payment status (pending, paid, refunded).'
        required: false
        example: pending
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      order_type:
        custom: []
        name: order_type
        description: 'Filter by type (dine_in, takeaway, delivery).'
        required: false
        example: dine_in
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      table_id:
        custom: []
        name: table_id
        description: 'Filter by table.'
        required: false
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      date_from:
        custom: []
        name: date_from
        description: 'Filter from date (Y-m-d).'
        required: false
        example: '2025-11-01'
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      date_to:
        custom: []
        name: date_to
        description: 'Filter to date (Y-m-d).'
        required: false
        example: '2025-11-30'
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      page:
        custom: []
        name: page
        description: 'Page number.'
        required: false
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      per_page:
        custom: []
        name: per_page
        description: 'Items per page (max 100).'
        required: false
        example: 15
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
    cleanQueryParameters:
      status: pending
      payment_status: pending
      order_type: dine_in
      table_id: 1
      date_from: '2025-11-01'
      date_to: '2025-11-30'
      page: 1
      per_page: 15
    bodyParameters: []
    cleanBodyParameters: []
    fileParameters: []
    responses:
      -
        custom: []
        status: 200
        content: |-
          {
            "success": true,
            "data": [],
            "meta": {
              "pagination": {}
            }
          }
        headers: []
        description: ''
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
  -
    custom: []
    httpMethods:
      - GET
    uri: 'api/v1/tenant/orders/{id}'
    metadata:
      custom: []
      groupName: Orders
      groupDescription: |-

        APIs for managing orders in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'Get Single Order'
      description: 'Get detailed order information'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters:
      id:
        custom: []
        name: id
        description: 'Order ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
    cleanUrlParameters:
      id: 1
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters: []
    cleanBodyParameters: []
    fileParameters: []
    responses:
      -
        custom: []
        status: 401
        content: '{"message":"Unauthenticated."}'
        headers:
          cache-control: 'no-cache, private'
          content-type: application/json
          access-control-allow-origin: '*'
        description: null
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
  -
    custom: []
    httpMethods:
      - POST
    uri: api/v1/tenant/orders
    metadata:
      custom: []
      groupName: Orders
      groupDescription: |-

        APIs for managing orders in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'Create Order'
      description: 'Create a new order from POS'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters: []
    cleanUrlParameters: []
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters:
      order_type:
        custom: []
        name: order_type
        description: 'Order type (dine_in, takeaway, delivery).'
        required: true
        example: dine_in
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      table_id:
        custom: []
        name: table_id
        description: 'for dine_in. Table ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        deprecated: false
      customer_id:
        custom: []
        name: customer_id
        description: 'optional Existing customer ID.'
        required: false
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        deprecated: false
      customer_name:
        custom: []
        name: customer_name
        description: 'optional Customer name if not registered.'
        required: false
        example: 'John Doe'
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        deprecated: false
      customer_phone:
        custom: []
        name: customer_phone
        description: 'optional Customer phone.'
        required: false
        example: '+1234567890'
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        deprecated: false
      customer_email:
        custom: []
        name: customer_email
        description: 'Must be a valid email address. Must not be greater than 255 characters.'
        required: false
        example: breitenberg.gilbert@example.com
        type: string
        enumValues: []
        exampleWasSpecified: false
        nullable: true
        deprecated: false
      notes:
        custom: []
        name: notes
        description: 'optional Order notes.'
        required: false
        example: 'VIP customer'
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        deprecated: false
      discount:
        custom: []
        name: discount
        description: 'optional Discount amount.'
        required: false
        example: 5.0
        type: number
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        deprecated: false
      items:
        custom: []
        name: items
        description: 'Order items.'
        required: true
        example:
          -
            menu_item_id: 1
            quantity: 2
            price: 12.99
            notes: 'No onions'
            modifiers: []
        type: 'string[]'
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      'items[].menu_item_id':
        custom: []
        name: 'items[].menu_item_id'
        description: 'Menu item ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      'items[].quantity':
        custom: []
        name: 'items[].quantity'
        description: Quantity.
        required: true
        example: 2
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      'items[].price':
        custom: []
        name: 'items[].price'
        description: 'Unit price.'
        required: true
        example: 12.99
        type: number
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      'items[].notes':
        custom: []
        name: 'items[].notes'
        description: 'optional Special instructions.'
        required: false
        example: 'No onions'
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        deprecated: false
      'items[].modifiers':
        custom: []
        name: 'items[].modifiers'
        description: 'optional Modifiers.'
        required: false
        example:
          -
            id: 1
            name: 'Extra Cheese'
            price: 2
        type: 'string[]'
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        deprecated: false
    cleanBodyParameters:
      order_type: dine_in
      table_id: 1
      customer_id: 1
      customer_name: 'John Doe'
      customer_phone: '+1234567890'
      customer_email: breitenberg.gilbert@example.com
      notes: 'VIP customer'
      discount: 5.0
      items:
        -
          menu_item_id: 1
          quantity: 2
          price: 12.99
          notes: 'No onions'
          modifiers: []
    fileParameters: []
    responses:
      -
        custom: []
        status: 201
        content: |-
          {
            "success": true,
            "message": "Order created successfully",
            "data": {}
          }
        headers: []
        description: ''
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
  -
    custom: []
    httpMethods:
      - PUT
    uri: 'api/v1/tenant/orders/{id}'
    metadata:
      custom: []
      groupName: Orders
      groupDescription: |-

        APIs for managing orders in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'Update Order'
      description: 'Update order details'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters:
      id:
        custom: []
        name: id
        description: 'The ID of the order.'
        required: true
        example: architecto
        type: string
        enumValues: []
        exampleWasSpecified: false
        nullable: false
        deprecated: false
    cleanUrlParameters:
      id: architecto
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters:
      customer_id:
        custom: []
        name: customer_id
        description: 'The <code>id</code> of an existing record in the customers table.'
        required: false
        example: null
        type: string
        enumValues: []
        exampleWasSpecified: false
        nullable: true
        deprecated: false
      customer_name:
        custom: []
        name: customer_name
        description: 'Must not be greater than 255 characters.'
        required: false
        example: b
        type: string
        enumValues: []
        exampleWasSpecified: false
        nullable: true
        deprecated: false
      customer_phone:
        custom: []
        name: customer_phone
        description: 'Must not be greater than 20 characters.'
        required: false
        example: ngzmiyvdljnikhwa
        type: string
        enumValues: []
        exampleWasSpecified: false
        nullable: true
        deprecated: false
      notes:
        custom: []
        name: notes
        description: ''
        required: false
        example: architecto
        type: string
        enumValues: []
        exampleWasSpecified: false
        nullable: true
        deprecated: false
    cleanBodyParameters:
      customer_name: b
      customer_phone: ngzmiyvdljnikhwa
      notes: architecto
    fileParameters: []
    responses: []
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
  -
    custom: []
    httpMethods:
      - POST
    uri: 'api/v1/tenant/orders/{id}/status'
    metadata:
      custom: []
      groupName: Orders
      groupDescription: |-

        APIs for managing orders in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'Update Order Status'
      description: 'Update order status (pending → confirmed → preparing → ready → served → completed)'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters:
      id:
        custom: []
        name: id
        description: 'Order ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
    cleanUrlParameters:
      id: 1
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters:
      status:
        custom: []
        name: status
        description: 'New status.'
        required: true
        example: confirmed
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
    cleanBodyParameters:
      status: confirmed
    fileParameters: []
    responses:
      -
        custom: []
        status: 200
        content: |-
          {
            "success": true,
            "message": "Order status updated",
            "data": {}
          }
        headers: []
        description: ''
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
  -
    custom: []
    httpMethods:
      - POST
    uri: 'api/v1/tenant/orders/{id}/items'
    metadata:
      custom: []
      groupName: Orders
      groupDescription: |-

        APIs for managing orders in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'Add Item to Order'
      description: 'Add additional items to existing order'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters:
      id:
        custom: []
        name: id
        description: 'Order ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
    cleanUrlParameters:
      id: 1
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters:
      menu_item_id:
        custom: []
        name: menu_item_id
        description: 'Menu item ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      quantity:
        custom: []
        name: quantity
        description: Quantity.
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      notes:
        custom: []
        name: notes
        description: 'optional Special instructions.'
        required: false
        example: 'Extra spicy'
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        deprecated: false
      modifiers:
        custom: []
        name: modifiers
        description: ''
        required: false
        example: null
        type: object
        enumValues: []
        exampleWasSpecified: false
        nullable: true
        deprecated: false
    cleanBodyParameters:
      menu_item_id: 1
      quantity: 1
      notes: 'Extra spicy'
    fileParameters: []
    responses: []
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
  -
    custom: []
    httpMethods:
      - DELETE
    uri: 'api/v1/tenant/orders/{id}/items/{itemId}'
    metadata:
      custom: []
      groupName: Orders
      groupDescription: |-

        APIs for managing orders in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'Remove Item from Order'
      description: 'Remove an item from order'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters:
      id:
        custom: []
        name: id
        description: 'Order ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      itemId:
        custom: []
        name: itemId
        description: 'Order item ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
    cleanUrlParameters:
      id: 1
      itemId: 1
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters: []
    cleanBodyParameters: []
    fileParameters: []
    responses: []
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
  -
    custom: []
    httpMethods:
      - POST
    uri: 'api/v1/tenant/orders/{id}/discount'
    metadata:
      custom: []
      groupName: Orders
      groupDescription: |-

        APIs for managing orders in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'Apply Discount'
      description: 'Apply discount to order'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters:
      id:
        custom: []
        name: id
        description: 'Order ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
    cleanUrlParameters:
      id: 1
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters:
      discount:
        custom: []
        name: discount
        description: 'Discount amount.'
        required: true
        example: 10.0
        type: number
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      discount_type:
        custom: []
        name: discount_type
        description: 'optional Type (amount or percentage).'
        required: false
        example: amount
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        deprecated: false
    cleanBodyParameters:
      discount: 10.0
      discount_type: amount
    fileParameters: []
    responses: []
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
  -
    custom: []
    httpMethods:
      - DELETE
    uri: 'api/v1/tenant/orders/{id}'
    metadata:
      custom: []
      groupName: Orders
      groupDescription: |-

        APIs for managing orders in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'Delete Order'
      description: 'Cancel/delete an order'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters:
      id:
        custom: []
        name: id
        description: 'The ID of the order.'
        required: true
        example: architecto
        type: string
        enumValues: []
        exampleWasSpecified: false
        nullable: false
        deprecated: false
    cleanUrlParameters:
      id: architecto
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters: []
    cleanBodyParameters: []
    fileParameters: []
    responses: []
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
  -
    custom: []
    httpMethods:
      - POST
    uri: api/v1/tenant/pos/quick-order
    metadata:
      custom: []
      groupName: Orders
      groupDescription: |-

        APIs for managing orders in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'Quick Order (POS Optimized)'
      description: 'Fast order creation with minimal fields for quick POS workflow'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters: []
    cleanUrlParameters: []
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters:
      table_id:
        custom: []
        name: table_id
        description: 'Table ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      items:
        custom: []
        name: items
        description: 'Items with just menu_item_id and quantity.'
        required: true
        example:
          -
            menu_item_id: 1
            quantity: 2
        type: 'string[]'
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      'items[].menu_item_id':
        custom: []
        name: 'items[].menu_item_id'
        description: 'The <code>id</code> of an existing record in the menu_items table.'
        required: true
        example: architecto
        type: string
        enumValues: []
        exampleWasSpecified: false
        nullable: false
        deprecated: false
      'items[].quantity':
        custom: []
        name: 'items[].quantity'
        description: 'Must be at least 1.'
        required: true
        example: 22
        type: integer
        enumValues: []
        exampleWasSpecified: false
        nullable: false
        deprecated: false
    cleanBodyParameters:
      table_id: 1
      items:
        -
          menu_item_id: 1
          quantity: 2
    fileParameters: []
    responses:
      -
        custom: []
        status: 201
        content: |-
          {
            "success": true,
            "message": "Order created successfully",
            "data": {}
          }
        headers: []
        description: ''
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
  -
    custom: []
    httpMethods:
      - POST
    uri: api/v1/tenant/pos/complete-order
    metadata:
      custom: []
      groupName: Orders
      groupDescription: |-

        APIs for managing orders in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'Complete Order (Quick Checkout)'
      description: 'Mark order as completed and process payment in one call (for POS)'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters:
      id:
        custom: []
        name: id
        description: 'Order ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
    cleanUrlParameters:
      id: 1
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters:
      payment_method:
        custom: []
        name: payment_method
        description: 'Payment method (cash, card, credit).'
        required: true
        example: cash
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      amount_paid:
        custom: []
        name: amount_paid
        description: 'optional Amount paid (for change calculation).'
        required: false
        example: 50.0
        type: number
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        deprecated: false
    cleanBodyParameters:
      payment_method: cash
      amount_paid: 50.0
    fileParameters: []
    responses:
      -
        custom: []
        status: 200
        content: |-
          {
            "success": true,
            "message": "Order completed successfully",
            "data": {
              "order": {},
              "change": 5.50
            }
          }
        headers: []
        description: ''
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
