{
  "$schema": "https://json-schema.org/draft-07/schema#",
  "title": "Quickmerce Liquid Context Schema",
  "description": "Machine-readable description of the Liquid context objects a Quickmerce storefront theme can read. Derived from the liquid-engine Context interfaces.",
  "version": "1.0.0",
  "generatedAt": "2026-07-24",
  "notes": [
    "All *price fields on product/variant/cart are in paise (₹1 = 100 paise); render with the `money` filter.",
    "collection.facets.priceRange and active_filters.min/maxPrice are in RUPEES, not paise.",
    "Both `main-menu` and `footer-menu` linklist handles are platform-guaranteed to resolve."
  ],
  "objects": [
    {
      "name": "shop",
      "description": "Storefront-wide information. Available in every template.",
      "availability": "global",
      "fields": [
        {
          "name": "name",
          "type": "string",
          "description": "Store / business name."
        },
        {
          "name": "currency",
          "type": "string",
          "description": "ISO currency code (e.g. INR)."
        },
        {
          "name": "slug",
          "type": "string",
          "description": "Store brand slug."
        },
        {
          "name": "primary_domain",
          "type": "string",
          "description": "Primary storefront domain."
        },
        {
          "name": "description",
          "type": "string",
          "nullable": true
        },
        {
          "name": "tagline",
          "type": "string",
          "nullable": true
        },
        {
          "name": "logo",
          "type": "string",
          "nullable": true,
          "description": "Logo image URL."
        },
        {
          "name": "seo_title",
          "type": "string",
          "nullable": true,
          "description": "SEO <title> override."
        },
        {
          "name": "seo_description",
          "type": "string",
          "nullable": true
        },
        {
          "name": "og_image",
          "type": "string",
          "nullable": true
        },
        {
          "name": "favicon",
          "type": "string",
          "nullable": true,
          "description": "Favicon URL (null until a logo is uploaded)."
        },
        {
          "name": "apple_touch_icon",
          "type": "string",
          "nullable": true
        },
        {
          "name": "web_manifest",
          "type": "string",
          "nullable": true
        },
        {
          "name": "cod_enabled",
          "type": "boolean",
          "description": "Cash-on-delivery available. Drives trust-strip copy."
        },
        {
          "name": "free_shipping_threshold",
          "type": "number",
          "description": "Free-shipping order value; 0 = none."
        },
        {
          "name": "delivery_check_enabled",
          "type": "boolean",
          "description": "Serviceability/pincode check available. Gate the PDP pincode checker on this."
        },
        {
          "name": "enabled_payment_types",
          "type": "string[]",
          "description": "Accepted payment methods (platform set + COD). Single source of truth for the payment-icon row."
        },
        {
          "name": "payment_icons_html",
          "type": "string",
          "description": "Pre-rendered payment-icon row. Output verbatim behind your own show_payment_icons toggle."
        }
      ]
    },
    {
      "name": "settings",
      "description": "Merchant's global theme settings, keyed by the ids declared in config/settings_schema.json (merged over the platform core-settings registry). Access as {{ settings.<id> }}.",
      "availability": "global",
      "fields": [
        {
          "name": "[id]",
          "type": "string | number | boolean",
          "description": "Value for each setting id you declare (e.g. settings.color_primary, settings.logo)."
        }
      ]
    },
    {
      "name": "cart",
      "description": "The customer's cart. Always present, may be empty.",
      "availability": "global",
      "fields": [
        {
          "name": "id",
          "type": "string"
        },
        {
          "name": "item_count",
          "type": "number"
        },
        {
          "name": "items",
          "type": "cart_item[]"
        },
        {
          "name": "total_price",
          "type": "number",
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "items_subtotal",
          "type": "number",
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "items_subtotal_price",
          "type": "number",
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "tax_total",
          "type": "number",
          "description": "Tax total in paise; 0 if no taxable items."
        },
        {
          "name": "tax_lines",
          "type": "{ name: string; rate: number; amount: number }[]",
          "description": "Per-rate tax breakdown."
        },
        {
          "name": "discount_total",
          "type": "number",
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "grand_total",
          "type": "number",
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "applied_discount_codes",
          "type": "string[]"
        },
        {
          "name": "note",
          "type": "string",
          "nullable": true
        }
      ]
    },
    {
      "name": "cart_item",
      "description": "A single cart line item (entry of cart.items).",
      "availability": "nested (cart.items[])",
      "fields": [
        {
          "name": "id",
          "type": "string"
        },
        {
          "name": "product_id",
          "type": "string"
        },
        {
          "name": "variant_id",
          "type": "string",
          "nullable": true
        },
        {
          "name": "quantity",
          "type": "number"
        },
        {
          "name": "title",
          "type": "string"
        },
        {
          "name": "variant_title",
          "type": "string",
          "nullable": true
        },
        {
          "name": "sku",
          "type": "string",
          "nullable": true
        },
        {
          "name": "url",
          "type": "string"
        },
        {
          "name": "image",
          "type": "string",
          "nullable": true
        },
        {
          "name": "image_url",
          "type": "string",
          "nullable": true,
          "description": "Alias of image."
        },
        {
          "name": "price",
          "type": "number",
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "final_price",
          "type": "number",
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "original_price",
          "type": "number",
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "unit_price",
          "type": "number",
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "line_price",
          "type": "number",
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "final_line_price",
          "type": "number",
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "original_line_price",
          "type": "number",
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        }
      ]
    },
    {
      "name": "customer",
      "description": "The signed-in customer, or null when not signed in.",
      "availability": "global (nullable)",
      "fields": [
        {
          "name": "id",
          "type": "string"
        },
        {
          "name": "name",
          "type": "string",
          "nullable": true
        },
        {
          "name": "first_name",
          "type": "string",
          "nullable": true
        },
        {
          "name": "email",
          "type": "string",
          "nullable": true
        },
        {
          "name": "phone",
          "type": "string"
        },
        {
          "name": "logged_in",
          "type": "boolean"
        }
      ]
    },
    {
      "name": "product",
      "description": "The product on a product page (templates/product.json).",
      "availability": "product pages, and nested in collection.products[] / search.results[]",
      "fields": [
        {
          "name": "id",
          "type": "string"
        },
        {
          "name": "title",
          "type": "string"
        },
        {
          "name": "handle",
          "type": "string"
        },
        {
          "name": "description",
          "type": "string",
          "nullable": true
        },
        {
          "name": "excerpt",
          "type": "string",
          "nullable": true
        },
        {
          "name": "url",
          "type": "string"
        },
        {
          "name": "type",
          "type": "string"
        },
        {
          "name": "vendor",
          "type": "string",
          "nullable": true,
          "description": "Brand/manufacturer; guard with {% if product.vendor %}."
        },
        {
          "name": "tags",
          "type": "string[]"
        },
        {
          "name": "images",
          "type": "{ url, alt_text, position }[]"
        },
        {
          "name": "featured_image",
          "type": "string",
          "nullable": true,
          "description": "First image URL."
        },
        {
          "name": "available",
          "type": "boolean"
        },
        {
          "name": "price",
          "type": "number",
          "description": "Lowest variant price. In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "compare_at_price",
          "type": "number",
          "nullable": true,
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "variants",
          "type": "variant[]"
        },
        {
          "name": "options",
          "type": "product_option[]",
          "description": "Use this for swatches/size pickers - never split variant.title."
        },
        {
          "name": "collections",
          "type": "{ id, title, handle }[]"
        },
        {
          "name": "rating",
          "type": "number",
          "description": "Average 0-5."
        },
        {
          "name": "rating_count",
          "type": "number"
        },
        {
          "name": "rating_breakdown",
          "type": "number[]",
          "description": "5-cell histogram; index 0 = 1-star."
        },
        {
          "name": "reviews",
          "type": "{ id, rating, title, body, images[], verified, reviewer_name, created_at }[]"
        },
        {
          "name": "seo_title",
          "type": "string",
          "nullable": true
        },
        {
          "name": "seo_description",
          "type": "string",
          "nullable": true
        },
        {
          "name": "is_featured",
          "type": "boolean"
        },
        {
          "name": "custom_fields",
          "type": "custom_field[]",
          "description": "Iterate for PDP accordion panels."
        },
        {
          "name": "custom_fields_by_key",
          "type": "{ [key]: custom_field }",
          "description": "Keyed accessor for a specific field."
        },
        {
          "name": "related_products",
          "type": "product[]",
          "description": "\"You may also like\" rail."
        }
      ]
    },
    {
      "name": "product_option",
      "description": "One option group on a product (Color / Size / Material / …). Branch on `kind`, not `name`.",
      "availability": "nested (product.options[])",
      "fields": [
        {
          "name": "id",
          "type": "string"
        },
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "kind",
          "type": "string",
          "description": "SIZE | COLOR | CAPACITY | MATERIAL | FRAME | WEIGHT | PACK_SIZE | FRAGRANCE | STYLE | CUSTOM."
        },
        {
          "name": "system",
          "type": "string",
          "nullable": true,
          "description": "null = freeform; a system id when canonical."
        },
        {
          "name": "position",
          "type": "number",
          "description": "1, 2, or 3."
        },
        {
          "name": "values",
          "type": "product_option_value[]"
        }
      ]
    },
    {
      "name": "product_option_value",
      "description": "A selectable value within a product option group.",
      "availability": "nested (product.options[].values[])",
      "fields": [
        {
          "name": "id",
          "type": "string"
        },
        {
          "name": "label",
          "type": "string",
          "description": "e.g. \"M\", \"Onyx\", \"27\"."
        },
        {
          "name": "sort_order",
          "type": "number"
        },
        {
          "name": "swatch_hex",
          "type": "string",
          "nullable": true,
          "description": "Resolved hex: merchant override → canonical → null."
        },
        {
          "name": "canonical",
          "type": "canonical_value",
          "nullable": true,
          "description": "Present when linked to the option taxonomy."
        }
      ]
    },
    {
      "name": "canonical_value",
      "description": "Canonical taxonomy data for an option value (sizes/colors).",
      "availability": "nested (…value.canonical)",
      "fields": [
        {
          "name": "id",
          "type": "string"
        },
        {
          "name": "system",
          "type": "string",
          "description": "e.g. \"apparel-alpha\"."
        },
        {
          "name": "label",
          "type": "string"
        },
        {
          "name": "regional_labels",
          "type": "{ in?, uk?, us_m?, us_w?, eu?, jp? }",
          "nullable": true,
          "description": "Present on size systems."
        },
        {
          "name": "body_measurements",
          "type": "{ chestCm?, waistCm?, … }",
          "nullable": true,
          "description": "Present on size systems."
        },
        {
          "name": "swatch_hex",
          "type": "string",
          "nullable": true
        }
      ]
    },
    {
      "name": "variant",
      "description": "A purchasable product variant.",
      "availability": "nested (product.variants[])",
      "fields": [
        {
          "name": "id",
          "type": "string"
        },
        {
          "name": "title",
          "type": "string"
        },
        {
          "name": "sku",
          "type": "string"
        },
        {
          "name": "price",
          "type": "number",
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "compare_at_price",
          "type": "number",
          "nullable": true,
          "description": "In paise (₹1 = 100 paise). Render via the `money` filter."
        },
        {
          "name": "available",
          "type": "boolean",
          "description": "Active AND in stock."
        },
        {
          "name": "inventory_quantity",
          "type": "number"
        },
        {
          "name": "option1",
          "type": "string",
          "nullable": true,
          "description": "Legacy variant string; prefer option_values."
        },
        {
          "name": "images",
          "type": "string[]"
        },
        {
          "name": "option_values",
          "type": "variant_option_value[]",
          "description": "Structured per-option-value links. Empty for un-backfilled variants."
        }
      ]
    },
    {
      "name": "variant_option_value",
      "description": "Which option value a variant carries per option group.",
      "availability": "nested (variant.option_values[])",
      "fields": [
        {
          "name": "option_id",
          "type": "string"
        },
        {
          "name": "option_name",
          "type": "string"
        },
        {
          "name": "option_kind",
          "type": "string"
        },
        {
          "name": "option_position",
          "type": "number"
        },
        {
          "name": "value_id",
          "type": "string"
        },
        {
          "name": "label",
          "type": "string"
        },
        {
          "name": "swatch_hex",
          "type": "string",
          "nullable": true
        },
        {
          "name": "canonical",
          "type": "canonical_value",
          "nullable": true
        }
      ]
    },
    {
      "name": "custom_field",
      "description": "Merchant-defined typed metafield attached to a product.",
      "availability": "nested (product.custom_fields[] / product.custom_fields_by_key{})",
      "fields": [
        {
          "name": "id",
          "type": "string"
        },
        {
          "name": "key",
          "type": "string",
          "description": "snake_case key for lookup."
        },
        {
          "name": "label",
          "type": "string",
          "description": "Merchant-facing label."
        },
        {
          "name": "type",
          "type": "string",
          "description": "TEXT | RICH_TEXT | IMAGE | IMAGE_LIST | VIDEO | URL | NUMBER | JSON_LIST."
        },
        {
          "name": "description",
          "type": "string",
          "nullable": true
        },
        {
          "name": "position",
          "type": "number",
          "description": "Sort order, 0 = first."
        },
        {
          "name": "value",
          "type": "string | number | string[] | object[]",
          "nullable": true,
          "description": "Resolved to the field's type."
        },
        {
          "name": "value_text",
          "type": "string",
          "nullable": true,
          "description": "TEXT, RICH_TEXT, URL, VIDEO."
        },
        {
          "name": "value_image",
          "type": "string",
          "nullable": true,
          "description": "IMAGE (single URL)."
        },
        {
          "name": "value_images",
          "type": "string[]",
          "description": "IMAGE_LIST (URL[])."
        },
        {
          "name": "value_number",
          "type": "number",
          "nullable": true,
          "description": "NUMBER."
        },
        {
          "name": "value_json",
          "type": "object[]",
          "nullable": true,
          "description": "JSON_LIST."
        }
      ]
    },
    {
      "name": "collection",
      "description": "The collection on a collection page (templates/collection.json). Also the shape of every entry in the global `collections` list.",
      "availability": "collection pages; and the global `collections` list/map",
      "fields": [
        {
          "name": "id",
          "type": "string"
        },
        {
          "name": "title",
          "type": "string"
        },
        {
          "name": "handle",
          "type": "string"
        },
        {
          "name": "description",
          "type": "string",
          "nullable": true
        },
        {
          "name": "image",
          "type": "string",
          "nullable": true
        },
        {
          "name": "url",
          "type": "string"
        },
        {
          "name": "products_count",
          "type": "number"
        },
        {
          "name": "seo_title",
          "type": "string",
          "nullable": true
        },
        {
          "name": "seo_description",
          "type": "string",
          "nullable": true
        },
        {
          "name": "show_in_nav",
          "type": "boolean"
        },
        {
          "name": "position",
          "type": "number"
        },
        {
          "name": "parent_id",
          "type": "string",
          "nullable": true
        },
        {
          "name": "children",
          "type": "collection[]",
          "description": "Sub-collections (only on top-level entries in the global map)."
        },
        {
          "name": "products",
          "type": "product[]",
          "description": "Paginated products (populated on collection pages and for referenced collections)."
        },
        {
          "name": "facets",
          "type": "facets",
          "nullable": true,
          "description": "Filter-sidebar source. null when opted out."
        }
      ]
    },
    {
      "name": "facets",
      "description": "Canonical filter data for the sidebar. Read from this; do not compute client-side.",
      "availability": "nested (collection.facets)",
      "fields": [
        {
          "name": "sizes",
          "type": "{ label, hex, count }[]",
          "description": "hex always null for sizes."
        },
        {
          "name": "colors",
          "type": "{ label, hex, count }[]"
        },
        {
          "name": "priceRange",
          "type": "{ min, max }",
          "description": "In RUPEES (not paise). Render raw as ₹{{ min }}."
        },
        {
          "name": "categories",
          "type": "{ label, count }[]"
        }
      ]
    },
    {
      "name": "linklists",
      "description": "Menus keyed by handle. Themes MUST iterate linklists['main-menu'].links (header) and linklists['footer-menu'].links (footer). Both handles are platform-guaranteed.",
      "availability": "global",
      "fields": [
        {
          "name": "[handle]",
          "type": "{ id, name, handle, links: link[] }",
          "description": "e.g. linklists['main-menu'], linklists['footer-menu']."
        }
      ]
    },
    {
      "name": "link",
      "description": "A navigation link (entry of linklists[handle].links).",
      "availability": "nested (linklists[handle].links[])",
      "fields": [
        {
          "name": "title",
          "type": "string"
        },
        {
          "name": "url",
          "type": "string"
        },
        {
          "name": "type",
          "type": "string",
          "description": "COLLECTION | PRODUCT | PAGE | URL | CATALOG."
        },
        {
          "name": "resource",
          "type": "object",
          "nullable": true
        },
        {
          "name": "links",
          "type": "link[]",
          "description": "Child links (dropdowns). Note: `links`, NOT `children`."
        }
      ]
    },
    {
      "name": "search",
      "description": "Search results on the /search page.",
      "availability": "search pages",
      "fields": [
        {
          "name": "terms",
          "type": "string",
          "description": "The query string."
        },
        {
          "name": "performed",
          "type": "boolean",
          "description": "True when a non-empty query ran."
        },
        {
          "name": "results",
          "type": "product[]"
        },
        {
          "name": "results_count",
          "type": "number"
        }
      ]
    },
    {
      "name": "page",
      "description": "A content page (templates/page.json).",
      "availability": "content pages",
      "fields": [
        {
          "name": "title",
          "type": "string"
        },
        {
          "name": "handle",
          "type": "string"
        },
        {
          "name": "content",
          "type": "string",
          "description": "Rich-text body HTML. Render via {{ page.content }}."
        }
      ]
    },
    {
      "name": "request",
      "description": "The current request.",
      "availability": "global",
      "fields": [
        {
          "name": "path",
          "type": "string"
        },
        {
          "name": "page_type",
          "type": "string",
          "description": "Template name: index | product | collection | …"
        },
        {
          "name": "locale",
          "type": "string"
        },
        {
          "name": "host",
          "type": "string"
        }
      ]
    },
    {
      "name": "routes",
      "description": "Canonical URLs for account-app routes - use instead of hardcoding paths.",
      "availability": "global",
      "fields": [
        {
          "name": "root",
          "type": "string"
        },
        {
          "name": "cart_url",
          "type": "string"
        },
        {
          "name": "search_url",
          "type": "string"
        },
        {
          "name": "collections_url",
          "type": "string"
        },
        {
          "name": "account_url",
          "type": "string"
        },
        {
          "name": "account_login_url",
          "type": "string"
        }
      ]
    },
    {
      "name": "active_filters",
      "description": "Parsed active filter state for the current collection/search page. Read from this rather than parsing request.path.",
      "availability": "collection/search pages",
      "fields": [
        {
          "name": "sortBy",
          "type": "string"
        },
        {
          "name": "sizes",
          "type": "string[]"
        },
        {
          "name": "colors",
          "type": "string[]"
        },
        {
          "name": "minPrice",
          "type": "number",
          "nullable": true,
          "description": "In RUPEES."
        },
        {
          "name": "maxPrice",
          "type": "number",
          "nullable": true,
          "description": "In RUPEES."
        },
        {
          "name": "inStockOnly",
          "type": "boolean"
        },
        {
          "name": "onSaleOnly",
          "type": "boolean"
        },
        {
          "name": "categoryHandles",
          "type": "string[]"
        },
        {
          "name": "minRating",
          "type": "number"
        },
        {
          "name": "q",
          "type": "string",
          "description": "Search query (on /search)."
        }
      ]
    },
    {
      "name": "paginate",
      "description": "Pagination state for the current collection page.",
      "availability": "collection pages",
      "fields": [
        {
          "name": "current_page",
          "type": "number"
        },
        {
          "name": "pages",
          "type": "number"
        },
        {
          "name": "items",
          "type": "number"
        },
        {
          "name": "page_size",
          "type": "number"
        },
        {
          "name": "next",
          "type": "number",
          "nullable": true
        },
        {
          "name": "previous",
          "type": "number",
          "nullable": true
        }
      ]
    }
  ]
}
