Chats

Link to swagger documentation

A Chat is a conversation thread between a Seller and a Buyer regarding a specific Order. Each Chat is defined by a subject.

  1. Retrieve Chat Categories
  2. Retrieve Chat Subjects
  3. Check Emails existence
  4. Initiate a Chat
  5. Retrieve list of Chats
  6. Retrieve Chats with unseen Messages

Retrieve Chat Categories

Chat Categories must be known, before initiating a Chat. To retrieve the list of all available ones, a GET request can be made to /openapi/v1/chat-categories.

Request:

GET https://service-message-center.sandbox.infra.metro-markets.cloud/openapi/v1/chat-categories

Response:

{
  "status": "success",
  "message": "Chat categories have been fetched successfully",
  "data": [
    {
      "id": 200,
      "key": "POST-PURCHASE",
      "parentId": null,
      "translations": [
        {
          "en": "Post-purchase",
          "de": "Nach dem Kauf"
        }
      ],
      "children": [
        {
          "id": 210,
          "key": "ORDER",
          "parentId": 200,
          "translations": [
            {
              "en": "Order",
              "de": "Bestellung"
            }
          ],
          "children": []
        }
      ]
    }
  ]
}

Retrieve Chat Subjects

This API EP will be deprecated soon. Use Chat Categories instead

To retrieve the list of all available ones, a GET request can be made to /openapi/v1/chat-subjects.

Request:

GET https://service-message-center.sandbox.infra.metro-markets.cloud/openapi/v1/chat-subjects

Response:

{
  "status": "success",
  "message": "Chat Subjects have been fetched successfully",
  "data": {
    "SELLER": [
      {
        "id": 121,
        "subject": "INVOICES",
        "isCustom": false,
        "parentId": null,
        "children": [
          {
            "id": 221,
            "subject": "INVOICE_INSTRUCTIONS",
            "isCustom": false,
            "parentId": 121,
            "children": []
          },
          {
            "id": 222,
            "subject": "INVOICE_ATTACHMENT",
            "isCustom": false,
            "parentId": 121,
            "children": []
          }
        ]
      },
      {
        "id": 135,
        "subject": "OTHERS",
        "isCustom": true,
        "parentId": null,
        "children": []
      }
    ],
    "BUYER": [
      {
        "id": 132,
        "subject": "INVOICES",
        "isCustom": false,
        "parentId": null,
        "children": [
          {
            "id": 241,
            "subject": "INVOICE_NOT_UPLOADED",
            "isCustom": false,
            "parentId": 132,
            "children": []
          },
          {
            "id": 242,
            "subject": "INVOICE_CORRECTION",
            "isCustom": false,
            "parentId": 132,
            "children": []
          }
        ]
      }
    ]
  },
  "metadata": []
}

Check Emails existence

To check for pre-existing email communication for an OrderNumber, a GET request can be made to /openapi/v1/orders/{{orderNumber}}/emails-exist.

Request:

GET https://service-message-center.sandbox.infra.metro-markets.cloud/openapi/v1/orders/{{orderNumber}}/emails-exist

Response:

{
  "status": "success",
  "message": "Successfully verified email existence for Order [O25-12345678910]",
  "data": {
    "exist": false
  },
  "metadata": []
}

Initiate a Chat

To initiate a new Chat with the Buyer for a specific Order, a POST request to /openapi/v1/orders/{orderId}/chats can be made.

Optional fields:
  • Accept-Language header can be used to specify the preferred language for the response’s Chat category. Supported values are listed in chat categories' translations field (en, de, fr, it, es, pt, nl, hr). If not provided, it defaults to en.

Request:

POST https://service-message-center.sandbox.infra.metro-markets.cloud/openapi/v1/orders/9e159b23-5585-4482-b078-9a9e1db2b252/chats

request Body:
{
  "subject": "OTHERS",
  "customSubject": "Invoice correction request",
  "categoryId": 242
}

Response:

A 201 Created response will be received containing the details of the newly created Chat, including its unique id.

