Skip to content

Commit 5ee68ab

Browse files
committed
fix: address review comments on return schema and specification
1 parent e5990c8 commit 5ee68ab

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

docs/specification/return.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ requirements of a purchase before completion.
131131

132132
### Business Responsibilities
133133

134+
**For Policy References:**
135+
136+
- **MUST** ensure every `return_policy_id` on a line item resolves to a key present in the top-level `return_policies` registry.
137+
134138
**For Policy Locking:**
135139

136140
- **MUST** honor the return policy that was in effect at the time of order placement; that policy MUST be sourced from the Order resource (when available) rather than recomputed from current merchant rules. The return policy returned at checkout response time is the policy in effect for the buyer at that moment.
@@ -169,6 +173,7 @@ assurance:
169173
**For Absent Policy Data:**
170174

171175
- **MUST NOT** infer items are non-returnable if the Return capability is advertised in discovery but `return_policies` is absent or empty in a checkout response. Platforms SHOULD fall back to general merchant return info (e.g., via the merchant's profile URL).
176+
- **MUST** treat unresolved policy references (`return_policy_id` without a matching key in `return_policies`) as having no stated return policy (per the Absent Policy Data rule) and **MUST NOT** infer the item is non-returnable.
172177

173178
**Interpretation of Policy States:**
174179

source/schemas/shopping/return.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"properties": {
1313
"return_period_in_days": {
1414
"type": "integer",
15-
"description": "Length of the merchant's return window in days, measured from the date of delivery. This is a policy statement — it communicates the window duration, not a pre-computed deadline."
15+
"minimum": 0,
16+
"description": "Length of the merchant's return window in days, measured from the date of delivery. This is a policy statement — it communicates the window duration, not a pre-computed deadline. A value of 0 explicitly indicates the items are non-returnable (final sale)."
1617
},
1718
"supported_resolutions": {
1819
"type": "array",
@@ -108,7 +109,8 @@
108109
"properties": {
109110
"return_policy_id": {
110111
"type": "string",
111-
"description": "ID of the return policy that applies to this line item. Must reference a key in the top-level return_policies map."
112+
"description": "ID of the return policy that applies to this line item. Must reference a key in the top-level return_policies map.",
113+
"ucp_request": "omit"
112114
}
113115
}
114116
}

0 commit comments

Comments
 (0)