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.

After creating a checkout, you need to attach a delivery address and time slot before submitting. checkout slots lists available delivery slots for a given address, and checkout set-delivery locks in your choice. Both steps are fully reversible — they reserve nothing irreversibly until checkout submit --yes is run.

Synopsis

mercadona checkout slots --address <id> [flags]
mercadona checkout set-delivery --checkout <id> --address <id> --slot <id> [flags]

checkout slots Flags

FlagRequiredDescription
--address <id>Delivery address ID (integer, from checkout create or checkout addresses)
--jsonEmit raw slots JSON

checkout set-delivery Flags

FlagRequiredDescription
--checkout <id>Checkout ID
--address <id>Delivery address ID (integer)
--slot <id>Delivery slot ID (string)
--max <eur>Refuse if total (products + delivery fee) exceeds this amount
--jsonEmit raw response JSON

Complete Delivery Selection Flow

# 1. Create checkout and capture IDs in one call
CREATE=$(mercadona checkout create --json)
CHK=$(echo "$CREATE" | jq -r '.id')
ADDR=$(echo "$CREATE" | jq -r '.address.id')

# Or list addresses separately
mercadona checkout addresses

# 2. Browse available slots
mercadona checkout slots --address $ADDR --json

# 3. Attach address + slot
mercadona checkout set-delivery --checkout $CHK --address $ADDR --slot <slot-id> --max 90

Slots JSON Shape

The checkout slots command returns a paginated list of available delivery windows:
{
  "next_page": null,
  "results": [
    {
      "id": "slot-abc123",
      "start": "2025-01-15T09:00:00+01:00",
      "end": "2025-01-15T11:00:00+01:00",
      "price": "8.20",
      "available": true,
      "open": true
    }
  ]
}
Note the type difference: slot id is a string; address id is an integer. Pass them to the matching flags accordingly — --slot slot-abc123 and --address 12345.
next_page in the slots response is used to paginate across available windows. If no slots show "available": true for a given address, check "open" on each entry and try another address with checkout addresses, or query slots again on a different date. Slots are fetched from GET /api/customers/<id>/addresses/<addr>/slots/ — they live under the address, not the checkout.
Set --max on checkout set-delivery to cover products plus the delivery fee — the slot price (shown in the price field, typically ~8.20€) is added to your order total at this step, not at checkout create. A basket capped at 80€ should use --max 90 here.

Build docs developers (and LLMs) love