Skip to content

OR43 - Create a thread on an order

Request

Description

Each message has a 30 Megabyte size limit, regardless of the number of attachments in the message.

Call Frequency
Maximum usage: At each new thread posted on an order
Security
Shop-API-Key(Required scopes: ROLE_SHOP_ADMINROLE_PARTNER_MESSAGE_WRITE)
Path
order_idstringrequired

Identifier of the order on which the thread is created

Query
shop_idinteger, (int64)

Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used.

Bodymultipart/form-data
filesArray of strings, (binary)

List of attachments for the first message of the thread

thread_inputobjectrequired

Thread content: body, topic, participants...

curl -i -X POST \
  https://your-instance.mirakl.net/api/orders/{order_id}/threads \
  -H 'Content-Type: multipart/form-data' \
  -F 'files=@path/to/file' \
  -F 'thread_input="{\"body\":\"string\",\"to\":[\"OPERATOR\"],\"topic\":{\"type\":\"FREE_TEXT\",\"value\":\"string\"}}";type=application/json'

Responses

Created

Bodyapplication/json
message_idstringrequired

Id of the first message created on the thread

thread_idstringrequired

Id of the created thread

Response
{ "message_id": "00617ff1-7449-4574-a3a1-6fc256bf4d9b", "thread_id": "1f33b4f0-0cf8-4869-b148-e8e18b179770" }