Skip to content

M01 - List messages linked to orders and offers
⚠️ No Integration Allowed ⚠️
deprecated

Request

Deprecated endpoint

This API is going to be permanently removed on April 5 2027, please use M10 and M11 instead.

Description

Returns messages received or sent to the shop. By default, returns only messages that are received by the shop.

Call Frequency
Maximum usage: Synchronous only - at each message list display
Pagination

This resource supports offset pagination (see documentation)

Sort fields

sort field can have the following values:

  • dateCreated (Default) - Sort by creation date (desc by default)

Security
Shop-API-Key(Required scopes: ROLE_SHOP_ADMIN)
Query
customer_idstring

Returns messages concerned by this customer_id

receivedstring
  • If TRUE: returns only messages received by shop.
  • If FALSE: returns only messages sent to the shop.
Default:"TRUE"
Enum:"TRUE""FALSE""ALL"
order_idstring

Order identifier

offer_idinteger, (int64)

Offer identifier

start_datestring, (date-time)

Start creation date for filtering

end_datestring, (date-time)

End creation date for filtering

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.

curl -i -X GET \
  'https://your-instance.mirakl.net/api/messages?customer_id=string&received=TRUE&order_id=string&offer_id=0&start_date=2019-08-24T14%3A15%3A22Z&end_date=2019-08-24T14%3A15%3A22Z&shop_id=0' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
messagesArray of objectsrequired

List of messages

total_countinteger, (int32)required

Messages total count

Response
{ "messages": [ { … } ], "total_count": 1 }