-
Notifications
You must be signed in to change notification settings - Fork 425
Expand file tree
/
Copy pathorder.json
More file actions
94 lines (94 loc) · 2.75 KB
/
Copy pathorder.json
File metadata and controls
94 lines (94 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ucp.dev/schemas/shopping/order.json",
"name": "dev.ucp.shopping.order",
"title": "Order",
"description": "Order schema with immutable line items, buyer-facing fulfillment expectations, and append-only event logs.",
"$defs": {
"platform_schema": {
"title": "Platform Order Schema",
"description": "Platform's order capability configuration.",
"type": "object",
"required": [
"webhook_url"
],
"properties": {
"webhook_url": {
"type": "string",
"format": "uri",
"description": "URL where merchant sends order lifecycle events (webhooks)."
}
}
}
},
"type": "object",
"required": [
"ucp",
"id",
"checkout_id",
"permalink_url",
"line_items",
"fulfillment",
"totals"
],
"properties": {
"ucp": {
"$ref": "../ucp.json#/$defs/response_order_schema"
},
"id": {
"type": "string",
"description": "Unique order identifier."
},
"checkout_id": {
"type": "string",
"description": "Associated checkout ID for reconciliation."
},
"permalink_url": {
"type": "string",
"format": "uri",
"description": "Permalink to access the order on merchant site."
},
"line_items": {
"type": "array",
"items": {
"$ref": "types/order_line_item.json"
},
"description": "Immutable line items — source of truth for what was ordered."
},
"fulfillment": {
"type": "object",
"properties": {
"expectations": {
"type": "array",
"items": {
"$ref": "types/expectation.json"
},
"description": "Buyer-facing groups representing when/how items will be delivered. Can be split, merged, or adjusted post-order."
},
"events": {
"type": "array",
"items": {
"$ref": "types/fulfillment_event.json"
},
"description": "Append-only event log of actual shipments. Each event references line items by ID."
}
},
"description": "Fulfillment data: buyer expectations and what actually happened."
},
"adjustments": {
"type": "array",
"items": {
"$ref": "types/adjustment.json"
},
"description": "Append-only event log of money movements (refunds, returns, credits, disputes, cancellations, etc.) that exist independently of fulfillment."
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code. MUST match the currency from the originating checkout session."
},
"totals": {
"$ref": "types/totals.json",
"description": "Different totals for the order."
}
}
}