Inserir Contato do Cliente
curl --request POST \
--url https://api.gestio.com.br/v2/clientecontato \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"codigoDoCliente": 1023,
"seqContato": 1,
"nomeDoContato": "Ana Beatriz Ferreira",
"nomeAbreviado": "Ana Ferreira",
"departamento": "Financeiro",
"telefone": "(11) 4002-8922",
"celular": "(11) 98877-6655",
"email": "[email protected]",
"observacao": "<string>",
"ativo": true
}
'import requests
url = "https://api.gestio.com.br/v2/clientecontato"
payload = {
"codigoDoCliente": 1023,
"seqContato": 1,
"nomeDoContato": "Ana Beatriz Ferreira",
"nomeAbreviado": "Ana Ferreira",
"departamento": "Financeiro",
"telefone": "(11) 4002-8922",
"celular": "(11) 98877-6655",
"email": "[email protected]",
"observacao": "<string>",
"ativo": True
}
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({
codigoDoCliente: 1023,
seqContato: 1,
nomeDoContato: 'Ana Beatriz Ferreira',
nomeAbreviado: 'Ana Ferreira',
departamento: 'Financeiro',
telefone: '(11) 4002-8922',
celular: '(11) 98877-6655',
email: '[email protected]',
observacao: '<string>',
ativo: true
})
};
fetch('https://api.gestio.com.br/v2/clientecontato', 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.gestio.com.br/v2/clientecontato",
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([
'codigoDoCliente' => 1023,
'seqContato' => 1,
'nomeDoContato' => 'Ana Beatriz Ferreira',
'nomeAbreviado' => 'Ana Ferreira',
'departamento' => 'Financeiro',
'telefone' => '(11) 4002-8922',
'celular' => '(11) 98877-6655',
'email' => '[email protected]',
'observacao' => '<string>',
'ativo' => true
]),
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.gestio.com.br/v2/clientecontato"
payload := strings.NewReader("{\n \"codigoDoCliente\": 1023,\n \"seqContato\": 1,\n \"nomeDoContato\": \"Ana Beatriz Ferreira\",\n \"nomeAbreviado\": \"Ana Ferreira\",\n \"departamento\": \"Financeiro\",\n \"telefone\": \"(11) 4002-8922\",\n \"celular\": \"(11) 98877-6655\",\n \"email\": \"[email protected]\",\n \"observacao\": \"<string>\",\n \"ativo\": true\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://api.gestio.com.br/v2/clientecontato")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"codigoDoCliente\": 1023,\n \"seqContato\": 1,\n \"nomeDoContato\": \"Ana Beatriz Ferreira\",\n \"nomeAbreviado\": \"Ana Ferreira\",\n \"departamento\": \"Financeiro\",\n \"telefone\": \"(11) 4002-8922\",\n \"celular\": \"(11) 98877-6655\",\n \"email\": \"[email protected]\",\n \"observacao\": \"<string>\",\n \"ativo\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gestio.com.br/v2/clientecontato")
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 \"codigoDoCliente\": 1023,\n \"seqContato\": 1,\n \"nomeDoContato\": \"Ana Beatriz Ferreira\",\n \"nomeAbreviado\": \"Ana Ferreira\",\n \"departamento\": \"Financeiro\",\n \"telefone\": \"(11) 4002-8922\",\n \"celular\": \"(11) 98877-6655\",\n \"email\": \"[email protected]\",\n \"observacao\": \"<string>\",\n \"ativo\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"codigoDoCliente": 1023,
"seqContato": 1,
"nomeDoContato": "Ana Beatriz Ferreira",
"nomeAbreviado": "Ana Ferreira",
"departamento": "Financeiro",
"telefone": "(11) 4002-8922",
"celular": "(11) 98877-6655",
"email": "[email protected]",
"observacao": "<string>",
"ativo": true
}
}{
"success": false,
"errors": [
{
"key": "<string>",
"value": "<string>",
"dateOccurred": "2023-11-07T05:31:56Z"
}
]
}Contato (Cliente)
Inserir Contato do Cliente
Cria um novo contato vinculado a um cliente. seqContato deve ser maior que zero; email e telefone, quando informados, têm o formato validado.
POST
/
v2
/
clientecontato
Inserir Contato do Cliente
curl --request POST \
--url https://api.gestio.com.br/v2/clientecontato \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"codigoDoCliente": 1023,
"seqContato": 1,
"nomeDoContato": "Ana Beatriz Ferreira",
"nomeAbreviado": "Ana Ferreira",
"departamento": "Financeiro",
"telefone": "(11) 4002-8922",
"celular": "(11) 98877-6655",
"email": "[email protected]",
"observacao": "<string>",
"ativo": true
}
'import requests
url = "https://api.gestio.com.br/v2/clientecontato"
payload = {
"codigoDoCliente": 1023,
"seqContato": 1,
"nomeDoContato": "Ana Beatriz Ferreira",
"nomeAbreviado": "Ana Ferreira",
"departamento": "Financeiro",
"telefone": "(11) 4002-8922",
"celular": "(11) 98877-6655",
"email": "[email protected]",
"observacao": "<string>",
"ativo": True
}
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({
codigoDoCliente: 1023,
seqContato: 1,
nomeDoContato: 'Ana Beatriz Ferreira',
nomeAbreviado: 'Ana Ferreira',
departamento: 'Financeiro',
telefone: '(11) 4002-8922',
celular: '(11) 98877-6655',
email: '[email protected]',
observacao: '<string>',
ativo: true
})
};
fetch('https://api.gestio.com.br/v2/clientecontato', 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.gestio.com.br/v2/clientecontato",
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([
'codigoDoCliente' => 1023,
'seqContato' => 1,
'nomeDoContato' => 'Ana Beatriz Ferreira',
'nomeAbreviado' => 'Ana Ferreira',
'departamento' => 'Financeiro',
'telefone' => '(11) 4002-8922',
'celular' => '(11) 98877-6655',
'email' => '[email protected]',
'observacao' => '<string>',
'ativo' => true
]),
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.gestio.com.br/v2/clientecontato"
payload := strings.NewReader("{\n \"codigoDoCliente\": 1023,\n \"seqContato\": 1,\n \"nomeDoContato\": \"Ana Beatriz Ferreira\",\n \"nomeAbreviado\": \"Ana Ferreira\",\n \"departamento\": \"Financeiro\",\n \"telefone\": \"(11) 4002-8922\",\n \"celular\": \"(11) 98877-6655\",\n \"email\": \"[email protected]\",\n \"observacao\": \"<string>\",\n \"ativo\": true\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://api.gestio.com.br/v2/clientecontato")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"codigoDoCliente\": 1023,\n \"seqContato\": 1,\n \"nomeDoContato\": \"Ana Beatriz Ferreira\",\n \"nomeAbreviado\": \"Ana Ferreira\",\n \"departamento\": \"Financeiro\",\n \"telefone\": \"(11) 4002-8922\",\n \"celular\": \"(11) 98877-6655\",\n \"email\": \"[email protected]\",\n \"observacao\": \"<string>\",\n \"ativo\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gestio.com.br/v2/clientecontato")
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 \"codigoDoCliente\": 1023,\n \"seqContato\": 1,\n \"nomeDoContato\": \"Ana Beatriz Ferreira\",\n \"nomeAbreviado\": \"Ana Ferreira\",\n \"departamento\": \"Financeiro\",\n \"telefone\": \"(11) 4002-8922\",\n \"celular\": \"(11) 98877-6655\",\n \"email\": \"[email protected]\",\n \"observacao\": \"<string>\",\n \"ativo\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"codigoDoCliente": 1023,
"seqContato": 1,
"nomeDoContato": "Ana Beatriz Ferreira",
"nomeAbreviado": "Ana Ferreira",
"departamento": "Financeiro",
"telefone": "(11) 4002-8922",
"celular": "(11) 98877-6655",
"email": "[email protected]",
"observacao": "<string>",
"ativo": true
}
}{
"success": false,
"errors": [
{
"key": "<string>",
"value": "<string>",
"dateOccurred": "2023-11-07T05:31:56Z"
}
]
}Campos obrigatórios ausentes ou inválidos retornam
400 com o detalhe em notifications/errors.Authorizations
Envie o token retornado por /v2/autenticar no header Authorization, no formato Bearer {token}.
Body
application/json
Contato vinculado a um Cliente.
Código do Cliente ao qual o contato pertence.
Example:
1023
Sequência do contato dentro do cliente. Deve ser maior que zero.
Example:
1
Example:
"Ana Beatriz Ferreira"
Example:
"Ana Ferreira"
Example:
"Financeiro"
Formato validado quando informado.
Example:
"(11) 4002-8922"
Formato validado quando informado.
Example:
"(11) 98877-6655"
Formato validado quando informado.
Example:
Example:
true
