Fodista Public APIs
  1. Online Ordering
Fodista Public APIs
  • 👋 Introduction
  • 📋 Prerequisites
  • ⚠️ Disclaimer
  • Invoice History
    • Retrieve POS invoice history
      GET
  • Public Menu
    • List menu categories
      GET
    • List menu products
      GET
    • Fetch a single menu product
      GET
  • Online Ordering
    • Retrieve the assigned online store
      GET
    • Add a menu product to the cart
      POST
    • Update a cart item
      PUT
    • Remove menu products from the cart
      POST
    • Get cart totals
      GET
    • Get cart details
      GET
    • Update cart details
      PUT
    • Get address from coordinates
      GET
    • Checkout
      POST
    • List currently online branches
      GET
  • POS Ordering
    • Submit POS orders
      POST
  • General
    • Get External Job status
      GET
  • Schemas
    • Schemas
    • ErrorResponse
    • InvoiceTax
    • InvoiceSummary
    • CartTotals
    • CartModifier
    • CartItem
    • CartItemRequest
    • CartModifierRequest
    • CartSummary
    • CustomerPayload
    • MenuProductOrderType
    • MenuProductOptionCombination
    • MenuProductOptions
    • MenuProductModifierSettings
    • MenuProductModifierOption
    • MenuProductModifier
    • MenuProduct
    • MenuCategory
    • PosOrderRequest
    • PosOrder
    • PosOrderItem
    • PosOrderModifier
    • PosOrderTax
    • PosOrderPayment
    • PosOrderSubmitResponse
    • ExternalJobStatusResponse
  1. Online Ordering

Get cart details

GET
/api/method/public/online-ordering/get-cart-details
Fetches everything the storefront needs to render the basket: customer details, order type, products, modifiers, taxes and the checkout eligibility flag. The data is always limited to the online store assigned to the access token.

Request

Authorization
Add parameter in header
X-Access-Token
Example:
X-Access-Token: ********************
Query Params

Responses

🟢200OK
application/json
Complete cart summary including products, modifiers and taxes.
Body

🟠401Unauthorized
🟠403Forbidden
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request GET '/api/method/public/online-ordering/get-cart-details?cart_id' \
--header 'X-Access-Token: <api-key>'
Response Response Example
200 - Example 1
{
    "cart_id": "string",
    "net_total": 0,
    "total_taxes_and_charges": 0,
    "additional_discount_percentage": 0,
    "discount_amount": 0,
    "grand_total": 0,
    "prepare_at": "14:15:22.123Z",
    "prepare_at_specific_time": 0,
    "rounding_adjustment": 0,
    "rounded_total": 0,
    "currency": "string",
    "restaurant_branch": "string",
    "table": "string",
    "mode_of_payment": "string",
    "order_type": "string",
    "apartment_no": "string",
    "building_no": "string",
    "address_line1": "string",
    "city": "string",
    "state": "string",
    "phone": "string",
    "customer_name": "string",
    "lat": "string",
    "lon": "string",
    "online_store": "string",
    "promo_code": "string",
    "can_checkout": 0,
    "items": [
        {
            "name": "string",
            "menu_product": "string",
            "modifier_menu_product": "string",
            "item_name": "string",
            "description": "string",
            "qty": 0,
            "rate": 0,
            "net_rate": 0,
            "amount": 0,
            "net_amount": 0,
            "notes": "string",
            "modifier_group": "string",
            "index": 0,
            "modifier_for_index": 0,
            "modifiers": [
                {
                    "modifier_menu_product": "string",
                    "modifier_group": "string",
                    "qty": 0,
                    "notes": "string",
                    "rate": 0,
                    "net_rate": 0,
                    "amount": 0,
                    "net_amount": 0,
                    "index": 0,
                    "modifier_for_index": 0,
                    "property1": "string",
                    "property2": "string"
                }
            ],
            "property1": "string",
            "property2": "string"
        }
    ],
    "taxes": [
        {
            "title": "string",
            "tax_amount": 0,
            "tax_amount_after_discount_amount": 0
        }
    ],
    "property1": "string",
    "property2": "string"
}
Previous
Get cart totals
Next
Update cart details
Built with