From 45ab5d6cf7f58a4998e1cedde01b8a0b8fc8da6b Mon Sep 17 00:00:00 2001 From: Daniel Verner Date: Wed, 26 Nov 2025 17:18:45 +0100 Subject: [PATCH 1/8] message added to reject endpoint --- .../Returns-v1-returns-return_id-reject.json | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/specification/paths/Returns-v1-returns-return_id-reject.json b/specification/paths/Returns-v1-returns-return_id-reject.json index e09dd4fe..ecb9de07 100644 --- a/specification/paths/Returns-v1-returns-return_id-reject.json +++ b/specification/paths/Returns-v1-returns-return_id-reject.json @@ -17,6 +17,31 @@ ], "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": { + "data": { + "message": "string (optional)" + } + } + } + } + }, "responses": { "204": { "description": "The return is rejected." From c211cfe3b60a61abace5c01fc39f7069188c5b8f Mon Sep 17 00:00:00 2001 From: Daniel Verner Date: Wed, 26 Nov 2025 17:21:30 +0100 Subject: [PATCH 2/8] message added to reject hook action --- .../schemas/hooks/HookActionRejectReturn.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/specification/schemas/hooks/HookActionRejectReturn.json b/specification/schemas/hooks/HookActionRejectReturn.json index 179124ed..13d8a463 100644 --- a/specification/schemas/hooks/HookActionRejectReturn.json +++ b/specification/schemas/hooks/HookActionRejectReturn.json @@ -6,6 +6,19 @@ "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." + } + } + } } } } From e102d74b60795a3ba604f9f6f7764e99132586a8 Mon Sep 17 00:00:00 2001 From: Daniel Verner Date: Wed, 26 Nov 2025 17:25:55 +0100 Subject: [PATCH 3/8] rejection_message added to Return.json --- specification/schemas/returns/Return.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/specification/schemas/returns/Return.json b/specification/schemas/returns/Return.json index eabe9f08..5eae9616 100644 --- a/specification/schemas/returns/Return.json +++ b/specification/schemas/returns/Return.json @@ -61,6 +61,12 @@ "description": "The language that is used for emails for this return. Defaults to the shop's locale." } ] + }, + "rejection_message": { + "type": "string", + "nullable": true, + "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)." } } }, From 4561a59cb94797675db6626874090f833ce4274d Mon Sep 17 00:00:00 2001 From: Daniel Verner Date: Fri, 28 Nov 2025 11:02:23 +0100 Subject: [PATCH 4/8] remove redundant nullable property --- specification/schemas/returns/Return.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/schemas/returns/Return.json b/specification/schemas/returns/Return.json index 5eae9616..3738c542 100644 --- a/specification/schemas/returns/Return.json +++ b/specification/schemas/returns/Return.json @@ -64,7 +64,6 @@ }, "rejection_message": { "type": "string", - "nullable": true, "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)." } From fcabb877feac7827911d305512991af400f9784c Mon Sep 17 00:00:00 2001 From: Daniel Verner Date: Fri, 28 Nov 2025 11:05:04 +0100 Subject: [PATCH 5/8] move example to be on the same lever as the message property --- .../paths/Returns-v1-returns-return_id-reject.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/specification/paths/Returns-v1-returns-return_id-reject.json b/specification/paths/Returns-v1-returns-return_id-reject.json index ecb9de07..97060c79 100644 --- a/specification/paths/Returns-v1-returns-return_id-reject.json +++ b/specification/paths/Returns-v1-returns-return_id-reject.json @@ -28,16 +28,12 @@ "properties": { "message": { "type": "string", - "description": "Message explaining the reason for rejection." + "description": "Message explaining the reason for rejection.", + "example": "The items you've selected are not eligible to be returned because..." } } } } - }, - "example": { - "data": { - "message": "string (optional)" - } } } } From 9f7e20e0ba4782f2ae5dc760628bc3ee86bf6436 Mon Sep 17 00:00:00 2001 From: Daniel Verner Date: Fri, 28 Nov 2025 11:29:09 +0100 Subject: [PATCH 6/8] example --- specification/schemas/hooks/HookActionRejectReturn.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/schemas/hooks/HookActionRejectReturn.json b/specification/schemas/hooks/HookActionRejectReturn.json index 13d8a463..206e22de 100644 --- a/specification/schemas/hooks/HookActionRejectReturn.json +++ b/specification/schemas/hooks/HookActionRejectReturn.json @@ -15,7 +15,8 @@ "properties": { "message": { "type": "string", - "description": "Message explaining the reason for rejection." + "description": "Message explaining the reason for rejection.", + "example": "The items you've selected are not eligible to be returned because..." } } } From 5309e9fbaa353d9a4cbfcfd11f70516ed0423a5c Mon Sep 17 00:00:00 2001 From: Daniel Verner Date: Mon, 1 Dec 2025 15:11:24 +0100 Subject: [PATCH 7/8] added maxLength to rejection_message --- specification/paths/Returns-v1-returns-return_id-reject.json | 1 + specification/schemas/hooks/HookActionRejectReturn.json | 1 + specification/schemas/returns/Return.json | 1 + 3 files changed, 3 insertions(+) diff --git a/specification/paths/Returns-v1-returns-return_id-reject.json b/specification/paths/Returns-v1-returns-return_id-reject.json index 97060c79..0e66e22d 100644 --- a/specification/paths/Returns-v1-returns-return_id-reject.json +++ b/specification/paths/Returns-v1-returns-return_id-reject.json @@ -28,6 +28,7 @@ "properties": { "message": { "type": "string", + "maxLength": 255, "description": "Message explaining the reason for rejection.", "example": "The items you've selected are not eligible to be returned because..." } diff --git a/specification/schemas/hooks/HookActionRejectReturn.json b/specification/schemas/hooks/HookActionRejectReturn.json index 206e22de..aeb896f4 100644 --- a/specification/schemas/hooks/HookActionRejectReturn.json +++ b/specification/schemas/hooks/HookActionRejectReturn.json @@ -15,6 +15,7 @@ "properties": { "message": { "type": "string", + "maxLength": 255, "description": "Message explaining the reason for rejection.", "example": "The items you've selected are not eligible to be returned because..." } diff --git a/specification/schemas/returns/Return.json b/specification/schemas/returns/Return.json index 3738c542..502e30a9 100644 --- a/specification/schemas/returns/Return.json +++ b/specification/schemas/returns/Return.json @@ -64,6 +64,7 @@ }, "rejection_message": { "type": "string", + "maxLength": 255, "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)." } From f6daf6cc2fabca58925b2ce1e0862e8dcaeef06a Mon Sep 17 00:00:00 2001 From: Daniel Verner Date: Mon, 8 Dec 2025 14:24:34 +0100 Subject: [PATCH 8/8] Add null case --- specification/schemas/hooks/HookActionRejectReturn.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specification/schemas/hooks/HookActionRejectReturn.json b/specification/schemas/hooks/HookActionRejectReturn.json index aeb896f4..e425010c 100644 --- a/specification/schemas/hooks/HookActionRejectReturn.json +++ b/specification/schemas/hooks/HookActionRejectReturn.json @@ -14,7 +14,10 @@ "additionalProperties": false, "properties": { "message": { - "type": "string", + "type": [ + "string", + "null" + ], "maxLength": 255, "description": "Message explaining the reason for rejection.", "example": "The items you've selected are not eligible to be returned because..."