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
21 changes: 21 additions & 0 deletions specification/paths/Returns-v1-returns-return_id-reject.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,27 @@
],
"summary": "Reject a return.",
"description": "This endpoint modifies the status of a return resource to `return-rejected`",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message explaining the reason for rejection.",
"example": "The items you've selected are not eligible to be returned because..."
}
}
}
}
}
}
}
},
"responses": {
"204": {
"description": "The return is rejected."
Expand Down
14 changes: 14 additions & 0 deletions specification/schemas/hooks/HookActionRejectReturn.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@
"type": "string",
"pattern": "^reject-return$",
"example": "reject-return"
},
"values": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string",
"description": "Message explaining the reason for rejection.",
"example": "The items you've selected are not eligible to be returned because..."
}
}
}
}
}
}
5 changes: 5 additions & 0 deletions specification/schemas/returns/Return.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
"description": "The language that is used for emails for this return. Defaults to the shop's locale."
}
]
},
"rejection_message": {
"type": "string",
"example": "The items you've selected are not eligible to be returned because...",
"description": "Message explaining the reason the return was rejected (if at all)."
}
}
},
Expand Down