curl --request PATCH \
--url https://api.g1.datacrazy.io/api/v1/businesses/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"leadId": "59e77f5f-7581-4f20-a05b-97cd33485019",
"stageId": "59e77f5f-7581-4f20-a05b-97cd33485019",
"attendantId": "59e77f5f-7581-4f20-a05b-97cd33485019",
"externalId": "61ab2k4189lhz01"
}
'import requests
url = "https://api.g1.datacrazy.io/api/v1/businesses/{id}"
payload = {
"leadId": "59e77f5f-7581-4f20-a05b-97cd33485019",
"stageId": "59e77f5f-7581-4f20-a05b-97cd33485019",
"attendantId": "59e77f5f-7581-4f20-a05b-97cd33485019",
"externalId": "61ab2k4189lhz01"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
leadId: '59e77f5f-7581-4f20-a05b-97cd33485019',
stageId: '59e77f5f-7581-4f20-a05b-97cd33485019',
attendantId: '59e77f5f-7581-4f20-a05b-97cd33485019',
externalId: '61ab2k4189lhz01'
})
};
fetch('https://api.g1.datacrazy.io/api/v1/businesses/{id}', 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.g1.datacrazy.io/api/v1/businesses/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'leadId' => '59e77f5f-7581-4f20-a05b-97cd33485019',
'stageId' => '59e77f5f-7581-4f20-a05b-97cd33485019',
'attendantId' => '59e77f5f-7581-4f20-a05b-97cd33485019',
'externalId' => '61ab2k4189lhz01'
]),
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://api.g1.datacrazy.io/api/v1/businesses/{id}"
payload := strings.NewReader("{\n \"leadId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"stageId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"attendantId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"externalId\": \"61ab2k4189lhz01\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.g1.datacrazy.io/api/v1/businesses/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"leadId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"stageId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"attendantId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"externalId\": \"61ab2k4189lhz01\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.g1.datacrazy.io/api/v1/businesses/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"leadId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"stageId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"attendantId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"externalId\": \"61ab2k4189lhz01\"\n}"
response = http.request(request)
puts response.read_body{
"id": "e9a09677-cf00-4d84-aa12-6d78d6786555",
"createdAt": "2025-06-18T22:18:36.666Z",
"stageId": "e6803a51-4bd6-416b-b516-3622ff256732",
"leadId": "c1152508-fdfd-4905-a3f4-f3850cc00bf0",
"attendantId": "7e7da46a-a0ed-43c2-a3aa-3ac253f41b4d",
"nextActivityId": "3d3d23a-a0ed-43c2-a3aa-3ac23433f41g01",
"total": "70000",
"discount": 500,
"addition": 0,
"shipping": 2000,
"coupon": "CUPOM100",
"shippingType": "Sedex",
"status": "in_process",
"code": 50607,
"externalId": "f33420908-dcdc-4905-a3f4-f3850cc43bf0",
"lastMovedAt": "2025-06-18T22:18:36.611Z",
"statusChangedAt": "2025-06-18T22:20:14.611Z4",
"products": [],
"lossReasonId": "null",
"justification": "",
"productsCount": 2
}Atualizar negócio
curl --request PATCH \
--url https://api.g1.datacrazy.io/api/v1/businesses/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"leadId": "59e77f5f-7581-4f20-a05b-97cd33485019",
"stageId": "59e77f5f-7581-4f20-a05b-97cd33485019",
"attendantId": "59e77f5f-7581-4f20-a05b-97cd33485019",
"externalId": "61ab2k4189lhz01"
}
'import requests
url = "https://api.g1.datacrazy.io/api/v1/businesses/{id}"
payload = {
"leadId": "59e77f5f-7581-4f20-a05b-97cd33485019",
"stageId": "59e77f5f-7581-4f20-a05b-97cd33485019",
"attendantId": "59e77f5f-7581-4f20-a05b-97cd33485019",
"externalId": "61ab2k4189lhz01"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
leadId: '59e77f5f-7581-4f20-a05b-97cd33485019',
stageId: '59e77f5f-7581-4f20-a05b-97cd33485019',
attendantId: '59e77f5f-7581-4f20-a05b-97cd33485019',
externalId: '61ab2k4189lhz01'
})
};
fetch('https://api.g1.datacrazy.io/api/v1/businesses/{id}', 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.g1.datacrazy.io/api/v1/businesses/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'leadId' => '59e77f5f-7581-4f20-a05b-97cd33485019',
'stageId' => '59e77f5f-7581-4f20-a05b-97cd33485019',
'attendantId' => '59e77f5f-7581-4f20-a05b-97cd33485019',
'externalId' => '61ab2k4189lhz01'
]),
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://api.g1.datacrazy.io/api/v1/businesses/{id}"
payload := strings.NewReader("{\n \"leadId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"stageId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"attendantId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"externalId\": \"61ab2k4189lhz01\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.g1.datacrazy.io/api/v1/businesses/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"leadId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"stageId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"attendantId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"externalId\": \"61ab2k4189lhz01\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.g1.datacrazy.io/api/v1/businesses/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"leadId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"stageId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"attendantId\": \"59e77f5f-7581-4f20-a05b-97cd33485019\",\n \"externalId\": \"61ab2k4189lhz01\"\n}"
response = http.request(request)
puts response.read_body{
"id": "e9a09677-cf00-4d84-aa12-6d78d6786555",
"createdAt": "2025-06-18T22:18:36.666Z",
"stageId": "e6803a51-4bd6-416b-b516-3622ff256732",
"leadId": "c1152508-fdfd-4905-a3f4-f3850cc00bf0",
"attendantId": "7e7da46a-a0ed-43c2-a3aa-3ac253f41b4d",
"nextActivityId": "3d3d23a-a0ed-43c2-a3aa-3ac23433f41g01",
"total": "70000",
"discount": 500,
"addition": 0,
"shipping": 2000,
"coupon": "CUPOM100",
"shippingType": "Sedex",
"status": "in_process",
"code": 50607,
"externalId": "f33420908-dcdc-4905-a3f4-f3850cc43bf0",
"lastMovedAt": "2025-06-18T22:18:36.611Z",
"statusChangedAt": "2025-06-18T22:20:14.611Z4",
"products": [],
"lossReasonId": "null",
"justification": "",
"productsCount": 2
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
ID do lead a ser vinculado ao negócio
"59e77f5f-7581-4f20-a05b-97cd33485019"
ID do estágio de pipeline no qual o negócio será criado
"59e77f5f-7581-4f20-a05b-97cd33485019"
ID do atendente a ser vinculado ao negócio
"59e77f5f-7581-4f20-a05b-97cd33485019"
ID externo a ser vinculado ao negócio
"61ab2k4189lhz01"
Response
ID do negócio.
"e9a09677-cf00-4d84-aa12-6d78d6786555"
Data de criação do negócio.
"2025-06-18T22:18:36.666Z"
ID do estágio atual do negócio.
"e6803a51-4bd6-416b-b516-3622ff256732"
ID do lead associado ao negócio.
"c1152508-fdfd-4905-a3f4-f3850cc00bf0"
ID do atendente responsável pelo negócio.
"7e7da46a-a0ed-43c2-a3aa-3ac253f41b4d"
ID da próxima atividade relacionada ao negócio.
"3d3d23a-a0ed-43c2-a3aa-3ac23433f41g01"
Valor total do negócio.
"70000"
Valor de desconto aplicado ao negócio.
500
Valor de acréscimos aplicados ao negócio.
0
Valor do frete relacionado ao negócio.
2000
Cupom de desconto utilizado no negócio.
"CUPOM100"
Tipo de frete selecionado para o negócio.
"Sedex"
Status atual do negócio.
"in_process"
Código interno do negócio.
50607
ID externo vinculado ao negócio.
"f33420908-dcdc-4905-a3f4-f3850cc43bf0"
Data da última movimentação do negócio.
"2025-06-18T22:18:36.611Z"
Data da última alteração do status do negócio.
"2025-06-18T22:20:14.611Z4"
Lista de produtos associados ao negócio.
Show child attributes
Show child attributes
[]
ID do motivo de perda do negócio.
null
Justificativa associada ao negócio.
""
Quantidade total de produtos no negócio.
2