Skip to content

Response qa

Answer questions

This endpoint allows you to enter an answer to the referenced question.

Required scope

Value Description
services:questions-seller:read Allows the use of write/update APIs.

Request parameters

Field Type Description Required
id string Key to identify the Question Yes
message string Message description Yes
external_id string Identifier for message from the responding external system. If not filled in, a random value will be used. No
owner.name string Name of the author responsible for the response. Yes
owner.external_id String Identifier in the external system for the author of the response. Yes

Request:

curl -X 'POST' \
  'https://services.magalu.com/v0/questions/{id}/answer' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <Access Token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "message": "Temos em três  cores azul, amarelo e vermelho.",
    "external_id": "resposta-01",
    "owner": {
      "name": "Joseph Climber",
      "external_id": "j.climber"
    }
  }'

Response:

{
  "message": "Temos em três  cores azul, amarelo e vermelho.",
  " ": "resposta-01",
  "owner": {
    "name": "Joseph Climber",
    "external_id": "j.climber"
  },
  "moderation": {
    "status": "NOT_MODERATED",
    "when_at": "2023-06-27T18:56:28.445Z",
    "block_rules": []
  }
}

Return code

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