{
  "data": {
    "buyer": {
      "firstName": "Quality Business",
      "id": "7cc2d1d0-bf2c-4af6-89c0-01fbb24a436a",
      "lastName": "Valid Vies"
    },
    "category": {
      "id": 211,
      "locale": "en",
      "name": "Order status",
      "parent": {
        "id": 210,
        "name": "Order"
      }
    },
    "createdAt": "2025-09-02T19:41:12+00:00",
    "customSubject": null,
    "id": "9fc8aac4-6fce-43f2-b230-0b372097729b",
    "isSeen": true,
    "lastMessageAt": "2025-09-02T19:41:12+00:00",
    "order": {
      "id": "4cff7a94-224c-45e4-8187-6d978e3afab5",
      "orderNumber": "O25-568200129071",
      "salesChannel": "pt"
    },
    "seller": {
      "accounts": [
        {
          "firstName": "Test",
          "id": "18461e1b-d845-4587-8ecb-90ba8838fc6e",
          "lastName": "Metro"
        }
      ],
      "organization": {
        "id": "581c41ea-6bc5-4716-a325-4a803c0ebff0",
        "shopName": "My DESHOP"
      }
    },
    "status": "WAITING_FOR_BUYER",
    "subject": "SELLER.ORDERS.ORDER_CONFIRMATION",
    "unseenMessagesCount": 0
  },
  "message": "Chat [9fc8aac4-6fce-43f2-b230-0b372097729b] has been created successfully",
  "metadata": [],
  "status": "success"
}

Retrieve list of Chats

To retrieve a list of all chats, a GET request to /openapi/v1/chats can be made. Query parameters can be optionally used to filter and paginate the results.

Request:

GET https://service-message-center.sandbox.infra.metro-markets.cloud/openapi/v1/chats?limit=15&offset=21

Response:

{
  "data": [
    {
      "buyer": {
        "firstName": "Quality Business",
        "id": "7cc2d1d0-bf2c-4af6-89c0-01fbb24a436a",
        "lastName": "Valid Vies"
      },
      "category": {
        "id": 211,
        "locale": "en",
        "name": "Order status",
        "parent": {
          "id": 210,
          "name": "Order"
        }
      },
      "createdAt": "2025-09-02T19:41:12+00:00",
      "customSubject": null,
      "id": "9fc8aac4-6fce-43f2-b230-0b372097729b",
      "isSeen": true,
      "lastMessageAt": "2025-09-02T19:41:12+00:00",
      "order": {
        "id": "4cff7a94-224c-45e4-8187-6d978e3afab5",
        "orderNumber": "O25-568200129071",
        "salesChannel": "pt"
      },
      "seller": {
        "accounts": [
          {
            "firstName": "Test",
            "id": "18461e1b-d845-4587-8ecb-90ba8838fc6e",
            "lastName": "Metro"
          }
        ],
        "organization": {
          "id": "581c41ea-6bc5-4716-a325-4a803c0ebff0",
          "shopName": "My DESHOP"
        }
      },
      "status": "WAITING_FOR_BUYER",
      "subject": "SELLER.ORDERS.ORDER_CONFIRMATION",
      "unseenMessagesCount": 0
    }
  ],
  "message": "[15] chats have been fetched successfully",
  "metadata": {
    "limit": 15,
    "offset": 21,
    "total": 57
  },
  "status": "success"
}

Retrieve Chats with unseen Messages

To retrieve all chats containing at least one unseen message from the seller, along with the total count, a GET request to /openapi/v1/chats/unseen can be made.

Request:

GET https://service-message-center.sandbox.infra.metro-markets.cloud/openapi/v1/chats/unseen

Response:

{
  "data": {
    "chats": [
      {
        "buyer": {
          "firstName": "Quality Business",
          "id": "7cc2d1d0-bf2c-4af6-89c0-01fbb24a436a",
          "lastName": "Valid Vies"
        },
        "category": {
          "id": 211,
          "locale": "en",
          "name": "Order status",
          "parent": {
            "id": 210,
            "name": "Order"
          }
        },
        "createdAt": "2025-09-02T19:41:12+00:00",
        "customSubject": null,
        "id": "9fc8aac4-6fce-43f2-b230-0b372097729b",
        "isSeen": true,
        "lastMessageAt": "2025-09-02T19:41:12+00:00",
        "order": {
          "id": "4cff7a94-224c-45e4-8187-6d978e3afab5",
          "orderNumber": "O25-568200129071",
          "salesChannel": "pt"
        },
        "seller": {
          "accounts": [
            {
              "firstName": "Test",
              "id": "18461e1b-d845-4587-8ecb-90ba8838fc6e",
              "lastName": "Metro"
            }
          ],
          "organization": {
            "id": "581c41ea-6bc5-4716-a325-4a803c0ebff0",
            "shopName": "My DESHOP"
          }
        },
        "status": "WAITING_FOR_BUYER",
        "subject": "SELLER.ORDERS.ORDER_CONFIRMATION",
        "unseenMessagesCount": 0
      }
    ],
    "count": 1
  },
  "message": "[1] chats with unseen messages have been fetched successfully",
  "status": "success"
}