Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
254a671
:construction: Adding answer_type on return questions.
NickVries Feb 9, 2026
976d415
Added answer_type to patch endpoint request
daniel-myparcel Feb 10, 2026
f2cdb7f
Move questions attached to a return reason to its own schema
daniel-myparcel Feb 10, 2026
17bb7e5
Introduce ReturnQuestionAnswerType schema for reusability
daniel-myparcel Feb 11, 2026
5639f31
Rename ReturnReasonQuestionAttachment to ShopReturnReasonQuestion
daniel-myparcel Feb 11, 2026
aa8b9b6
add maxLength 255 to notes
daniel-myparcel Feb 11, 2026
b82adcb
add answer_type to ShopReturnReasonQuestion
daniel-myparcel Feb 11, 2026
b3a05f1
reorder attrs
daniel-myparcel Feb 12, 2026
f26b348
Merge pull request #1266 from MyParcelCOM/feature/MP-7858-boolean-ret…
yoerriwalstra Feb 12, 2026
76f7226
fix
daniel-myparcel Feb 12, 2026
50736b2
Merge pull request #1267 from MyParcelCOM/hotfix/typo-in-reference-to…
yoerriwalstra Feb 12, 2026
4ecb84e
Fixeru for u
daniel-myparcel Feb 12, 2026
6490644
fixed
daniel-myparcel Feb 12, 2026
35e2a6e
Merge pull request #1268 from MyParcelCOM/qa/MP-7858-make-answer-type…
yoerriwalstra Feb 12, 2026
d958edc
:sparkles: Allow object as hook action predicate value.
NickVries Feb 18, 2026
60fbd19
Merge pull request #1270 from MyParcelCOM/feature/MP-7908-object-hook…
zwaans Feb 19, 2026
8349141
:lady_beetle: Allow boolean item reason answer on post return
NickVries Feb 19, 2026
e6a5db6
Merge pull request #1271 from MyParcelCOM/bugfix/allow-boolean-answer…
NickVries Feb 19, 2026
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
3 changes: 2 additions & 1 deletion specification/schemas/hooks/HookTrigger.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"type": [
"string",
"number",
"array"
"array",
"object"
],
"example": 1000
}
Expand Down
5 changes: 4 additions & 1 deletion specification/schemas/return-orders/ItemReasonQuestion.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"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": {
"type": "string",
"type": [
"string",
"boolean"
],
"description": "The answer to the question referenced by the code attribute."
}
}
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
6 changes: 6 additions & 0 deletions specification/schemas/return-questions/ReturnQuestion.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"attributes": {
"type": "object",
"additionalProperties": false,
"required": [
"answer_type"
],
"properties": {
"code": {
"type": "string",
Expand Down Expand Up @@ -36,6 +39,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."
}
4 changes: 4 additions & 0 deletions specification/schemas/return-reasons/ShopReturnReason.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"required": [
"code",
"description",
"answer_type",
"is_required"
],
"properties": {
Expand All @@ -56,6 +57,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/ReturnQuestionAnswerType"
},
"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."
}
}
}