Ir para o conteúdo

Registrar leitura de uma conversa

Este endpoint permite que o seller marque uma mensagem como lida.

Escopo requerido

Valor Descrição
services:conversations-seller:write Permite a utilização das APIs de escrita/atualização.

Parâmetros da URL

Campo Tipo Descrição Obrigatorio
conversation_id String Identificador da conversa Sim

Chamada:

curl -X 'PATCH' \
  'https://services.magalu.com/v0/conversations/{conversation_id}/read_by' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <Access Token>' \
  -H 'Content-Type: application/json' \

Resposta:

Domínio: Conversation:

{
  "id": "6628da4c11696b6967daf96c",
  "display_name": "Conversation Name",
  "owner": {
    "name": "Z Store",
    "ref_key": "zstore"
  },
  "from_user": {
    "id": "6628d7a3c01daebde56f5598",
    "full_name": "John Doe",
    "full_name_normalized": "johndoe",
    "external_id": "e8528120-fc36-43e9-bd01-fd453d938da7", 
    "type": "CUSTOMER"
  },
  "to_user": {
    "id": "6628d7a3c01daebde56f5599",
    "full_name": "Z Store",
    "full_name_normalized": "zstore",
    "external_id": "zstore",
    "type": "SELLER"
  },
  "unread_from_count": 6,
  "unread_to_count": 0,
  "last_interaction_at": "2023-11-01T14:09:51.600Z",
  "status": "OPENED",
  "last_message": {
    "id": "6628da6211696b6967daf96f",
    "from_user": {
      "full_name": "John Doe",
      "full_name_normalized": "johndoe",
      "external_id": "e8528120-fc36-43e9-bd01-fd453d938da7", 
      "type": "CUSTOMER"
    },
    "content": "Hello world",
    "when_at": "2023-11-01T13:36:15.935Z"
  },
  "is_new_to": false,
  "tags": [
    {
      "name": "productId",
      "value": "kb3cghh1ge"
    },
    {
      "name": "productTitle",
      "value": "Guarda Roupa Casal Grande 6 Portas 4 Gavetas Marrom Next"
    },
    {
      "name": "productImage",
      "value": "https://a-static.mlcdn.com.br/{w}x{h}/guarda-roupa-casal-grande-6-portas-4-gavetas-marrom-next-caemmun/caemmun/7899630657530/85f19946fa851fda2a2fee973273b940.jpeg"
    },
    {
      "name": "productUrl",
      "value": "https://www.magazineluiza.com.br/guarda-roupa-casal-grande-6-portas-4-gavetas-marrom-next-caemmun/p/kb3cghh1ge/mo/guro/"
    }
  ],
  "created_at": "2023-10-24T16:58:02.312Z",
  "updated_at": "2023-11-23T16:57:10.353Z"
}

Códigos de retorno

Código Descrição
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error