Create
curl --request POST \
--url https://{defaultHost}/v1/tax_overrides \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tax_override": {
"tax_zone": "5c757cb4-5e9a-4a9e-9cfb-7a065fff0186",
"product_collection": "43fcac81-b278-4b68-88fd-69b709cb7110",
"rate": 10,
"label": "GST + PST"
}
}
'import requests
url = "https://{defaultHost}/v1/tax_overrides"
payload = { "tax_override": {
"tax_zone": "5c757cb4-5e9a-4a9e-9cfb-7a065fff0186",
"product_collection": "43fcac81-b278-4b68-88fd-69b709cb7110",
"rate": 10,
"label": "GST + PST"
} }
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({
tax_override: {
tax_zone: '5c757cb4-5e9a-4a9e-9cfb-7a065fff0186',
product_collection: '43fcac81-b278-4b68-88fd-69b709cb7110',
rate: 10,
label: 'GST + PST'
}
})
};
fetch('https://{defaultHost}/v1/tax_overrides', 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://{defaultHost}/v1/tax_overrides",
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([
'tax_override' => [
'tax_zone' => '5c757cb4-5e9a-4a9e-9cfb-7a065fff0186',
'product_collection' => '43fcac81-b278-4b68-88fd-69b709cb7110',
'rate' => 10,
'label' => 'GST + PST'
]
]),
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://{defaultHost}/v1/tax_overrides"
payload := strings.NewReader("{\n \"tax_override\": {\n \"tax_zone\": \"5c757cb4-5e9a-4a9e-9cfb-7a065fff0186\",\n \"product_collection\": \"43fcac81-b278-4b68-88fd-69b709cb7110\",\n \"rate\": 10,\n \"label\": \"GST + PST\"\n }\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://{defaultHost}/v1/tax_overrides")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tax_override\": {\n \"tax_zone\": \"5c757cb4-5e9a-4a9e-9cfb-7a065fff0186\",\n \"product_collection\": \"43fcac81-b278-4b68-88fd-69b709cb7110\",\n \"rate\": 10,\n \"label\": \"GST + PST\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/tax_overrides")
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 \"tax_override\": {\n \"tax_zone\": \"5c757cb4-5e9a-4a9e-9cfb-7a065fff0186\",\n \"product_collection\": \"43fcac81-b278-4b68-88fd-69b709cb7110\",\n \"rate\": 10,\n \"label\": \"GST + PST\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "16c2ec2b-c44d-4f63-9943-e74085440e48",
"object": "tax_override",
"label": "GST + PST",
"shipping": false,
"rate": 10,
"product_collection": "43fcac81-b278-4b68-88fd-69b709cb7110",
"tax_zone": "5c757cb4-5e9a-4a9e-9cfb-7a065fff0186",
"created_at": 1793797014,
"updated_at": 1793797014
}Tax Overrides
Create
Creates a new tax override.
POST
/
v1
/
tax_overrides
Create
curl --request POST \
--url https://{defaultHost}/v1/tax_overrides \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tax_override": {
"tax_zone": "5c757cb4-5e9a-4a9e-9cfb-7a065fff0186",
"product_collection": "43fcac81-b278-4b68-88fd-69b709cb7110",
"rate": 10,
"label": "GST + PST"
}
}
'import requests
url = "https://{defaultHost}/v1/tax_overrides"
payload = { "tax_override": {
"tax_zone": "5c757cb4-5e9a-4a9e-9cfb-7a065fff0186",
"product_collection": "43fcac81-b278-4b68-88fd-69b709cb7110",
"rate": 10,
"label": "GST + PST"
} }
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({
tax_override: {
tax_zone: '5c757cb4-5e9a-4a9e-9cfb-7a065fff0186',
product_collection: '43fcac81-b278-4b68-88fd-69b709cb7110',
rate: 10,
label: 'GST + PST'
}
})
};
fetch('https://{defaultHost}/v1/tax_overrides', 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://{defaultHost}/v1/tax_overrides",
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([
'tax_override' => [
'tax_zone' => '5c757cb4-5e9a-4a9e-9cfb-7a065fff0186',
'product_collection' => '43fcac81-b278-4b68-88fd-69b709cb7110',
'rate' => 10,
'label' => 'GST + PST'
]
]),
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://{defaultHost}/v1/tax_overrides"
payload := strings.NewReader("{\n \"tax_override\": {\n \"tax_zone\": \"5c757cb4-5e9a-4a9e-9cfb-7a065fff0186\",\n \"product_collection\": \"43fcac81-b278-4b68-88fd-69b709cb7110\",\n \"rate\": 10,\n \"label\": \"GST + PST\"\n }\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://{defaultHost}/v1/tax_overrides")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tax_override\": {\n \"tax_zone\": \"5c757cb4-5e9a-4a9e-9cfb-7a065fff0186\",\n \"product_collection\": \"43fcac81-b278-4b68-88fd-69b709cb7110\",\n \"rate\": 10,\n \"label\": \"GST + PST\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/tax_overrides")
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 \"tax_override\": {\n \"tax_zone\": \"5c757cb4-5e9a-4a9e-9cfb-7a065fff0186\",\n \"product_collection\": \"43fcac81-b278-4b68-88fd-69b709cb7110\",\n \"rate\": 10,\n \"label\": \"GST + PST\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "16c2ec2b-c44d-4f63-9943-e74085440e48",
"object": "tax_override",
"label": "GST + PST",
"shipping": false,
"rate": 10,
"product_collection": "43fcac81-b278-4b68-88fd-69b709cb7110",
"tax_zone": "5c757cb4-5e9a-4a9e-9cfb-7a065fff0186",
"created_at": 1793797014,
"updated_at": 1793797014
}Authorizations
Response
200 - application/json
Success
Was this page helpful?