diff --git a/docs/specification/checkout-mcp.md b/docs/specification/checkout-mcp.md index 26182fea..b4c51c8d 100644 --- a/docs/specification/checkout-mcp.md +++ b/docs/specification/checkout-mcp.md @@ -656,10 +656,16 @@ as JSON-RPC `result` with `structuredContent` containing the UCP envelope and "line_items": [ { "id": "li_1", - "quantity": 100, - "available_quantity": 12 + "item": { + "id": "item_123", + "title": "Blue Jeans", + "price": 5000 + }, + "quantity": 12, + "totals": [...] } ], + "totals": [...], "messages": [ { "type": "warning", diff --git a/docs/specification/checkout-rest.md b/docs/specification/checkout-rest.md index 4c365c38..7197cc20 100644 --- a/docs/specification/checkout-rest.md +++ b/docs/specification/checkout-rest.md @@ -1291,11 +1291,17 @@ with HTTP 200 and the UCP envelope containing `messages`: "status": "incomplete", "line_items": [ { - "id": "item_456", - "quantity": 100, - "available_quantity": 12 + "id": "li_1", + "item": { + "id": "item_123", + "title": "Blue Jeans", + "price": 5000 + }, + "quantity": 12, + "totals": [...] } ], + "totals": [...], "messages": [ { "type": "warning", diff --git a/docs/specification/discount.md b/docs/specification/discount.md index 5dcc976a..8fffbece 100644 --- a/docs/specification/discount.md +++ b/docs/specification/discount.md @@ -246,10 +246,9 @@ stacking and allocation details: "line_items": [ { "item": { - "id": "prod_shirt", - "quantity": 2, - "price": 2500 - } + "id": "prod_shirt" + }, + "quantity": 2 } ] } @@ -331,10 +330,8 @@ proceeding to checkout. { "item": { "id": "prod_1", - "quantity": 2, - "title": "T-Shirt", - "price": 2000 - } + }, + "quantity": 2 } ], "discounts": { @@ -353,10 +350,10 @@ proceeding to checkout. "id": "li_1", "item": { "id": "prod_1", - "quantity": 2, "title": "T-Shirt", "price": 2000 }, + "quantity": 2, "totals": [ {"type": "subtotal", "amount": 4000}, {"type": "items_discount", "amount": -800}, @@ -448,10 +445,10 @@ to line items, and an automatic shipping discount at the order level. "id": "li_1", "item": { "id": "prod_1", - "quantity": 2, "title": "T-Shirt", "price": 2000 }, + "quantity": 2, "totals": [ {"type": "subtotal", "amount": 4000}, {"type": "items_discount", "amount": -800}, @@ -545,9 +542,11 @@ Multiple discounts applied with full allocation breakdown: { "id": "li_1", "item": { + "id": "prod_1", "title": "T-Shirt", "price": 6000 }, + "quantity": 1, "totals": [ {"type": "subtotal", "amount": 6000}, {"type": "items_discount", "amount": -1500}, @@ -557,9 +556,11 @@ Multiple discounts applied with full allocation breakdown: { "id": "li_2", "item": { + "id": "prod_2", "title": "Socks", "price": 4000 }, + "quantity": 1, "totals": [ {"type": "subtotal", "amount": 4000}, {"type": "items_discount", "amount": -1000}, diff --git a/source/schemas/shopping/discount.json b/source/schemas/shopping/discount.json index f4dd7eea..85c3a228 100644 --- a/source/schemas/shopping/discount.json +++ b/source/schemas/shopping/discount.json @@ -92,11 +92,11 @@ }, "applied": { "type": "array", - "readOnly": true, "items": { "$ref": "#/$defs/applied_discount" }, - "description": "Discounts successfully applied (code-based and automatic)." + "description": "Discounts successfully applied (code-based and automatic).", + "ucp_request": "omit" } } },