Skip to content

Post a message on an order

POST
/orders/{order_id}/messages
curl --request POST \
--url https://acme.mykreezalid.com/front_api/v1/orders/4242/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "subject": "Delivery date", "content": "Can you deliver on Friday?" }'

Adds a message to the conversation of an order, written by the signed-in member, who must be the customer or the vendor of the order.

order_id
required
integer

Identifier of the order.

Example

4242
Media typeapplication/json
object
subject
string

Example

Delivery date
content
string

Example

Can you deliver on Friday?

The message is posted.

Media typeapplication/json

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; the order does not exist or the signed-in member is neither its customer nor its vendor (message order not found); or the message could not be saved.

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"
}