diff --git a/specification/schemas/return-orders/ItemReasonQuestion.json b/specification/schemas/return-orders/ItemReasonQuestion.json index 63fe94b9..62881244 100644 --- a/specification/schemas/return-orders/ItemReasonQuestion.json +++ b/specification/schemas/return-orders/ItemReasonQuestion.json @@ -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 return-question `code` attribute." }, "answer": { diff --git a/specification/schemas/return-questions/CreateReturnQuestionRequest.json b/specification/schemas/return-questions/CreateReturnQuestionRequest.json index 5c1629bc..2ac7821e 100644 --- a/specification/schemas/return-questions/CreateReturnQuestionRequest.json +++ b/specification/schemas/return-questions/CreateReturnQuestionRequest.json @@ -11,7 +11,7 @@ "properties": { "code": { "type": "string", - "example": "wrong-item", + "example": "product-used", "description": "A unique code for the return question." }, "description": { @@ -21,7 +21,7 @@ }, { "example": { - "en-GB": "What size would you like in return?" + "en-GB": "Has the product been used or worn?" } } ] diff --git a/specification/schemas/return-questions/PatchReturnQuestionRequest.json b/specification/schemas/return-questions/PatchReturnQuestionRequest.json index 2ed7025b..35aedc2c 100644 --- a/specification/schemas/return-questions/PatchReturnQuestionRequest.json +++ b/specification/schemas/return-questions/PatchReturnQuestionRequest.json @@ -16,7 +16,7 @@ }, { "example": { - "en-GB": "What size would you like in return?" + "en-GB": "Has the product been used or worn?" } } ] diff --git a/specification/schemas/return-questions/ReturnQuestion.json b/specification/schemas/return-questions/ReturnQuestion.json index 813242bf..6911dec0 100644 --- a/specification/schemas/return-questions/ReturnQuestion.json +++ b/specification/schemas/return-questions/ReturnQuestion.json @@ -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": [ @@ -32,7 +32,7 @@ }, { "example": { - "en-GB": "What size would you like in return?" + "en-GB": "Has the product been used or worn?" } } ] diff --git a/specification/schemas/return-questions/ReturnQuestionAnswerType.json b/specification/schemas/return-questions/ReturnQuestionAnswerType.json index 0f5b044e..178db1a8 100644 --- a/specification/schemas/return-questions/ReturnQuestionAnswerType.json +++ b/specification/schemas/return-questions/ReturnQuestionAnswerType.json @@ -4,6 +4,5 @@ "string", "boolean" ], - "example": "string", "description": "The type of answer expected for this question." } diff --git a/specification/schemas/return-reasons/ShopReturnReason.json b/specification/schemas/return-reasons/ShopReturnReason.json index acb81161..23f31891 100644 --- a/specification/schemas/return-reasons/ShopReturnReason.json +++ b/specification/schemas/return-reasons/ShopReturnReason.json @@ -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" + } + ] } } } diff --git a/specification/schemas/return-reasons/ShopReturnReasonQuestion.json b/specification/schemas/return-reasons/ShopReturnReasonQuestion.json index 50a57923..55f2004f 100644 --- a/specification/schemas/return-reasons/ShopReturnReasonQuestion.json +++ b/specification/schemas/return-reasons/ShopReturnReasonQuestion.json @@ -9,7 +9,13 @@ "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", @@ -17,19 +23,21 @@ "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." } } } diff --git a/specification/schemas/return-reasons/ShopReturnReasonResponse.json b/specification/schemas/return-reasons/ShopReturnReasonResponse.json index 90b046e3..8fa517de 100644 --- a/specification/schemas/return-reasons/ShopReturnReasonResponse.json +++ b/specification/schemas/return-reasons/ShopReturnReasonResponse.json @@ -18,7 +18,17 @@ "requires_attachments", "accepts_comment", "requires_comment" - ] + ], + "properties": { + "questions": { + "items": { + "required": [ + "answer_type", + "description" + ] + } + } + } }, "links": { "readOnly": true, diff --git a/specification/schemas/returns/GetReturnItem.json b/specification/schemas/returns/GetReturnItem.json index 22a052af..ffc2d4d6 100644 --- a/specification/schemas/returns/GetReturnItem.json +++ b/specification/schemas/returns/GetReturnItem.json @@ -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": [ @@ -146,7 +146,7 @@ }, { "example": { - "en-GB": "What size would you like in return?" + "en-GB": "Has the product been used or worn?" } } ]