Cancelar Proposta
curl --request POST \
--url https://api.example.com/api/v1/propostas/{nu_proposta}/cancelar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"motivo": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/propostas/{nu_proposta}/cancelar"
payload = { "motivo": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({motivo: '<string>'})
};
fetch('https://api.example.com/api/v1/propostas/{nu_proposta}/cancelar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"nu_proposta": 789456,
"status": "cancelada",
"message": "Proposta cancelada com sucesso"
}
{
"error": "BUSINESS_RULE_VIOLATION",
"message": "Proposta já efetivada não pode ser cancelada"
}
Propostas
Cancelar Proposta
Cancele uma proposta que ainda não foi efetivada
POST
/
api
/
v1
/
propostas
/
{nu_proposta}
/
cancelar
Cancelar Proposta
curl --request POST \
--url https://api.example.com/api/v1/propostas/{nu_proposta}/cancelar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"motivo": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/propostas/{nu_proposta}/cancelar"
payload = { "motivo": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({motivo: '<string>'})
};
fetch('https://api.example.com/api/v1/propostas/{nu_proposta}/cancelar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"nu_proposta": 789456,
"status": "cancelada",
"message": "Proposta cancelada com sucesso"
}
{
"error": "BUSINESS_RULE_VIOLATION",
"message": "Proposta já efetivada não pode ser cancelada"
}
Cancelar Proposta
Cancele uma proposta em andamento. Só é possível cancelar propostas que ainda não foram efetivadas.Todos os endpoints requerem autenticação via Bearer token no header
Authorization.
Consulte o guia de autenticação para obter suas credenciais e gerar um token.Parâmetros
integer
required
Número da proposta
string
required
Motivo do cancelamento
Exemplo
cURL
curl -X POST https://api.zipdin.com.br/api/v1/propostas/789456/cancelar \
-H "Authorization: Bearer SEU_TOKEN" \
-H "Content-Type: application/json" \
-d '{"motivo": "Cliente desistiu"}'
{
"nu_proposta": 789456,
"status": "cancelada",
"message": "Proposta cancelada com sucesso"
}
{
"error": "BUSINESS_RULE_VIOLATION",
"message": "Proposta já efetivada não pode ser cancelada"
}
