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 whoami makes an authenticated request to verify your current session. It calls the Mercadona API and prints your customer ID on success. Use it after import-har, import-curl, or set-refresh to confirm authentication is working before issuing cart or checkout commands.
Synopsis
Flags
| Flag | Default | Description |
|---|---|---|
--wh <code> | config [defaults].warehouse, else mad1 | Warehouse code passed to the API request |
--lang <code> | config [defaults].lang, else es | Language for the API response |
--json | false | Emit raw customer JSON to stdout |
Examples
When to Use
Runwhoami any time you need to confirm a session is valid:
- After
import-harto verify the HAR was parsed correctly - After
import-curlto confirm the Bearer token was captured - After
set-refreshto confirm the refresh token auto-renewed successfully - When troubleshooting a
401error on cart or checkout commands
Common Failure Messages
| Message | Cause | Fix |
|---|---|---|
not authenticated: … | No usable session found | Run import-har or set-refresh to seed credentials |
401 token_not_valid | Access token expired | With a refresh token the CLI auto-renews; if it still fails, the refresh token has also rotated — re-export a HAR or re-run set-refresh |
a cookie alone does not authenticate the API | import-curl captured a cookie but no Bearer token | Re-copy a request that includes the authorization: Bearer … header |