Pular para o conteúdo

Alterar lead

PUT
/api/seller/external/v1/lead/{id}
curl --request PUT \
"https://api.spelt.com.br/api/seller/external/v1/lead/architecto" \
--header "Authorization: Bearer splt_live_SUA_CHAVE" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"architecto\",
\"trade_name\": \"architecto\",
\"email\": \"[email protected]\",
\"phone\": \"architecto\",
\"document_type\": \"architecto\",
\"document_number\": \"architecto\",
\"website\": \"architecto\",
\"notes\": \"architecto\",
\"owner_id\": \"architecto\",
\"source\": \"architecto\",
\"origin\": [],
\"status\": \"architecto\",
\"lost_reason\": \"architecto\"
}"

Envie só o que muda. status aceita open e lost (com lost_reason); a conversão é por POST /lead/{id}/convert. Lead já convertido não muda de situação.

id
required
string

ULID do lead.

Media typeapplication/json
object
name

Nome completo ou razão social.

string
trade_name

Apelido ou nome fantasia.

string
email

E-mail.

string
phone

Telefone.

string
document_type

Tipo do documento.

string
document_number

Documento.

string
website

Site.

string
notes

Observação curta.

string
owner_id

Responsável (null = ninguém).

string
source

Porta de entrada.

string
origin

Contexto livre da entrada.

object
status

open ou lost.

string
lost_reason

Motivo da perda.

string
Media typeapplication/json
object
data
object
object
string
id
string
status
string
lost_reason
string
Example
{
"data": {
"object": "lead",
"id": "01JA0000000000000000000020",
"status": "lost",
"lost_reason": "Sem orçamento agora"
}
}
Media typeapplication/json
One of:
object
message
string
Example
{
"message": "Este lead já virou cliente."
}
Media typeapplication/json
object
error
string
Example
{
"error": "Recurso não encontrado"
}