Set business entity config
curl --request PUT \
--url https://api.zenskar.com/business_entities/{business_entity_id}/config \
--header 'Content-Type: application/json' \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
[
{
"country_code": "<string>",
"currency_code": "<string>",
"is_enabled": true
}
]
'import requests
url = "https://api.zenskar.com/business_entities/{business_entity_id}/config"
payload = [
{
"country_code": "<string>",
"currency_code": "<string>",
"is_enabled": True
}
]
headers = {
"x-api-key": "<api-key>",
"organisation": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-api-key': '<api-key>',
organisation: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify([{country_code: '<string>', currency_code: '<string>', is_enabled: true}])
};
fetch('https://api.zenskar.com/business_entities/{business_entity_id}/config', 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.zenskar.com/business_entities/{business_entity_id}/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
[
'country_code' => '<string>',
'currency_code' => '<string>',
'is_enabled' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"organisation: <api-key>",
"x-api-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.zenskar.com/business_entities/{business_entity_id}/config"
payload := strings.NewReader("[\n {\n \"country_code\": \"<string>\",\n \"currency_code\": \"<string>\",\n \"is_enabled\": true\n }\n]")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("organisation", "<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.put("https://api.zenskar.com/business_entities/{business_entity_id}/config")
.header("x-api-key", "<api-key>")
.header("organisation", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"country_code\": \"<string>\",\n \"currency_code\": \"<string>\",\n \"is_enabled\": true\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenskar.com/business_entities/{business_entity_id}/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["organisation"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"country_code\": \"<string>\",\n \"currency_code\": \"<string>\",\n \"is_enabled\": true\n }\n]"
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"country_code": "<string>",
"currency_code": "<string>",
"is_enabled": true,
"tax_calculation_method": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Business Entities
Set business entity config
Replace all configs for a business entity. Each item is one country/currency row.
PUT
/
business_entities
/
{business_entity_id}
/
config
Set business entity config
curl --request PUT \
--url https://api.zenskar.com/business_entities/{business_entity_id}/config \
--header 'Content-Type: application/json' \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
[
{
"country_code": "<string>",
"currency_code": "<string>",
"is_enabled": true
}
]
'import requests
url = "https://api.zenskar.com/business_entities/{business_entity_id}/config"
payload = [
{
"country_code": "<string>",
"currency_code": "<string>",
"is_enabled": True
}
]
headers = {
"x-api-key": "<api-key>",
"organisation": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-api-key': '<api-key>',
organisation: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify([{country_code: '<string>', currency_code: '<string>', is_enabled: true}])
};
fetch('https://api.zenskar.com/business_entities/{business_entity_id}/config', 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.zenskar.com/business_entities/{business_entity_id}/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
[
'country_code' => '<string>',
'currency_code' => '<string>',
'is_enabled' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"organisation: <api-key>",
"x-api-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.zenskar.com/business_entities/{business_entity_id}/config"
payload := strings.NewReader("[\n {\n \"country_code\": \"<string>\",\n \"currency_code\": \"<string>\",\n \"is_enabled\": true\n }\n]")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("organisation", "<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.put("https://api.zenskar.com/business_entities/{business_entity_id}/config")
.header("x-api-key", "<api-key>")
.header("organisation", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"country_code\": \"<string>\",\n \"currency_code\": \"<string>\",\n \"is_enabled\": true\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenskar.com/business_entities/{business_entity_id}/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["organisation"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"country_code\": \"<string>\",\n \"currency_code\": \"<string>\",\n \"is_enabled\": true\n }\n]"
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"country_code": "<string>",
"currency_code": "<string>",
"is_enabled": true,
"tax_calculation_method": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Body
application/json
ISO country code (e.g. IN, US, CA)
Required string length:
2ISO currency code (e.g. INR, USD)
Required string length:
3Calculator to use: NATIVE, AVALARA, or ANROK
Available options:
NATIVE, AVALARA, ANROK Whether tax is enabled for this country/currency
Response
Successful Response
Config row ID
Organisation ID
Business entity ID
ISO country code
ISO currency code
Whether tax is enabled
Calculator: NATIVE, AVALARA, or ANROK