Skip to content

OR42 - Post a message on an order
⚠️ No Integration Allowed ⚠️
deprecated

Request

Deprecated endpoint

This API will be removed in a future version. Use OR43 and M12 instead.

Description

Maximum of 1000 messages on a thread

Call Frequency
Maximum usage: At each new message posted on an order
Read More
Security
Shop-API-Key(Required scopes: ROLE_SHOP_ADMIN)
Path
order_idstringrequired

Order identifier

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.

Bodyapplication/json
bodystring, [ 3 .. 50000 ] charactersrequired

Body of the message

document_idsArray of integers, (int64)

Message's attachments. List of document ids already linked to the order. Use OR74 to upload new documents and OR72 to retrieve their ids. NB: If one of those document_id have already been linked to a previous message, it will be ignored.

subjectstring, [ 3 .. 200 ] charactersrequired

Subject of the message

to_customerbooleanrequired

Boolean to indicate the message will be sent to the customer associated with the order.

to_operatorbooleanrequired

Boolean to indicate the message will be sent to the operator.

to_shopbooleanrequired

Boolean to indicate the message will be sent to the shop associated with the order

curl -i -X POST \
  'https://your-instance.mirakl.net/api/orders/{order_id}/messages?shop_id=0' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "body": "I don'\''t receive my product! Could you please tell me when should i received it?",
    "document_ids": [
      "2032"
    ],
    "subject": "Item not received",
    "to_customer": false,
    "to_operator": false,
    "to_shop": true
  }'

Responses

Created

Bodyapplication/json
idinteger, (int64)required

Identifier of the message created

Response
{ "id": 2038 }