Consultar contato
curl --request GET \
--url https://services.leadconnectorhq.com/contacts/{contactId} \
--header 'Authorization: Bearer <token>' \
--header 'Version: <version>'import requests
url = "https://services.leadconnectorhq.com/contacts/{contactId}"
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Version: '<version>', Authorization: 'Bearer <token>'}
};
fetch('https://services.leadconnectorhq.com/contacts/{contactId}', 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://services.leadconnectorhq.com/contacts/{contactId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Version: <version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://services.leadconnectorhq.com/contacts/{contactId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Version", "<version>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://services.leadconnectorhq.com/contacts/{contactId}")
.header("Version", "<version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.leadconnectorhq.com/contacts/{contactId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Version"] = '<version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"contact": {
"id": "seD4PfOuKoVMLkEZqohJ",
"name": "rubika deo",
"firstName": "rubika",
"lastName": "Deo",
"email": "rubika@deos.com",
"phone": "+18832327657",
"locationId": "ve9EPM428h8vShlRW1KT"
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}Contatos
Consultar contato
Consulta os dados de um contato pelo seu identificador único.
Autenticação: envie um token de acesso da subconta ou um token de integração privada da subconta no cabeçalho Authorization: Bearer <token>. Permissão necessária: contacts.readonly. Envie também o cabeçalho Version: v3.
GET
/
contacts
/
{contactId}
Consultar contato
curl --request GET \
--url https://services.leadconnectorhq.com/contacts/{contactId} \
--header 'Authorization: Bearer <token>' \
--header 'Version: <version>'import requests
url = "https://services.leadconnectorhq.com/contacts/{contactId}"
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Version: '<version>', Authorization: 'Bearer <token>'}
};
fetch('https://services.leadconnectorhq.com/contacts/{contactId}', 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://services.leadconnectorhq.com/contacts/{contactId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Version: <version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://services.leadconnectorhq.com/contacts/{contactId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Version", "<version>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://services.leadconnectorhq.com/contacts/{contactId}")
.header("Version", "<version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.leadconnectorhq.com/contacts/{contactId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Version"] = '<version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"contact": {
"id": "seD4PfOuKoVMLkEZqohJ",
"name": "rubika deo",
"firstName": "rubika",
"lastName": "Deo",
"email": "rubika@deos.com",
"phone": "+18832327657",
"locationId": "ve9EPM428h8vShlRW1KT"
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}