Skip to main content
POST
/
streaks
/
missions
/
preferences
curl --request POST \
  --url https://backend.testeswaffle.org/streaks/missions/preferences \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "leitor@exemplo.com",
    "wantsToReceiveTheGifts": "WANT"
  }'
{
  "success": true,
  "message": "Preferências de presentes atualizadas com sucesso",
  "data": {
    "email": "leitor@exemplo.com",
    "previousPreference": "NEVER_REPLIED",
    "newPreference": "WANT",
    "updatedAt": "2024-01-20T16:45:00Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.thenewscc.com.br/llms.txt

Use this file to discover all available pages before exploring further.

Descrição

Atualiza as preferências do usuário sobre recebimento de presentes das missões.

Request Body

email
string
required
Email do leitor
wantsToReceiveTheGifts
string
required
Preferência de recebimento: NEVER_REPLIED, DONT_WANT, ou WANT

Response

success
boolean
Indica se a operação foi bem-sucedida
message
string
Mensagem informativa sobre o resultado
data
object
curl --request POST \
  --url https://backend.testeswaffle.org/streaks/missions/preferences \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "leitor@exemplo.com",
    "wantsToReceiveTheGifts": "WANT"
  }'
{
  "success": true,
  "message": "Preferências de presentes atualizadas com sucesso",
  "data": {
    "email": "leitor@exemplo.com",
    "previousPreference": "NEVER_REPLIED",
    "newPreference": "WANT",
    "updatedAt": "2024-01-20T16:45:00Z"
  }
}

Valores Aceitos

  • NEVER_REPLIED: Usuário nunca respondeu sobre preferências
  • DONT_WANT: Usuário não quer receber presentes físicos
  • WANT: Usuário quer receber presentes físicos

Body

application/json
email
string<email>
required

Email do leitor

wantsToReceiveTheGifts
enum<string>
required

Preferência de recebimento

Available options:
NEVER_REPLIED,
DONT_WANT,
WANT

Response

200 - application/json

Preferências atualizadas com sucesso

success
boolean
message
string
data
object