Skip to content

List Return Messages

List the conversation thread of a return (RMA) request, newest first. The return must belong to the authenticated customer. Each message is flagged with isAdmin so a client can tell who sent it, and carries an optional attachment.

Endpoint

GET /api/shop/return-messages

Authentication

This endpoint requires an authenticated customer — send the storefront key and a customer Bearer token. See the Authentication page.

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesBearer token (customer login required)

Query Parameters

ParameterTypeRequiredDescription
return_idintegerYesId of the return whose messages to list. Must belong to the authenticated customer.

Response Fields (200 OK)

The response is a plain JSON array. Each item is a message object.

FieldTypeDescription
idintegerNumeric message id.
rmaIdintegerId of the return the message belongs to.
messagestringThe message text.
isAdminbooleantrue if sent by the store, false if sent by the customer.
attachmentstringStored attachment path, or null.
attachmentUrlstringPublic URL of the attachment, or null.
createdAtstringISO 8601 message timestamp.

Status Codes

StatusMeaning
200 OKMessages retrieved.
400 Bad Requestreturn_id is missing.
401 UnauthorizedMissing or invalid customer Bearer token.
403 ForbiddenMissing or invalid storefront key.
404 Not FoundThe return does not exist or is not the customer's.

Released under the MIT License.