Add a product to the account cart
add_to_cartAdd a product to the authenticated user's Alza account cart by Alza product code, with optional quantity (1-99).
Instructions
Add one product to the authenticated user's Alza account cart by its Alza product code (the code from search_products/get_product, e.g. RI054b1 — not the numeric id). Use when the user wants a product put into their Alza account; pass quantity (default 1, max 99). Side effect: mutates the user's cart — the item stays there until removed or ordered (there is no basket-remove tool). Do not use for the anonymous web checkout cart — that is web_add_to_cart. Requires a loaded mobile API access token — check account_status first; if none is loaded, run auth_start, have the user complete the browser sign-in, then auth_exchange with the returned code and state. The response echoes the added line and the new basket count; verify with cart if in doubt. Example: add_to_cart({code: "RI054b1", quantity: 1}).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Alza product code, e.g. 'RI054b1' (the `code` field from `search_products`). | |
| quantity | No | How many units to add. Default 1, max 99. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| err | No | ||
| msg | No | ||
| data | No |