# M01 - List messages linked to orders and offers (deprecated) Returns messages received or sent to the shop. By default, returns only messages that are received by the shop.Call FrequencyRecommended usage: Synchronous only - at each message list displayMaximum usage: Synchronous only - at each message list displayPaginationThis resource supports offset pagination (see documentation)Sort fieldssort field can have the following values:dateCreated (Default) - Sort by creation date (desc by default) Endpoint: GET /api/messages ## Query parameters: - `customer_id` (string) Returns messages concerned by this customer_id - `received` (string) If TRUE: returns only messages received by shop. If FALSE: returns only messages sent to the shop. Enum: "TRUE", "FALSE", "ALL" - `order_id` (string) Order identifier - `offer_id` (integer) Offer identifier - `start_date` (string) Start creation date for filtering - `end_date` (string) End creation date for filtering - `shop_id` (integer) Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used. - `read` (string) Ignored, will be removed in a future version Enum: "TRUE", "FALSE", "ALL" - `archived` (string) Ignored, will be removed in a future version Enum: "TRUE", "FALSE", "ALL" - `visible` (string) If TRUE: returns only the visible messages. If FALSE: returns only the not visible messages. Enum: "TRUE", "FALSE", "ALL" ## Response 200 fields (application/json): - `messages` (array, required) List of messages - `messages.body` (string, required) Message body - `messages.commercial_id` (string, required) Order commercial ID. Used only when retrieving messages of an order. - `messages.date_created` (string, required) Message creation date - `messages.documents` (array) Documents list - `messages.documents.date_uploaded` (string) Document uploaded date - `messages.documents.file_name` (string, required) Document file name - `messages.documents.file_size` (integer) File size - `messages.documents.id` (integer, required) Document identifier - `messages.documents.type` (string, required) Document type code - `messages.from_id` (string, required) Sender user identifier - `messages.from_name` (string, required) Sender user name - `messages.from_type` (string, required) Sender user type Enum: "OPERATOR", "SHOP", "CUSTOMER" - `messages.id` (integer, required) Message identifier - `messages.offer_id` (integer) Identifier of offer : this value is not fixed and can changed after a long period - `messages.order_id` (string) Order ID. Used only when retrieving messages of an order. - `messages.subject` (string, required) Message subject - `messages.to_customer_id` (string, required) Recipient customer ID - `messages.to_customer_name` (string, required) Recipient customer name - `messages.to_operator` (boolean, required) Indicates the message sent to operator. Used only when retrieving messages of an order. - `messages.to_shop_id` (integer, required) Recipient shop ID - `messages.to_shop_name` (string, required) Recipient shop name - `messages.archived` (boolean) Will be removed in next version - `messages.read` (boolean) Will be removed in next version - `messages.to_customer_archived` (boolean, required) Will be removed in next version - `messages.to_operator_archived` (boolean, required) Will be removed in next version - `messages.to_shop_archived` (boolean, required) Will be removed in next version - `messages.visible` (boolean) States whether or not the message is visible (public). Only relevant for messages on offers and always null for messages on orders. - `total_count` (integer, required) Messages total count