Pular para o conteúdo

Converter lead em cliente

POST
/api/seller/external/v1/lead/{id}/convert
curl --request POST \
"https://api.spelt.com.br/api/seller/external/v1/lead/architecto/convert" \
--header "Authorization: Bearer splt_live_SUA_CHAVE" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer_id\": \"architecto\"
}"

Liga o lead a um cliente já cadastrado (POST /customer), marca como converted e passa as tarefas do lead para o cliente.

id
required
string

ULID do lead.

Media typeapplication/json
object
customer_id
required

ULID do cliente.

string
Media typeapplication/json
object
data
object
object
string
id
string
status
string
customer_id
string
Example
{
"data": {
"object": "lead",
"id": "01JA0000000000000000000020",
"status": "converted",
"customer_id": "01JA0000000000000000000040"
}
}
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"
}
Media typeapplication/json
object
message
string
errors
object
customer_id
Array<string>
Example
{
"message": "Erro de validação.",
"errors": {
"customer_id": [
"O campo customer id selecionado é inválido."
]
}
}