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
Original file line number Diff line number Diff line change
Expand Up @@ -73,27 +73,13 @@
"is_required": true
},
{
"code": "unexpected-quality",
"is_required": false
"code": "still-sealed",
"is_required": false,
"no_note": "This product cannot be returned after it was unsealed. Proceeding will lead to a rejected return request."
}
],
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"code",
"is_required"
],
"properties": {
"code": {
"type": "string",
"description": "The code of the shop return reason"
},
"is_required": {
"type": "boolean",
"description": "Indication whether a consumer is required to answer this question related to the selected return reason"
}
}
"$ref": "#/components/schemas/ShopReturnReasonQuestion"
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions specification/schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,9 @@
"ShopReturnReason": {
"$ref": "./schemas/return-reasons/ShopReturnReason.json"
},
"ShopReturnReasonQuestion": {
"$ref": "./schemas/return-reasons/ShopReturnReasonQuestion.json"
},
"ShopReturnReasonResponse": {
"$ref": "./schemas/return-reasons/ShopReturnReasonResponse.json"
},
Expand All @@ -575,6 +578,9 @@
"ReturnQuestion": {
"$ref": "./schemas/return-questions/ReturnQuestion.json"
},
"ReturnQuestionAnswerType": {
"$ref": "./schemas/return-questions/ReturnQuestionAnswerType.json"
},
"ReturnQuestionResource": {
"$ref": "./schemas/return-questions/ReturnQuestionResource.json"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
}
}
]
},
"answer_type": {
"$ref": "#/components/schemas/ReturnQuestionAnswerType"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
}
}
]
},
"answer_type": {
"$ref": "#/components/schemas/ReturnQuestionAnswerType"
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions specification/schemas/return-questions/ReturnQuestion.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
}
],
"description": "The value of the ``Accept-Language`` header determines the language in which the description is returned. If the ``Accept-Language`` header is missing, we default to ``en-GB``. If the User has the ``return_questions.manage`` scope and the ``Accept-Language`` header is set to ``*``, all descriptions will be returned in a key/value object."
},
"answer_type": {
"$ref": "#/components/schemas/ReturnQuestionAnswerType"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "string",
"enum": [
"string",
"boolean"
],
"example": "string",
"description": "The type of answer expected for this question."
}
3 changes: 3 additions & 0 deletions specification/schemas/return-reasons/ShopReturnReason.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
"description": {
"type": "string"
},
"answer_type": {
"$ref": "#/components/schemas/ReturnQuestionAnswerType"
},
"is_required": {
"type": "boolean"
}
Expand Down
35 changes: 35 additions & 0 deletions specification/schemas/return-reasons/ShopReturnReasonQuestion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"type": "object",
"additionalProperties": false,
"required": [
"code",
"is_required"
],
"properties": {
"code": {
"type": "string",
"description": "The code of the shop return question",
"example": "what-size"
},
"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/ShopReturnReasonQuestionAnswerType"
},
"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."
},
"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."
}
}
}