curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/leads \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"email": "lead@exemplo.com",
"name": "Nome do lead",
"birthday": "yyyy-mm-dd",
"city": "São Paulo",
"state": "SP",
"genre": "m",
"params": {
"foo": "Bar",
"param2": "Param2Value"
},
"utm_source": "google",
"utm_campaign": "promo_verao",
"utm_medium": "cpc",
"utm_term": "sapatos",
"utm_content": "banner_lateral"
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/leads"
payload = {
"email": "lead@exemplo.com",
"name": "Nome do lead",
"birthday": "yyyy-mm-dd",
"city": "São Paulo",
"state": "SP",
"genre": "m",
"params": {
"foo": "Bar",
"param2": "Param2Value"
},
"utm_source": "google",
"utm_campaign": "promo_verao",
"utm_medium": "cpc",
"utm_term": "sapatos",
"utm_content": "banner_lateral"
}
headers = {
"User-Token": "<api-key>",
"User-Secret-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'User-Token': '<api-key>',
'User-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'lead@exemplo.com',
name: 'Nome do lead',
birthday: 'yyyy-mm-dd',
city: 'São Paulo',
state: 'SP',
genre: 'm',
params: {foo: 'Bar', param2: 'Param2Value'},
utm_source: 'google',
utm_campaign: 'promo_verao',
utm_medium: 'cpc',
utm_term: 'sapatos',
utm_content: 'banner_lateral'
})
};
fetch('https://api.dooki.com.br/v2/{alias}/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dooki.com.br/v2/{alias}/leads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'lead@exemplo.com',
'name' => 'Nome do lead',
'birthday' => 'yyyy-mm-dd',
'city' => 'São Paulo',
'state' => 'SP',
'genre' => 'm',
'params' => [
'foo' => 'Bar',
'param2' => 'Param2Value'
],
'utm_source' => 'google',
'utm_campaign' => 'promo_verao',
'utm_medium' => 'cpc',
'utm_term' => 'sapatos',
'utm_content' => 'banner_lateral'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"User-Secret-Key: <api-key>",
"User-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dooki.com.br/v2/{alias}/leads"
payload := strings.NewReader("{\n \"email\": \"lead@exemplo.com\",\n \"name\": \"Nome do lead\",\n \"birthday\": \"yyyy-mm-dd\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\",\n \"genre\": \"m\",\n \"params\": {\n \"foo\": \"Bar\",\n \"param2\": \"Param2Value\"\n },\n \"utm_source\": \"google\",\n \"utm_campaign\": \"promo_verao\",\n \"utm_medium\": \"cpc\",\n \"utm_term\": \"sapatos\",\n \"utm_content\": \"banner_lateral\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("User-Token", "<api-key>")
req.Header.Add("User-Secret-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dooki.com.br/v2/{alias}/leads")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"lead@exemplo.com\",\n \"name\": \"Nome do lead\",\n \"birthday\": \"yyyy-mm-dd\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\",\n \"genre\": \"m\",\n \"params\": {\n \"foo\": \"Bar\",\n \"param2\": \"Param2Value\"\n },\n \"utm_source\": \"google\",\n \"utm_campaign\": \"promo_verao\",\n \"utm_medium\": \"cpc\",\n \"utm_term\": \"sapatos\",\n \"utm_content\": \"banner_lateral\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"lead@exemplo.com\",\n \"name\": \"Nome do lead\",\n \"birthday\": \"yyyy-mm-dd\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\",\n \"genre\": \"m\",\n \"params\": {\n \"foo\": \"Bar\",\n \"param2\": \"Param2Value\"\n },\n \"utm_source\": \"google\",\n \"utm_campaign\": \"promo_verao\",\n \"utm_medium\": \"cpc\",\n \"utm_term\": \"sapatos\",\n \"utm_content\": \"banner_lateral\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"merchant_id": "1",
"name": "Nome do Lead",
"email": "lead@email.com",
"birthday": "yyyy-mm-dd",
"city": "São Paulo",
"state": "SP",
"genre": "m",
"utm_source": "",
"utm_campaign": "",
"utm_medium": "",
"utm_term": "",
"utm_content": "",
"params": {
"foo": "Bar",
"param2": "Param2Value"
},
"is_customer": "true",
"customer_id": "123",
"customer_since": "yyyy-mm-dd",
"created_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"updated_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
}
}Criar um novo lead
Cria um novo lead com base nos dados fornecidos
curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/leads \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"email": "lead@exemplo.com",
"name": "Nome do lead",
"birthday": "yyyy-mm-dd",
"city": "São Paulo",
"state": "SP",
"genre": "m",
"params": {
"foo": "Bar",
"param2": "Param2Value"
},
"utm_source": "google",
"utm_campaign": "promo_verao",
"utm_medium": "cpc",
"utm_term": "sapatos",
"utm_content": "banner_lateral"
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/leads"
payload = {
"email": "lead@exemplo.com",
"name": "Nome do lead",
"birthday": "yyyy-mm-dd",
"city": "São Paulo",
"state": "SP",
"genre": "m",
"params": {
"foo": "Bar",
"param2": "Param2Value"
},
"utm_source": "google",
"utm_campaign": "promo_verao",
"utm_medium": "cpc",
"utm_term": "sapatos",
"utm_content": "banner_lateral"
}
headers = {
"User-Token": "<api-key>",
"User-Secret-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'User-Token': '<api-key>',
'User-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'lead@exemplo.com',
name: 'Nome do lead',
birthday: 'yyyy-mm-dd',
city: 'São Paulo',
state: 'SP',
genre: 'm',
params: {foo: 'Bar', param2: 'Param2Value'},
utm_source: 'google',
utm_campaign: 'promo_verao',
utm_medium: 'cpc',
utm_term: 'sapatos',
utm_content: 'banner_lateral'
})
};
fetch('https://api.dooki.com.br/v2/{alias}/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dooki.com.br/v2/{alias}/leads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'lead@exemplo.com',
'name' => 'Nome do lead',
'birthday' => 'yyyy-mm-dd',
'city' => 'São Paulo',
'state' => 'SP',
'genre' => 'm',
'params' => [
'foo' => 'Bar',
'param2' => 'Param2Value'
],
'utm_source' => 'google',
'utm_campaign' => 'promo_verao',
'utm_medium' => 'cpc',
'utm_term' => 'sapatos',
'utm_content' => 'banner_lateral'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"User-Secret-Key: <api-key>",
"User-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dooki.com.br/v2/{alias}/leads"
payload := strings.NewReader("{\n \"email\": \"lead@exemplo.com\",\n \"name\": \"Nome do lead\",\n \"birthday\": \"yyyy-mm-dd\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\",\n \"genre\": \"m\",\n \"params\": {\n \"foo\": \"Bar\",\n \"param2\": \"Param2Value\"\n },\n \"utm_source\": \"google\",\n \"utm_campaign\": \"promo_verao\",\n \"utm_medium\": \"cpc\",\n \"utm_term\": \"sapatos\",\n \"utm_content\": \"banner_lateral\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("User-Token", "<api-key>")
req.Header.Add("User-Secret-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dooki.com.br/v2/{alias}/leads")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"lead@exemplo.com\",\n \"name\": \"Nome do lead\",\n \"birthday\": \"yyyy-mm-dd\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\",\n \"genre\": \"m\",\n \"params\": {\n \"foo\": \"Bar\",\n \"param2\": \"Param2Value\"\n },\n \"utm_source\": \"google\",\n \"utm_campaign\": \"promo_verao\",\n \"utm_medium\": \"cpc\",\n \"utm_term\": \"sapatos\",\n \"utm_content\": \"banner_lateral\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"lead@exemplo.com\",\n \"name\": \"Nome do lead\",\n \"birthday\": \"yyyy-mm-dd\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\",\n \"genre\": \"m\",\n \"params\": {\n \"foo\": \"Bar\",\n \"param2\": \"Param2Value\"\n },\n \"utm_source\": \"google\",\n \"utm_campaign\": \"promo_verao\",\n \"utm_medium\": \"cpc\",\n \"utm_term\": \"sapatos\",\n \"utm_content\": \"banner_lateral\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"merchant_id": "1",
"name": "Nome do Lead",
"email": "lead@email.com",
"birthday": "yyyy-mm-dd",
"city": "São Paulo",
"state": "SP",
"genre": "m",
"utm_source": "",
"utm_campaign": "",
"utm_medium": "",
"utm_term": "",
"utm_content": "",
"params": {
"foo": "Bar",
"param2": "Param2Value"
},
"is_customer": "true",
"customer_id": "123",
"customer_since": "yyyy-mm-dd",
"created_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"updated_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
}
}Path Parameters
Alias da loja
Body
Representa os dados necessários para criar ou atualizar um lead
O endereço de email do lead
"lead@exemplo.com"
O nome do lead
"Nome do lead"
Data de nascimento do lead
"yyyy-mm-dd"
Cidade do lead
"São Paulo"
Estado do lead
"SP"
Gênero do lead
"m"
Parâmetros adicionais
Show child attributes
Show child attributes
{ "foo": "Bar", "param2": "Param2Value" }
Origem da campanha UTM. O valor é sanitizado e normalizado automaticamente.
"google"
Nome da campanha UTM. O valor é sanitizado e normalizado automaticamente.
"promo_verao"
Mídia da campanha UTM. O valor é sanitizado e normalizado automaticamente.
"cpc"
Termo da campanha UTM. O valor é sanitizado e normalizado automaticamente.
"sapatos"
Conteúdo da campanha UTM. O valor é sanitizado e normalizado automaticamente.
"banner_lateral"
Response
Lead criado com sucesso
Representa um lead da lista de leads
"1"
"Nome do Lead"
"lead@email.com"
"yyyy-mm-dd"
"São Paulo"
"SP"
"m"
""
""
""
""
""
{ "foo": "Bar", "param2": "Param2Value" }
"true"
"123"
"yyyy-mm-dd"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?