Upsert region config
curl --request PUT \
--url https://api.zenskar.com/business_entities/{business_entity_id}/config/{country_code} \
--header 'Content-Type: application/json' \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"currency_code": "<string>",
"is_enabled": true
}
'import requests
url = "https://api.zenskar.com/business_entities/{business_entity_id}/config/{country_code}"
payload = {
"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({currency_code: '<string>', is_enabled: true})
};
fetch('https://api.zenskar.com/business_entities/{business_entity_id}/config/{country_code}', 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/{country_code}",
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([
'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/{country_code}"
payload := strings.NewReader("{\n \"currency_code\": \"<string>\",\n \"is_enabled\": true\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/{country_code}")
.header("x-api-key", "<api-key>")
.header("organisation", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency_code\": \"<string>\",\n \"is_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenskar.com/business_entities/{business_entity_id}/config/{country_code}")
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 \"currency_code\": \"<string>\",\n \"is_enabled\": true\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
Upsert region config
Insert or update a config for a specific country/currency.
PUT
/
business_entities
/
{business_entity_id}
/
config
/
{country_code}
Upsert region config
curl --request PUT \
--url https://api.zenskar.com/business_entities/{business_entity_id}/config/{country_code} \
--header 'Content-Type: application/json' \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"currency_code": "<string>",
"is_enabled": true
}
'import requests
url = "https://api.zenskar.com/business_entities/{business_entity_id}/config/{country_code}"
payload = {
"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({currency_code: '<string>', is_enabled: true})
};
fetch('https://api.zenskar.com/business_entities/{business_entity_id}/config/{country_code}', 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/{country_code}",
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([
'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/{country_code}"
payload := strings.NewReader("{\n \"currency_code\": \"<string>\",\n \"is_enabled\": true\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/{country_code}")
.header("x-api-key", "<api-key>")
.header("organisation", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency_code\": \"<string>\",\n \"is_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenskar.com/business_entities/{business_entity_id}/config/{country_code}")
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 \"currency_code\": \"<string>\",\n \"is_enabled\": true\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
Body
application/json
Request body for upserting a single country/currency config row.
Response
Successful Response
Response shape for a single business entity config row.
Config row ID
Organisation ID
Business entity ID
ISO country code
ISO currency code
Whether tax is enabled
Calculator: NATIVE, AVALARA, or ANROK