Skip to content

M11 - List all threads

Request

Description

You may want to retrieve the threads linked to a specific entity, using both entity_type and entity_id.
For example, to retrieve threads for an order, use entity_type=MMP_ORDER&entity_id=my-order-1.
Available values for entity_type are:

  • MMP_ORDER: for threads on product orders
  • MMP_OFFER: for threads on offers
  • MPS_ORDER: for threads on service orders
  • MPS_SERVICE: for threads on services
  • SELLER_OPERATOR: for threads between sellers and operator

This resource uses seek pagination. The default value for parameter limit is 50.

Call Frequency
Maximum usage: Synchronous only - At each page that includes an inbox display
Read More
Pagination

This resource supports seek pagination (see documentation)

Security
Front-Bearer-Token or OAuth-2
Query
customer_idstring

Customer id to include in result (default: include all).
It is strongly recommended to use the query param customer_id because the nominal use case is to filter all conversations per customer.
If you do need to retrieve messages involving several customers, you can omit this query parameter.

customer_organization_idstring

Customer organization id to include in result (default: include all).

entity_typestring

Entity type to include in result (default: include all).
Available values: MMP_ORDER, MMP_OFFER, MPS_ORDER, MPS_SERVICE, SELLER_OPERATOR

entity_idArray of strings

Comma separated list of Entity id to include in result (default: include all).
The entity_type must be specified to use this filter, otherwise an error 400 will be returned.
Example of an entity_id query: entity_id=order1-A,order20-A,order13-A&entity_type=MMP_ORDER

updated_sincestring, (date-time)

Retrieve threads modified at or after this date.

with_messagesboolean

True to include message details. Limited to the last 100 messages received on each thread.

Default:false
channel_codesArray of strings, unique

List of the channel codes to filter with, using a comma (,) as a separator.
If specified, only order messages linked to the given channels will be returned (Whatever the value of entity_type).
Otherwise, messages will be returned regardless of their channels.

curl -i -X GET \
  'https://your-instance.mirakl.net/api/inbox/threads?customer_id=string&customer_organization_id=string&entity_type=string&entity_id=string&updated_since=2019-08-24T14%3A15%3A22Z&with_messages=false&channel_codes=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

Bodyapplication/json
dataArray of objectsrequired

Page of data

next_page_tokenstring

Token to access the next page. Absent if the current page is the last one.

previous_page_tokenstring

Token to access the previous page. Absent if the current page is the first one.

Response
{ "data": [ { … } ], "next_page_token": "bGltaXQ9NTAmYWZ0ZXI9MjA3NjYwNTAtZDc5Yy00YzUyLWEwODctZWI5YjY1MjFkNzA5JnNvcnQ9ZGF0ZSxERVNDJmN1c3RvbWVyX2lkPUN1c3RvbWVyJTIwaWQ=.kuBm9NWrcM8GwgVxBrTpvQnYKmeLnott4D3EeM8Mf9Y=" }