POST /api/v1/storefront/cart/items — Add a line (wraps add-cart-item).

API
POST/api/v1/storefront/cart/items

Agregar línea al carrito

Requiere sesión del comprador, no el token del ERP

Agrega una línea al carrito.

Solicitud

json
{
  "producto-id": 1,
  "qty": 2,
  "opciones": [ { "opcion-id": 11, "qty": 2 } ]
}

Respuesta

json
{cart DTO}

Código

bash
curl -X POST 'https://tu-tienda.com/api/v1/storefront/cart/items' \
  -H 'x-vxm-customer-token: CUSTOMER_SESSION_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{ "producto-id": 1, "qty": 2, "opciones": [ { "opcion-id": 11, "qty": 2 } ] }'

Probá el endpoint

https://tu-tienda.com/api/v1/storefront/cart/items
Necesitás un token para probar los endpoints. Generalo desde Configuración → ERP → API Token.