add_to_cart – In den Warenkorb
Fügt ein Angebot hinzu. product_id wählt automatisch das Buy-Box-Angebot; offer_id ein bestimmtes (z. B. gebraucht oder anderer Verkäufer).
- HTTP
- POST /api/carts/{cart_id}/items
- Zugang
- Konto optional
- Bereich
- Warenkorb
- Nur lesend
- nein
Formular
Eingabeschema (JSON Schema)
{
"type": "object",
"properties": {
"cart_id": {
"type": "string",
"description": "Warenkorb-ID aus create_cart"
},
"product_id": {
"type": "string",
"description": "Produkt-ID, z. B. KI-EDGE-01 oder ABxxxxxxxx"
},
"offer_id": {
"type": "string",
"description": "Angebots-ID, z. B. off_1a2b3c4d5e6f"
},
"quantity": {
"type": "integer",
"minimum": 1,
"maximum": 99,
"description": "Menge (1–99)"
}
},
"required": [
"cart_id"
]
}
REST
curl -X POST https://anltx.com/api/carts/<cart_id>/items \
-H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
-d '{}'
MCP
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "add_to_cart",
"arguments": {
"cart_id": "<cart_id>"
}
}
}