Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ivorpad/mercadona-cli/llms.txt

Use this file to discover all available pages before exploring further.

mercadona cart get fetches your current cart and displays each line with the product name, quantity, unit price, and a calculated subtotal. It requires a valid authenticated session. Pass --json to receive the raw cart API response on stdout instead of the human-readable view.

Synopsis

mercadona cart get [flags]

Flags

FlagDefaultDescription
--wh <code>config/mad1Warehouse code
--lang <code>config/esLanguage code (es, en, ca, eu, vai)
--jsonfalseEmit raw cart JSON to stdout

Examples

mercadona cart get
mercadona cart get --json
mercadona cart get --json | jq -r '.summary.total'

Human output format

Each cart line is rendered as [id] display_name — qty × unit_price€ = subtotal€ when the API returns a price for that line. If no price is available (the product was added in a different warehouse session, for example), the fallback format is [id] qty × display_name. The header line shows the cart ID, schema version, product count, and running total.
cart abc123  (v7, 3 productos, total 18.56€)
  [10379] Leche entera Hacendado — 2 × 5.76€ = 11.52€
  [13406] Mayonesa Hacendado — 2 × 1.20€ = 2.40€
  [51110] Queso rallado mozzarella pizza-Roma Hacendado — 3 × 1.60€ = 4.80€
When the basket total is below the 60€ home-delivery minimum, a hint is printed beneath the line list:
  ⚠ faltan 41.44€ para el mínimo de pedido de 60€

JSON output shape

With --json, the command echoes the raw GET response from the cart API. The product object is nested under each line, carrying the display name and price instructions:
{
  "id": "<cart-id>",
  "version": 7,
  "products_count": 3,
  "open_order_id": null,
  "lines": [
    {
      "quantity": 2.0,
      "sources": [],
      "product": {
        "id": "10379",
        "display_name": "Leche entera Hacendado",
        "price_instructions": {
          "unit_price": "5.76",
          "reference_price": "0.960",
          "reference_format": "L"
        }
      }
    }
  ],
  "summary": {"total": "18.56"}
}
quantity is a float — the API returns 1.0 for unit items; weight and bulk products can carry fractional values. unit_price is what you pay per item as sold; reference_price/reference_format is the per-unit comparison (e.g. 0.960 €/L).
The Mercadona cart API is eventually consistent — a read issued immediately after a write may return the pre-write state for a moment. If cart get shows results that look stale right after an add, set, or set-many, simply re-run it. The view converges within a second or two.

Build docs developers (and LLMs) love