Create deal
curl --request POST \
--url https://connect.pingback.com/v2/deals \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"contactId": "36c8c534-fcca-4f79-b3e6-c492f82c2ccc",
"pipelineId": "34fb6a9f-6d59-4eb8-add6-735fa4efdddd",
"stageId": "9c7f1a05-15d1-4332-8f9a-f6bdfeb2eeee",
"attributes": {
"pb_name": "Deal Name",
"pb_amount": "2300000"
}
}
'import requests
url = "https://connect.pingback.com/v2/deals"
payload = {
"contactId": "36c8c534-fcca-4f79-b3e6-c492f82c2ccc",
"pipelineId": "34fb6a9f-6d59-4eb8-add6-735fa4efdddd",
"stageId": "9c7f1a05-15d1-4332-8f9a-f6bdfeb2eeee",
"attributes": {
"pb_name": "Deal Name",
"pb_amount": "2300000"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contactId: '36c8c534-fcca-4f79-b3e6-c492f82c2ccc',
pipelineId: '34fb6a9f-6d59-4eb8-add6-735fa4efdddd',
stageId: '9c7f1a05-15d1-4332-8f9a-f6bdfeb2eeee',
attributes: {pb_name: 'Deal Name', pb_amount: '2300000'}
})
};
fetch('https://connect.pingback.com/v2/deals', 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://connect.pingback.com/v2/deals",
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([
'contactId' => '36c8c534-fcca-4f79-b3e6-c492f82c2ccc',
'pipelineId' => '34fb6a9f-6d59-4eb8-add6-735fa4efdddd',
'stageId' => '9c7f1a05-15d1-4332-8f9a-f6bdfeb2eeee',
'attributes' => [
'pb_name' => 'Deal Name',
'pb_amount' => '2300000'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://connect.pingback.com/v2/deals"
payload := strings.NewReader("{\n \"contactId\": \"36c8c534-fcca-4f79-b3e6-c492f82c2ccc\",\n \"pipelineId\": \"34fb6a9f-6d59-4eb8-add6-735fa4efdddd\",\n \"stageId\": \"9c7f1a05-15d1-4332-8f9a-f6bdfeb2eeee\",\n \"attributes\": {\n \"pb_name\": \"Deal Name\",\n \"pb_amount\": \"2300000\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-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://connect.pingback.com/v2/deals")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contactId\": \"36c8c534-fcca-4f79-b3e6-c492f82c2ccc\",\n \"pipelineId\": \"34fb6a9f-6d59-4eb8-add6-735fa4efdddd\",\n \"stageId\": \"9c7f1a05-15d1-4332-8f9a-f6bdfeb2eeee\",\n \"attributes\": {\n \"pb_name\": \"Deal Name\",\n \"pb_amount\": \"2300000\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://connect.pingback.com/v2/deals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contactId\": \"36c8c534-fcca-4f79-b3e6-c492f82c2ccc\",\n \"pipelineId\": \"34fb6a9f-6d59-4eb8-add6-735fa4efdddd\",\n \"stageId\": \"9c7f1a05-15d1-4332-8f9a-f6bdfeb2eeee\",\n \"attributes\": {\n \"pb_name\": \"Deal Name\",\n \"pb_amount\": \"2300000\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Deal created",
"data": {
"id": "ea8a2a47-2a05-4a43-b284-35df0ea46333",
"contactId": "36c8c534-fcca-4f79-b3e6-c492f82c2ccc",
"email": "example@email.com"
}
}Oportunidades
Criar Oportunidade
Cria uma nova oportunidade.
POST
/
deals
Create deal
curl --request POST \
--url https://connect.pingback.com/v2/deals \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"contactId": "36c8c534-fcca-4f79-b3e6-c492f82c2ccc",
"pipelineId": "34fb6a9f-6d59-4eb8-add6-735fa4efdddd",
"stageId": "9c7f1a05-15d1-4332-8f9a-f6bdfeb2eeee",
"attributes": {
"pb_name": "Deal Name",
"pb_amount": "2300000"
}
}
'import requests
url = "https://connect.pingback.com/v2/deals"
payload = {
"contactId": "36c8c534-fcca-4f79-b3e6-c492f82c2ccc",
"pipelineId": "34fb6a9f-6d59-4eb8-add6-735fa4efdddd",
"stageId": "9c7f1a05-15d1-4332-8f9a-f6bdfeb2eeee",
"attributes": {
"pb_name": "Deal Name",
"pb_amount": "2300000"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contactId: '36c8c534-fcca-4f79-b3e6-c492f82c2ccc',
pipelineId: '34fb6a9f-6d59-4eb8-add6-735fa4efdddd',
stageId: '9c7f1a05-15d1-4332-8f9a-f6bdfeb2eeee',
attributes: {pb_name: 'Deal Name', pb_amount: '2300000'}
})
};
fetch('https://connect.pingback.com/v2/deals', 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://connect.pingback.com/v2/deals",
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([
'contactId' => '36c8c534-fcca-4f79-b3e6-c492f82c2ccc',
'pipelineId' => '34fb6a9f-6d59-4eb8-add6-735fa4efdddd',
'stageId' => '9c7f1a05-15d1-4332-8f9a-f6bdfeb2eeee',
'attributes' => [
'pb_name' => 'Deal Name',
'pb_amount' => '2300000'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://connect.pingback.com/v2/deals"
payload := strings.NewReader("{\n \"contactId\": \"36c8c534-fcca-4f79-b3e6-c492f82c2ccc\",\n \"pipelineId\": \"34fb6a9f-6d59-4eb8-add6-735fa4efdddd\",\n \"stageId\": \"9c7f1a05-15d1-4332-8f9a-f6bdfeb2eeee\",\n \"attributes\": {\n \"pb_name\": \"Deal Name\",\n \"pb_amount\": \"2300000\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-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://connect.pingback.com/v2/deals")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contactId\": \"36c8c534-fcca-4f79-b3e6-c492f82c2ccc\",\n \"pipelineId\": \"34fb6a9f-6d59-4eb8-add6-735fa4efdddd\",\n \"stageId\": \"9c7f1a05-15d1-4332-8f9a-f6bdfeb2eeee\",\n \"attributes\": {\n \"pb_name\": \"Deal Name\",\n \"pb_amount\": \"2300000\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://connect.pingback.com/v2/deals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contactId\": \"36c8c534-fcca-4f79-b3e6-c492f82c2ccc\",\n \"pipelineId\": \"34fb6a9f-6d59-4eb8-add6-735fa4efdddd\",\n \"stageId\": \"9c7f1a05-15d1-4332-8f9a-f6bdfeb2eeee\",\n \"attributes\": {\n \"pb_name\": \"Deal Name\",\n \"pb_amount\": \"2300000\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Deal created",
"data": {
"id": "ea8a2a47-2a05-4a43-b284-35df0ea46333",
"contactId": "36c8c534-fcca-4f79-b3e6-c492f82c2ccc",
"email": "example@email.com"
}
}Autorizações
Corpo
application/json
Esta página foi útil?
⌘I