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

Add a menu product to the cart

POST
/api/method/public/online-ordering/add-to-cart
Creates the cart when needed and appends the requested menu product. The API automatically enforces that the product belongs to the same brand/branch as the access token and that the online store matches.

Request

Authorization
Add parameter in header
X-Access-Token
Example:
X-Access-Token: ********************
Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
Updated cart snapshot after the product was added.
Body

🟠401Unauthorized
🟠403Forbidden
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '/api/method/public/online-ordering/add-to-cart' \
--header 'X-Access-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "cart_id": "string",
    "item": {
        "menu_product": "string",
        "qty": 0,
        "notes": "string"
    },
    "modifiers": [
        {
            "modifier_menu_product": "string",
            "modifier_group": "string",
            "qty": 0,
            "notes": "string"
        }
    ]
}'
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
Retrieve the assigned online store
Next
Update a cart item
Built with