Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/specification/checkout-mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thinking is that the current model is more explicit: we already have currency at the checkout object level - https://github.com/Universal-Commerce-Protocol/ucp/blob/main/source/schemas/shopping/checkout.json#L74 - and our expectation is that all amounts in the checkout object should follow that currency field.

},
"quantity": 12,
"totals": [...]
}
],
"totals": [...],
"messages": [
{
"type": "warning",
Expand Down
12 changes: 9 additions & 3 deletions docs/specification/checkout-rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
21 changes: 11 additions & 10 deletions docs/specification/discount.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,9 @@ stacking and allocation details:
"line_items": [
{
"item": {
"id": "prod_shirt",
"quantity": 2,
"price": 2500
}
"id": "prod_shirt"
},
"quantity": 2
}
]
}
Expand Down Expand Up @@ -331,10 +330,8 @@ proceeding to checkout.
{
"item": {
"id": "prod_1",
"quantity": 2,
"title": "T-Shirt",
"price": 2000
}
},
"quantity": 2
}
],
"discounts": {
Expand All @@ -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},
Expand Down Expand Up @@ -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},
Expand Down Expand Up @@ -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},
Expand All @@ -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},
Expand Down
4 changes: 2 additions & 2 deletions source/schemas/shopping/discount.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
Expand Down
Loading