List the messages of an order
GET
/orders/{order_id}/messages
const url = 'https://acme.mykreezalid.com/front_api/v1/orders/4242/messages';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”order_id
required
integer
Identifier of the order.
Example
4242Responses
Section titled “Responses”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
subject
string
content
string
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"}