Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"properties": {
"code": {
"type": "string",
"example": "what-size",
"example": "product-used",
"description": "A code that identifies the question for the return of this item. See the <a href=\"/#tag/ReturnQuestions/paths/~1returns~1v1~1questions/get\">return-question</a> `code` attribute."
},
"answer": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"properties": {
"code": {
"type": "string",
"example": "wrong-item",
"example": "product-used",
"description": "A unique code for the return question."
},
"description": {
Expand All @@ -21,7 +21,7 @@
},
{
"example": {
"en-GB": "What size would you like in return?"
"en-GB": "Has the product been used or worn?"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
{
"example": {
"en-GB": "What size would you like in return?"
"en-GB": "Has the product been used or worn?"
}
}
]
Expand Down
8 changes: 4 additions & 4 deletions specification/schemas/return-questions/ReturnQuestion.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"code": {
"type": "string",
"maxLength": 255,
"example": "what-size",
"description": "What size would you like in return?"
"example": "product-used",
"description": "A unique code for the return question."
},
"description": {
"oneOf": [
{
"type": "string",
"description": "A localized return question description",
"example": "What size would you like in return?"
"example": "Has the product been used or worn?"
},
{
"allOf": [
Expand All @@ -32,7 +32,7 @@
},
{
"example": {
"en-GB": "What size would you like in return?"
"en-GB": "Has the product been used or worn?"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
"string",
"boolean"
],
"example": "string",
"description": "The type of answer expected for this question."
}
44 changes: 17 additions & 27 deletions specification/schemas/return-reasons/ShopReturnReason.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,34 +44,24 @@
"questions": {
"type": "array",
"items": {
"required": [
"code",
"description",
"answer_type",
"is_required"
],
"properties": {
"code": {
"type": "string"
},
"description": {
"type": "string"
},
"answer_type": {
"$ref": "#/components/schemas/ReturnQuestionAnswerType"
},
"is_required": {
"type": "boolean"
}
"$ref": "#/components/schemas/ShopReturnReasonQuestion"
},
"example": [
{
"code": "product-used",
"description": "Has the product been used or worn?",
"is_required": true,
"answer_type": "boolean",
"yes_note": "Used products may not be eligible for a full refund.",
"no_note": "Thank you for confirming the product is unused."
},
"example": [
{
"code": "what-size",
"description": "What size would you like instead?",
"is_required": true
}
]
}
{
"code": "preferred-size",
"description": "What size would you like instead?",
"is_required": false,
"answer_type": "string"
}
]
}
}
}
Expand Down
16 changes: 12 additions & 4 deletions specification/schemas/return-reasons/ShopReturnReasonQuestion.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,35 @@
"code": {
"type": "string",
"description": "The code of the shop return question",
"example": "what-size"
"example": "product-condition"
},
"description": {
"type": "string",
"readOnly": true,
"description": "The description of the shop return question. This is shown to the consumer in the return portal when they select a return reason with this question attached.",
"example": "Is the product still in its original packaging?"
},
"is_required": {
"type": "boolean",
"description": "Indication whether a consumer is required to answer this question related to the selected return reason",
"example": true
},
"answer_type": {
"$ref": "#/components/schemas/ReturnQuestionAnswerType"
"$ref": "#/components/schemas/ReturnQuestionAnswerType",
"readOnly": true,
"example": "boolean"
},
"yes_note": {
"type": "string",
"maxLength": 255,
"description": "A note to show the user when they answer a `boolean` type question with `true`. Will be shown in the return portal.",
"example": "This product can't be returned after its been used. Proceeding will lead to a rejected return request."
"example": "Great! Please ensure all tags and packaging materials are included."
},
"no_note": {
"type": "string",
"maxLength": 255,
"description": "A note to show the user when they answer a `boolean` type question with `false`. Will be shown in the return portal.",
"example": "This product cannot be returned after it was unsealed. Proceeding will lead to a rejected return request."
"example": "Products must be returned in original packaging. Proceeding may lead to a rejected return request."
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,17 @@
"requires_attachments",
"accepts_comment",
"requires_comment"
]
],
"properties": {
"questions": {
"items": {
"required": [
"answer_type",
"description"
]
}
}
}
},
"links": {
"readOnly": true,
Expand Down
4 changes: 2 additions & 2 deletions specification/schemas/returns/GetReturnItem.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
{
"type": "string",
"description": "A localized return question description",
"example": "What size would you like in return?"
"example": "Has the product been used or worn?"
},
{
"allOf": [
Expand All @@ -146,7 +146,7 @@
},
{
"example": {
"en-GB": "What size would you like in return?"
"en-GB": "Has the product been used or worn?"
}
}
]
Expand Down