Skip to content

List the messages of an order

GET
/orders/{order_id}/messages
curl --request GET \
--url https://acme.mykreezalid.com/front_api/v1/orders/4242/messages \
--header 'Authorization: Bearer <token>'

Returns every message of the conversation of an order, as a bare array (empty when there is none). The signed-in member must be the customer or the vendor of the order.

order_id
required
integer

Identifier of the order.

Example

4242

The messages of the order.

Media typeapplication/json
Array<object>

A message of the conversation between the customer and the vendor of an order.

object
object

Returned when the message is created only.

string
id
integer
order_id
integer
user_id

Identifier of the member who wrote the message.

integer
role

Role of the author: 1 customer, 2 vendor, 3 marketplace.

integer
Allowed values: 1 2 3
subject
string
nullable
content
string
nullable
created
string format: date-time

Example

[
{
"object": "OrderMessage",
"id": 4242,
"order_id": 4243,
"user_id": 4244,
"role": 1,
"subject": "Delivery date",
"content": "Can you deliver on Friday?"
}
]

No signed-in member, or the order does not exist or the signed-in member is neither its customer nor its vendor (message order not found).

Media typeapplication/json

Error body returned by the Front API when it refuses a request.

object
code

HTTP status code, repeated in the body.

integer
status
string
message

Human-readable reason.

string

Example

{
"code": 403,
"status": "error",
"message": "Token not found in request"
}