phone ou email; os campos têm os mesmos nomes e formatos da leitura. Sem responsible_id, o responsável é definido pelas regras de distribuição da conta; sem pipelines, o lead entra na primeira etapa do funil padrão.201: lead criado; Location aponta para ele.200: já havia um lead em aberto com o mesmo telefone, e-mail ou origin_lead_id; os dados foram incorporados a ele, que é devolvido.curl --location 'https://api.veploy.com/v1/leads?expand=responsible' \
--header 'idempotency-key;' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"origin": "string",
"name": "string",
"phone": "string",
"email": "user@example.com",
"message": "string",
"title": "string",
"form_name": "string",
"deal_type": "property_acquisition",
"properties": [
{
"ref": "string",
"transaction_type": "sale",
"deal_amount": "string"
}
],
"responsible_id": "58c9585a-8dec-43d5-adfc-6e46bfe76ff5",
"auto_distribute": true,
"observer_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"pipelines": [
{
"name": "string",
"stage": {
"name": "string"
}
}
],
"lost_reason": "string",
"temperature": "cold",
"custom_fields": {
"property1": "string",
"property2": "string"
},
"origin_lead_id": "string",
"tracking": {
"conversion_page_url": "http://example.com",
"referrer_url": "http://example.com",
"landing_page_url": "http://example.com",
"landed_at": "2019-08-24T14:15:22.123Z",
"utm": {
"source": "string",
"medium": "string",
"campaign": "string",
"term": "string",
"content": "string",
"id": "string",
"source_platform": "string",
"creative_format": "string",
"marketing_tactic": "string"
},
"click_ids": {
"gclid": "string",
"gbraid": "string",
"wbraid": "string",
"dclid": "string",
"gad_campaignid": "string",
"fbclid": "string",
"msclkid": "string",
"ttclid": "string",
"li_fat_id": "string",
"twclid": "string"
},
"client_ids": {
"ga": "string",
"ga_session": "string",
"fbp": "string",
"fbc": "string"
}
}
}'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"number": 0,
"title": null,
"origin": null,
"form_name": null,
"tracking": {
"referrer_url": "http://example.com",
"landing_page_url": "http://example.com",
"landed_at": "2019-08-24T14:15:22.123Z",
"utm": {
"source": null,
"medium": null,
"campaign": null,
"term": null,
"content": null,
"id": null,
"source_platform": null,
"creative_format": null,
"marketing_tactic": null
},
"click_ids": {
"gclid": null,
"gbraid": null,
"wbraid": null,
"dclid": null,
"gad_campaignid": null,
"fbclid": null,
"msclkid": null,
"ttclid": null,
"li_fat_id": null,
"twclid": null
},
"conversion_page_url": "http://example.com",
"first_touch": {
"referrer_url": "http://example.com",
"landing_page_url": "http://example.com",
"landed_at": "2019-08-24T14:15:22.123Z",
"utm": {
"source": "string",
"medium": "string",
"campaign": "string",
"term": "string",
"content": "string",
"id": "string",
"source_platform": "string",
"creative_format": "string",
"marketing_tactic": "string"
},
"click_ids": {
"gclid": "string",
"gbraid": "string",
"wbraid": "string",
"dclid": "string",
"gad_campaignid": "string",
"fbclid": "string",
"msclkid": "string",
"ttclid": "string",
"li_fat_id": "string",
"twclid": "string"
}
},
"client_ids": {
"ga": null,
"ga_session": null,
"fbp": null,
"fbc": null
}
},
"deal_type": "property_acquisition",
"properties": [
{
"ref": "string",
"transaction_type": "sale",
"deal_amount": "string"
}
],
"name": null,
"phone": null,
"email": null,
"message": null,
"summary": null,
"summary_updated_at": "2019-08-24T14:15:22.123Z",
"temperature": "cold",
"lost_reason": null,
"custom_fields": {
"property1": "string",
"property2": "string"
},
"pipelines": [
{
"pipeline_id": null,
"name": null,
"stage": {
"id": null,
"name": null,
"label": null
}
}
],
"responsible_id": null,
"responsible": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"email": "string",
"phone": "string",
"cpf": "string",
"creci": "string",
"birth_date": "string",
"avatar_url": "string",
"role": "string",
"status": "active",
"lead_distribution_enabled": true,
"username": "string",
"invited_at": "2019-08-24T14:15:22.123Z",
"email_confirmed_at": "2019-08-24T14:15:22.123Z",
"created_at": "2019-08-24T14:15:22.123Z"
},
"observer_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"distribution_group_id": null,
"origin_lead_id": null,
"last_activity_at": "2019-08-24T14:15:22.123Z",
"last_contact_at": "2019-08-24T14:15:22.123Z",
"last_inbound_at": "2019-08-24T14:15:22.123Z",
"last_inquiry_at": "2019-08-24T14:15:22.123Z",
"pool_logged_at": "2019-08-24T14:15:22.123Z",
"created_at": "2019-08-24T14:15:22.123Z",
"updated_at": "2019-08-24T14:15:22.123Z"
}
}