curl --request POST \
--url https://sandbox.api.veepag.com/v1/client \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"companyId": "company_id",
"name": "Cliente Teste",
"doc": "12345678909",
"email": "cliente@example.com"
}
'import requests
url = "https://sandbox.api.veepag.com/v1/client"
payload = {
"companyId": "company_id",
"name": "Cliente Teste",
"doc": "12345678909",
"email": "cliente@example.com"
}
headers = {
"apiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
companyId: 'company_id',
name: 'Cliente Teste',
doc: '12345678909',
email: 'cliente@example.com'
})
};
fetch('https://sandbox.api.veepag.com/v1/client', 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://sandbox.api.veepag.com/v1/client",
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([
'companyId' => 'company_id',
'name' => 'Cliente Teste',
'doc' => '12345678909',
'email' => 'cliente@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apiKey: <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://sandbox.api.veepag.com/v1/client"
payload := strings.NewReader("{\n \"companyId\": \"company_id\",\n \"name\": \"Cliente Teste\",\n \"doc\": \"12345678909\",\n \"email\": \"cliente@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<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://sandbox.api.veepag.com/v1/client")
.header("apiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyId\": \"company_id\",\n \"name\": \"Cliente Teste\",\n \"doc\": \"12345678909\",\n \"email\": \"cliente@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.veepag.com/v1/client")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyId\": \"company_id\",\n \"name\": \"Cliente Teste\",\n \"doc\": \"12345678909\",\n \"email\": \"cliente@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "client_id",
"companyId": "company_id",
"name": "Cliente Teste",
"doc": "12345678909"
}{
"error_messages": [
{
"msg": "Payload invalido.",
"type": "field",
"path": "companyId",
"location": "body"
}
],
"code": "ZodValidationException",
"path": "/v1/client",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unauthorized."
}
],
"code": "unauthorized",
"path": "/v1/client",
"metadata": {}
}{
"error_messages": [
{
"msg": "Forbidden."
}
],
"code": "forbidden",
"path": "/v1/client",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unknown server error."
}
],
"code": "unknown_server_error",
"path": "/v1/client",
"metadata": {}
}Criar cliente
Cria um cliente. O documento e normalizado para numeros e validado como CPF ou CNPJ.
curl --request POST \
--url https://sandbox.api.veepag.com/v1/client \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"companyId": "company_id",
"name": "Cliente Teste",
"doc": "12345678909",
"email": "cliente@example.com"
}
'import requests
url = "https://sandbox.api.veepag.com/v1/client"
payload = {
"companyId": "company_id",
"name": "Cliente Teste",
"doc": "12345678909",
"email": "cliente@example.com"
}
headers = {
"apiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
companyId: 'company_id',
name: 'Cliente Teste',
doc: '12345678909',
email: 'cliente@example.com'
})
};
fetch('https://sandbox.api.veepag.com/v1/client', 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://sandbox.api.veepag.com/v1/client",
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([
'companyId' => 'company_id',
'name' => 'Cliente Teste',
'doc' => '12345678909',
'email' => 'cliente@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apiKey: <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://sandbox.api.veepag.com/v1/client"
payload := strings.NewReader("{\n \"companyId\": \"company_id\",\n \"name\": \"Cliente Teste\",\n \"doc\": \"12345678909\",\n \"email\": \"cliente@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<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://sandbox.api.veepag.com/v1/client")
.header("apiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyId\": \"company_id\",\n \"name\": \"Cliente Teste\",\n \"doc\": \"12345678909\",\n \"email\": \"cliente@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.veepag.com/v1/client")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyId\": \"company_id\",\n \"name\": \"Cliente Teste\",\n \"doc\": \"12345678909\",\n \"email\": \"cliente@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "client_id",
"companyId": "company_id",
"name": "Cliente Teste",
"doc": "12345678909"
}{
"error_messages": [
{
"msg": "Payload invalido.",
"type": "field",
"path": "companyId",
"location": "body"
}
],
"code": "ZodValidationException",
"path": "/v1/client",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unauthorized."
}
],
"code": "unauthorized",
"path": "/v1/client",
"metadata": {}
}{
"error_messages": [
{
"msg": "Forbidden."
}
],
"code": "forbidden",
"path": "/v1/client",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unknown server error."
}
],
"code": "unknown_server_error",
"path": "/v1/client",
"metadata": {}
}Authorizations
API key no formato keyId.secret.
Body
ID da empresa vinculada ao cliente.
1Nome do cliente. Nao aceita numeros ou caracteres especiais.
1CPF ou CNPJ valido do cliente.
1Tipo do cliente, conforme enum aceito pela API.
INDIVIDUAL, COMPANY Identificador externo da sua aplicacao para conciliacao.
Data de nascimento do cliente, quando disponivel.
E-mail do cliente.
Lista de telefones do cliente.
Observacao interna sobre o cliente.
Endereco do cliente.
Show child attributes
Show child attributes
Dados do dispositivo do cliente, quando coletados no fluxo de compra.
Show child attributes
Show child attributes
IP do cliente, quando disponivel.
Response
Cliente criado.
ID do cliente.
ID da empresa vinculada ao cliente.
Nome do cliente.
Documento do cliente.
CPF do cliente, quando presente no payload legado.
E-mail do cliente.
Telefones do cliente.
Status do cliente.
ACTIVE, ERROR_PAYMENT, PENDING_PAYMENT, NO_PAYMENT, CANCELED_ALERT_ETHOCA Tipo do cliente.
INDIVIDUAL, COMPANY Indica se o cliente esta ativo.
Indica exclusao logica do cliente, quando preenchido.
Referencia externa da sua aplicacao.
Data de criacao do cliente.
Data da ultima atualizacao do cliente.
Was this page helpful?
