cURL
curl --request POST \
--url https://api.example.com/holders \
--header 'Content-Type: application/json' \
--header 'client_id: <api-key>' \
--header 'secret_key: <api-key>' \
--data '
{
"name": "<string>",
"federalTaxId": "<string>",
"address": {
"street": "<string>",
"streetNumber": "<string>",
"zipcode": "<string>",
"neighborhood": "<string>",
"cityId": "<string>",
"countryId": "BRA",
"complement": "<string>"
},
"contact": {
"phone": {
"countryCode": "<string>",
"phoneNumber": "<string>"
},
"email": "jsmith@example.com"
},
"modules": {
"tax": {
"icmsTaxPayer": true,
"isGovernmentEntity": true
},
"billing": {
"brokerId": "<string>"
}
},
"cityTaxIds": [
{
"taxId": "<string>",
"cityId": "<string>"
}
],
"stateTaxIds": [
{
"taxId": "<string>",
"stateId": "<string>"
}
],
"externalCode": "<string>",
"brokerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exempted": true
}
'import requests
url = "https://api.example.com/holders"
payload = {
"name": "<string>",
"federalTaxId": "<string>",
"address": {
"street": "<string>",
"streetNumber": "<string>",
"zipcode": "<string>",
"neighborhood": "<string>",
"cityId": "<string>",
"countryId": "BRA",
"complement": "<string>"
},
"contact": {
"phone": {
"countryCode": "<string>",
"phoneNumber": "<string>"
},
"email": "jsmith@example.com"
},
"modules": {
"tax": {
"icmsTaxPayer": True,
"isGovernmentEntity": True
},
"billing": { "brokerId": "<string>" }
},
"cityTaxIds": [
{
"taxId": "<string>",
"cityId": "<string>"
}
],
"stateTaxIds": [
{
"taxId": "<string>",
"stateId": "<string>"
}
],
"externalCode": "<string>",
"brokerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exempted": True
}
headers = {
"client_id": "<api-key>",
"secret_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
client_id: '<api-key>',
secret_key: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
federalTaxId: '<string>',
address: {
street: '<string>',
streetNumber: '<string>',
zipcode: '<string>',
neighborhood: '<string>',
cityId: '<string>',
countryId: 'BRA',
complement: '<string>'
},
contact: {
phone: {countryCode: '<string>', phoneNumber: '<string>'},
email: 'jsmith@example.com'
},
modules: {
tax: {icmsTaxPayer: true, isGovernmentEntity: true},
billing: {brokerId: '<string>'}
},
cityTaxIds: [{taxId: '<string>', cityId: '<string>'}],
stateTaxIds: [{taxId: '<string>', stateId: '<string>'}],
externalCode: '<string>',
brokerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
exempted: true
})
};
fetch('https://api.example.com/holders', 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.example.com/holders",
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>',
'federalTaxId' => '<string>',
'address' => [
'street' => '<string>',
'streetNumber' => '<string>',
'zipcode' => '<string>',
'neighborhood' => '<string>',
'cityId' => '<string>',
'countryId' => 'BRA',
'complement' => '<string>'
],
'contact' => [
'phone' => [
'countryCode' => '<string>',
'phoneNumber' => '<string>'
],
'email' => 'jsmith@example.com'
],
'modules' => [
'tax' => [
'icmsTaxPayer' => true,
'isGovernmentEntity' => true
],
'billing' => [
'brokerId' => '<string>'
]
],
'cityTaxIds' => [
[
'taxId' => '<string>',
'cityId' => '<string>'
]
],
'stateTaxIds' => [
[
'taxId' => '<string>',
'stateId' => '<string>'
]
],
'externalCode' => '<string>',
'brokerId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'exempted' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"client_id: <api-key>",
"secret_key: <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://api.example.com/holders"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"federalTaxId\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"streetNumber\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"cityId\": \"<string>\",\n \"countryId\": \"BRA\",\n \"complement\": \"<string>\"\n },\n \"contact\": {\n \"phone\": {\n \"countryCode\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n },\n \"email\": \"jsmith@example.com\"\n },\n \"modules\": {\n \"tax\": {\n \"icmsTaxPayer\": true,\n \"isGovernmentEntity\": true\n },\n \"billing\": {\n \"brokerId\": \"<string>\"\n }\n },\n \"cityTaxIds\": [\n {\n \"taxId\": \"<string>\",\n \"cityId\": \"<string>\"\n }\n ],\n \"stateTaxIds\": [\n {\n \"taxId\": \"<string>\",\n \"stateId\": \"<string>\"\n }\n ],\n \"externalCode\": \"<string>\",\n \"brokerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"exempted\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("secret_key", "<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://api.example.com/holders")
.header("client_id", "<api-key>")
.header("secret_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"federalTaxId\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"streetNumber\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"cityId\": \"<string>\",\n \"countryId\": \"BRA\",\n \"complement\": \"<string>\"\n },\n \"contact\": {\n \"phone\": {\n \"countryCode\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n },\n \"email\": \"jsmith@example.com\"\n },\n \"modules\": {\n \"tax\": {\n \"icmsTaxPayer\": true,\n \"isGovernmentEntity\": true\n },\n \"billing\": {\n \"brokerId\": \"<string>\"\n }\n },\n \"cityTaxIds\": [\n {\n \"taxId\": \"<string>\",\n \"cityId\": \"<string>\"\n }\n ],\n \"stateTaxIds\": [\n {\n \"taxId\": \"<string>\",\n \"stateId\": \"<string>\"\n }\n ],\n \"externalCode\": \"<string>\",\n \"brokerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"exempted\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/holders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client_id"] = '<api-key>'
request["secret_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"federalTaxId\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"streetNumber\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"cityId\": \"<string>\",\n \"countryId\": \"BRA\",\n \"complement\": \"<string>\"\n },\n \"contact\": {\n \"phone\": {\n \"countryCode\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n },\n \"email\": \"jsmith@example.com\"\n },\n \"modules\": {\n \"tax\": {\n \"icmsTaxPayer\": true,\n \"isGovernmentEntity\": true\n },\n \"billing\": {\n \"brokerId\": \"<string>\"\n }\n },\n \"cityTaxIds\": [\n {\n \"taxId\": \"<string>\",\n \"cityId\": \"<string>\"\n }\n ],\n \"stateTaxIds\": [\n {\n \"taxId\": \"<string>\",\n \"stateId\": \"<string>\"\n }\n ],\n \"externalCode\": \"<string>\",\n \"brokerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"exempted\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"federalTaxId": "<string>",
"contact": {
"phone": {
"countryCode": "<string>",
"areaCode": "<string>",
"phoneNumber": "<string>"
},
"email": "<string>"
},
"address": {
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"complement": "<string>"
},
"exempted": true,
"createdAt": "<string>",
"modules": {
"tax": {
"icmsTaxPayer": true,
"communicationServiceCustomerCategory": "<string>",
"isGovernmentEntity": true
},
"billing": {
"brokerId": "<string>"
}
},
"externalCode": "<string>",
"brokerId": "<string>"
}Holders
Create holder
POST
/
holders
cURL
curl --request POST \
--url https://api.example.com/holders \
--header 'Content-Type: application/json' \
--header 'client_id: <api-key>' \
--header 'secret_key: <api-key>' \
--data '
{
"name": "<string>",
"federalTaxId": "<string>",
"address": {
"street": "<string>",
"streetNumber": "<string>",
"zipcode": "<string>",
"neighborhood": "<string>",
"cityId": "<string>",
"countryId": "BRA",
"complement": "<string>"
},
"contact": {
"phone": {
"countryCode": "<string>",
"phoneNumber": "<string>"
},
"email": "jsmith@example.com"
},
"modules": {
"tax": {
"icmsTaxPayer": true,
"isGovernmentEntity": true
},
"billing": {
"brokerId": "<string>"
}
},
"cityTaxIds": [
{
"taxId": "<string>",
"cityId": "<string>"
}
],
"stateTaxIds": [
{
"taxId": "<string>",
"stateId": "<string>"
}
],
"externalCode": "<string>",
"brokerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exempted": true
}
'import requests
url = "https://api.example.com/holders"
payload = {
"name": "<string>",
"federalTaxId": "<string>",
"address": {
"street": "<string>",
"streetNumber": "<string>",
"zipcode": "<string>",
"neighborhood": "<string>",
"cityId": "<string>",
"countryId": "BRA",
"complement": "<string>"
},
"contact": {
"phone": {
"countryCode": "<string>",
"phoneNumber": "<string>"
},
"email": "jsmith@example.com"
},
"modules": {
"tax": {
"icmsTaxPayer": True,
"isGovernmentEntity": True
},
"billing": { "brokerId": "<string>" }
},
"cityTaxIds": [
{
"taxId": "<string>",
"cityId": "<string>"
}
],
"stateTaxIds": [
{
"taxId": "<string>",
"stateId": "<string>"
}
],
"externalCode": "<string>",
"brokerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exempted": True
}
headers = {
"client_id": "<api-key>",
"secret_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
client_id: '<api-key>',
secret_key: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
federalTaxId: '<string>',
address: {
street: '<string>',
streetNumber: '<string>',
zipcode: '<string>',
neighborhood: '<string>',
cityId: '<string>',
countryId: 'BRA',
complement: '<string>'
},
contact: {
phone: {countryCode: '<string>', phoneNumber: '<string>'},
email: 'jsmith@example.com'
},
modules: {
tax: {icmsTaxPayer: true, isGovernmentEntity: true},
billing: {brokerId: '<string>'}
},
cityTaxIds: [{taxId: '<string>', cityId: '<string>'}],
stateTaxIds: [{taxId: '<string>', stateId: '<string>'}],
externalCode: '<string>',
brokerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
exempted: true
})
};
fetch('https://api.example.com/holders', 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.example.com/holders",
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>',
'federalTaxId' => '<string>',
'address' => [
'street' => '<string>',
'streetNumber' => '<string>',
'zipcode' => '<string>',
'neighborhood' => '<string>',
'cityId' => '<string>',
'countryId' => 'BRA',
'complement' => '<string>'
],
'contact' => [
'phone' => [
'countryCode' => '<string>',
'phoneNumber' => '<string>'
],
'email' => 'jsmith@example.com'
],
'modules' => [
'tax' => [
'icmsTaxPayer' => true,
'isGovernmentEntity' => true
],
'billing' => [
'brokerId' => '<string>'
]
],
'cityTaxIds' => [
[
'taxId' => '<string>',
'cityId' => '<string>'
]
],
'stateTaxIds' => [
[
'taxId' => '<string>',
'stateId' => '<string>'
]
],
'externalCode' => '<string>',
'brokerId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'exempted' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"client_id: <api-key>",
"secret_key: <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://api.example.com/holders"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"federalTaxId\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"streetNumber\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"cityId\": \"<string>\",\n \"countryId\": \"BRA\",\n \"complement\": \"<string>\"\n },\n \"contact\": {\n \"phone\": {\n \"countryCode\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n },\n \"email\": \"jsmith@example.com\"\n },\n \"modules\": {\n \"tax\": {\n \"icmsTaxPayer\": true,\n \"isGovernmentEntity\": true\n },\n \"billing\": {\n \"brokerId\": \"<string>\"\n }\n },\n \"cityTaxIds\": [\n {\n \"taxId\": \"<string>\",\n \"cityId\": \"<string>\"\n }\n ],\n \"stateTaxIds\": [\n {\n \"taxId\": \"<string>\",\n \"stateId\": \"<string>\"\n }\n ],\n \"externalCode\": \"<string>\",\n \"brokerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"exempted\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("secret_key", "<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://api.example.com/holders")
.header("client_id", "<api-key>")
.header("secret_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"federalTaxId\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"streetNumber\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"cityId\": \"<string>\",\n \"countryId\": \"BRA\",\n \"complement\": \"<string>\"\n },\n \"contact\": {\n \"phone\": {\n \"countryCode\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n },\n \"email\": \"jsmith@example.com\"\n },\n \"modules\": {\n \"tax\": {\n \"icmsTaxPayer\": true,\n \"isGovernmentEntity\": true\n },\n \"billing\": {\n \"brokerId\": \"<string>\"\n }\n },\n \"cityTaxIds\": [\n {\n \"taxId\": \"<string>\",\n \"cityId\": \"<string>\"\n }\n ],\n \"stateTaxIds\": [\n {\n \"taxId\": \"<string>\",\n \"stateId\": \"<string>\"\n }\n ],\n \"externalCode\": \"<string>\",\n \"brokerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"exempted\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/holders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client_id"] = '<api-key>'
request["secret_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"federalTaxId\": \"<string>\",\n \"address\": {\n \"street\": \"<string>\",\n \"streetNumber\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"cityId\": \"<string>\",\n \"countryId\": \"BRA\",\n \"complement\": \"<string>\"\n },\n \"contact\": {\n \"phone\": {\n \"countryCode\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n },\n \"email\": \"jsmith@example.com\"\n },\n \"modules\": {\n \"tax\": {\n \"icmsTaxPayer\": true,\n \"isGovernmentEntity\": true\n },\n \"billing\": {\n \"brokerId\": \"<string>\"\n }\n },\n \"cityTaxIds\": [\n {\n \"taxId\": \"<string>\",\n \"cityId\": \"<string>\"\n }\n ],\n \"stateTaxIds\": [\n {\n \"taxId\": \"<string>\",\n \"stateId\": \"<string>\"\n }\n ],\n \"externalCode\": \"<string>\",\n \"brokerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"exempted\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"federalTaxId": "<string>",
"contact": {
"phone": {
"countryCode": "<string>",
"areaCode": "<string>",
"phoneNumber": "<string>"
},
"email": "<string>"
},
"address": {
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"complement": "<string>"
},
"exempted": true,
"createdAt": "<string>",
"modules": {
"tax": {
"icmsTaxPayer": true,
"communicationServiceCustomerCategory": "<string>",
"isGovernmentEntity": true
},
"billing": {
"brokerId": "<string>"
}
},
"externalCode": "<string>",
"brokerId": "<string>"
}Body
application/json
Required string length:
2 - 256Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum string length:
256Response
201 - application/json
Default Response
⌘I