Negócios
List all deals
GET
/
v1
/
deals
List all deals
curl --request GET \
--url https://api4.kinbox.com.br/v1/deals \
--header 'Authorization: Bearer <token>'import requests
url = "https://api4.kinbox.com.br/v1/deals"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api4.kinbox.com.br/v1/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://api4.kinbox.com.br/v1/deals",
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>"
],
]);
$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://api4.kinbox.com.br/v1/deals"
req, _ := http.NewRequest("GET", url, nil)
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://api4.kinbox.com.br/v1/deals")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api4.kinbox.com.br/v1/deals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"name": "<string>",
"value": 123,
"pipelineId": "<string>",
"stageId": "<string>",
"customFields": {},
"lostReason": [
"<string>"
],
"productsLostReason": [
{}
],
"products": [
{
"id": "<string>",
"name": "<string>",
"price": 123,
"quantity": 123,
"discount": 123,
"total": 123
}
],
"lostReasonObs": "<string>",
"wonLostDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"contact": {
"id": 123,
"name": "<string>",
"avatar": "<string>",
"phone": "<string>",
"email": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"isPrivate": true
},
"conversation": {
"id": 123,
"platformId": 123,
"showPending": true,
"lastMessageAt": "2023-11-07T05:31:56Z",
"pendingAt": "2023-11-07T05:31:56Z"
},
"operatorId": 123,
"groupId": 123,
"origin": "<string>",
"campaign": "<string>",
"authorId": {},
"tagIds": [
123
],
"position": 123,
"focusedCounts": 123,
"tasks": {},
"timeInStage": {},
"lastStageChanged": "2023-11-07T05:31:56Z",
"comments": 123,
"context": {
"automationId": "<string>",
"importId": "<string>"
}
}
],
"nextCursor": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
A limit on the number of objects to be returned. Limit can range between 1 and 100.
A cursor for use in pagination. The cursor is the id of the last object returned in the previous request.
Filter deals by pipeline id.
Filter deals by status (open, won, lost).
Available options:
open, won, lost Filter deals by the id of the contact associated with the deal.
Only return deals that were created after this date.
Only return deals that were created before this date.
Only return deals that were won or lost after this date.
Only return deals that were won or lost before this date.
⌘I
List all deals
curl --request GET \
--url https://api4.kinbox.com.br/v1/deals \
--header 'Authorization: Bearer <token>'import requests
url = "https://api4.kinbox.com.br/v1/deals"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api4.kinbox.com.br/v1/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://api4.kinbox.com.br/v1/deals",
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>"
],
]);
$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://api4.kinbox.com.br/v1/deals"
req, _ := http.NewRequest("GET", url, nil)
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://api4.kinbox.com.br/v1/deals")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api4.kinbox.com.br/v1/deals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"name": "<string>",
"value": 123,
"pipelineId": "<string>",
"stageId": "<string>",
"customFields": {},
"lostReason": [
"<string>"
],
"productsLostReason": [
{}
],
"products": [
{
"id": "<string>",
"name": "<string>",
"price": 123,
"quantity": 123,
"discount": 123,
"total": 123
}
],
"lostReasonObs": "<string>",
"wonLostDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"contact": {
"id": 123,
"name": "<string>",
"avatar": "<string>",
"phone": "<string>",
"email": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"isPrivate": true
},
"conversation": {
"id": 123,
"platformId": 123,
"showPending": true,
"lastMessageAt": "2023-11-07T05:31:56Z",
"pendingAt": "2023-11-07T05:31:56Z"
},
"operatorId": 123,
"groupId": 123,
"origin": "<string>",
"campaign": "<string>",
"authorId": {},
"tagIds": [
123
],
"position": 123,
"focusedCounts": 123,
"tasks": {},
"timeInStage": {},
"lastStageChanged": "2023-11-07T05:31:56Z",
"comments": 123,
"context": {
"automationId": "<string>",
"importId": "<string>"
}
}
],
"nextCursor": {}
}