Create a deal
curl --request POST \
--url https://api4.kinbox.com.br/v1/deals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"value": 123,
"pipelineId": "<string>",
"stageId": "<string>",
"customFields": {},
"contactId": 123,
"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",
"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>"
}
}
'import requests
url = "https://api4.kinbox.com.br/v1/deals"
payload = {
"name": "<string>",
"value": 123,
"pipelineId": "<string>",
"stageId": "<string>",
"customFields": {},
"contactId": 123,
"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",
"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>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
value: 123,
pipelineId: '<string>',
stageId: '<string>',
customFields: {},
contactId: 123,
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',
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>'}
})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'value' => 123,
'pipelineId' => '<string>',
'stageId' => '<string>',
'customFields' => [
],
'contactId' => 123,
'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',
'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>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api4.kinbox.com.br/v1/deals"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"value\": 123,\n \"pipelineId\": \"<string>\",\n \"stageId\": \"<string>\",\n \"customFields\": {},\n \"contactId\": 123,\n \"lostReason\": [\n \"<string>\"\n ],\n \"productsLostReason\": [\n {}\n ],\n \"products\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"price\": 123,\n \"quantity\": 123,\n \"discount\": 123,\n \"total\": 123\n }\n ],\n \"lostReasonObs\": \"<string>\",\n \"wonLostDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"operatorId\": 123,\n \"groupId\": 123,\n \"origin\": \"<string>\",\n \"campaign\": \"<string>\",\n \"authorId\": {},\n \"tagIds\": [\n 123\n ],\n \"position\": 123,\n \"focusedCounts\": 123,\n \"tasks\": {},\n \"timeInStage\": {},\n \"lastStageChanged\": \"2023-11-07T05:31:56Z\",\n \"comments\": 123,\n \"context\": {\n \"automationId\": \"<string>\",\n \"importId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api4.kinbox.com.br/v1/deals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"value\": 123,\n \"pipelineId\": \"<string>\",\n \"stageId\": \"<string>\",\n \"customFields\": {},\n \"contactId\": 123,\n \"lostReason\": [\n \"<string>\"\n ],\n \"productsLostReason\": [\n {}\n ],\n \"products\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"price\": 123,\n \"quantity\": 123,\n \"discount\": 123,\n \"total\": 123\n }\n ],\n \"lostReasonObs\": \"<string>\",\n \"wonLostDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"operatorId\": 123,\n \"groupId\": 123,\n \"origin\": \"<string>\",\n \"campaign\": \"<string>\",\n \"authorId\": {},\n \"tagIds\": [\n 123\n ],\n \"position\": 123,\n \"focusedCounts\": 123,\n \"tasks\": {},\n \"timeInStage\": {},\n \"lastStageChanged\": \"2023-11-07T05:31:56Z\",\n \"comments\": 123,\n \"context\": {\n \"automationId\": \"<string>\",\n \"importId\": \"<string>\"\n }\n}")
.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::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"value\": 123,\n \"pipelineId\": \"<string>\",\n \"stageId\": \"<string>\",\n \"customFields\": {},\n \"contactId\": 123,\n \"lostReason\": [\n \"<string>\"\n ],\n \"productsLostReason\": [\n {}\n ],\n \"products\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"price\": 123,\n \"quantity\": 123,\n \"discount\": 123,\n \"total\": 123\n }\n ],\n \"lostReasonObs\": \"<string>\",\n \"wonLostDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"operatorId\": 123,\n \"groupId\": 123,\n \"origin\": \"<string>\",\n \"campaign\": \"<string>\",\n \"authorId\": {},\n \"tagIds\": [\n 123\n ],\n \"position\": 123,\n \"focusedCounts\": 123,\n \"tasks\": {},\n \"timeInStage\": {},\n \"lastStageChanged\": \"2023-11-07T05:31:56Z\",\n \"comments\": 123,\n \"context\": {\n \"automationId\": \"<string>\",\n \"importId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"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>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Nome do negócio
Valor em dinheiro do negócio
Status do negócio
open, won, lost ID do pipeline associado ao negócio
Show child attributes
Show child attributes
ID do contato associado ao negócio.
Motivos de perda
Motivos de perda por produto
Show child attributes
Show child attributes
Observação de perda
Data de perda ou ganho
Data de vencimento
Conversa associada ao negócio
Show child attributes
Show child attributes
ID do usuário responsável pelo negócio
ID do grupo associado ao negócio
user, bot, automation, workflow, unknown, cadence, api Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Nome do negócio
Valor em dinheiro do negócio
Status do negócio
open, won, lost ID do pipeline associado ao negócio
Show child attributes
Show child attributes
Motivos de perda
Motivos de perda por produto
Show child attributes
Show child attributes
Observação de perda
Data de perda ou ganho
Data de vencimento
Contato associado ao negócio
Show child attributes
Show child attributes
Conversa associada ao negócio
Show child attributes
Show child attributes
ID do usuário responsável pelo negócio
ID do grupo associado ao negócio
user, bot, automation, workflow, unknown, cadence, api Show child attributes
Show child attributes
Show child attributes
Show child attributes
curl --request POST \
--url https://api4.kinbox.com.br/v1/deals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"value": 123,
"pipelineId": "<string>",
"stageId": "<string>",
"customFields": {},
"contactId": 123,
"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",
"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>"
}
}
'import requests
url = "https://api4.kinbox.com.br/v1/deals"
payload = {
"name": "<string>",
"value": 123,
"pipelineId": "<string>",
"stageId": "<string>",
"customFields": {},
"contactId": 123,
"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",
"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>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
value: 123,
pipelineId: '<string>',
stageId: '<string>',
customFields: {},
contactId: 123,
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',
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>'}
})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'value' => 123,
'pipelineId' => '<string>',
'stageId' => '<string>',
'customFields' => [
],
'contactId' => 123,
'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',
'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>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api4.kinbox.com.br/v1/deals"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"value\": 123,\n \"pipelineId\": \"<string>\",\n \"stageId\": \"<string>\",\n \"customFields\": {},\n \"contactId\": 123,\n \"lostReason\": [\n \"<string>\"\n ],\n \"productsLostReason\": [\n {}\n ],\n \"products\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"price\": 123,\n \"quantity\": 123,\n \"discount\": 123,\n \"total\": 123\n }\n ],\n \"lostReasonObs\": \"<string>\",\n \"wonLostDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"operatorId\": 123,\n \"groupId\": 123,\n \"origin\": \"<string>\",\n \"campaign\": \"<string>\",\n \"authorId\": {},\n \"tagIds\": [\n 123\n ],\n \"position\": 123,\n \"focusedCounts\": 123,\n \"tasks\": {},\n \"timeInStage\": {},\n \"lastStageChanged\": \"2023-11-07T05:31:56Z\",\n \"comments\": 123,\n \"context\": {\n \"automationId\": \"<string>\",\n \"importId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api4.kinbox.com.br/v1/deals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"value\": 123,\n \"pipelineId\": \"<string>\",\n \"stageId\": \"<string>\",\n \"customFields\": {},\n \"contactId\": 123,\n \"lostReason\": [\n \"<string>\"\n ],\n \"productsLostReason\": [\n {}\n ],\n \"products\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"price\": 123,\n \"quantity\": 123,\n \"discount\": 123,\n \"total\": 123\n }\n ],\n \"lostReasonObs\": \"<string>\",\n \"wonLostDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"operatorId\": 123,\n \"groupId\": 123,\n \"origin\": \"<string>\",\n \"campaign\": \"<string>\",\n \"authorId\": {},\n \"tagIds\": [\n 123\n ],\n \"position\": 123,\n \"focusedCounts\": 123,\n \"tasks\": {},\n \"timeInStage\": {},\n \"lastStageChanged\": \"2023-11-07T05:31:56Z\",\n \"comments\": 123,\n \"context\": {\n \"automationId\": \"<string>\",\n \"importId\": \"<string>\"\n }\n}")
.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::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"value\": 123,\n \"pipelineId\": \"<string>\",\n \"stageId\": \"<string>\",\n \"customFields\": {},\n \"contactId\": 123,\n \"lostReason\": [\n \"<string>\"\n ],\n \"productsLostReason\": [\n {}\n ],\n \"products\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"price\": 123,\n \"quantity\": 123,\n \"discount\": 123,\n \"total\": 123\n }\n ],\n \"lostReasonObs\": \"<string>\",\n \"wonLostDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"operatorId\": 123,\n \"groupId\": 123,\n \"origin\": \"<string>\",\n \"campaign\": \"<string>\",\n \"authorId\": {},\n \"tagIds\": [\n 123\n ],\n \"position\": 123,\n \"focusedCounts\": 123,\n \"tasks\": {},\n \"timeInStage\": {},\n \"lastStageChanged\": \"2023-11-07T05:31:56Z\",\n \"comments\": 123,\n \"context\": {\n \"automationId\": \"<string>\",\n \"importId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"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>"
}
}