curl --request POST \
--url https://qa-lynx.nayax.com/operational/v1/productGroups/{ProductGroupID}/tax \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"CountryID": 123,
"CityID": 123,
"RegionID": 123,
"TaxValue": 123,
"TaxCode": 123,
"VatName": "<string>",
"TaxId": "<string>",
"TaxIncluded": true
}
]
'import requests
url = "https://qa-lynx.nayax.com/operational/v1/productGroups/{ProductGroupID}/tax"
payload = [
{
"CountryID": 123,
"CityID": 123,
"RegionID": 123,
"TaxValue": 123,
"TaxCode": 123,
"VatName": "<string>",
"TaxId": "<string>",
"TaxIncluded": True
}
]
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([
{
CountryID: 123,
CityID: 123,
RegionID: 123,
TaxValue: 123,
TaxCode: 123,
VatName: '<string>',
TaxId: '<string>',
TaxIncluded: true
}
])
};
fetch('https://qa-lynx.nayax.com/operational/v1/productGroups/{ProductGroupID}/tax', 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://qa-lynx.nayax.com/operational/v1/productGroups/{ProductGroupID}/tax",
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([
[
'CountryID' => 123,
'CityID' => 123,
'RegionID' => 123,
'TaxValue' => 123,
'TaxCode' => 123,
'VatName' => '<string>',
'TaxId' => '<string>',
'TaxIncluded' => true
]
]),
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://qa-lynx.nayax.com/operational/v1/productGroups/{ProductGroupID}/tax"
payload := strings.NewReader("[\n {\n \"CountryID\": 123,\n \"CityID\": 123,\n \"RegionID\": 123,\n \"TaxValue\": 123,\n \"TaxCode\": 123,\n \"VatName\": \"<string>\",\n \"TaxId\": \"<string>\",\n \"TaxIncluded\": true\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://qa-lynx.nayax.com/operational/v1/productGroups/{ProductGroupID}/tax")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"CountryID\": 123,\n \"CityID\": 123,\n \"RegionID\": 123,\n \"TaxValue\": 123,\n \"TaxCode\": 123,\n \"VatName\": \"<string>\",\n \"TaxId\": \"<string>\",\n \"TaxIncluded\": true\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-lynx.nayax.com/operational/v1/productGroups/{ProductGroupID}/tax")
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 {\n \"CountryID\": 123,\n \"CityID\": 123,\n \"RegionID\": 123,\n \"TaxValue\": 123,\n \"TaxCode\": 123,\n \"VatName\": \"<string>\",\n \"TaxId\": \"<string>\",\n \"TaxIncluded\": true\n }\n]"
response = http.request(request)
puts response.read_body[
{
"TaxRowID": 123,
"ProductGroupID": 123,
"CountryID": 123,
"CityID": 123,
"RegionID": 123,
"TaxValue": 123,
"TaxCode": 123,
"CreatedBy": 123,
"CreatedDT": "2023-11-07T05:31:56Z",
"UpdatedBy": 123,
"UpdatedDT": "2023-11-07T05:31:56Z",
"VatName": "<string>",
"TaxId": "<string>",
"TaxIncluded": true
}
]Create Product Group Tax
Creates new tax details for a specific product group, identified by the ProductGroupID. The request body contains the tax information to be added.
curl --request POST \
--url https://qa-lynx.nayax.com/operational/v1/productGroups/{ProductGroupID}/tax \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"CountryID": 123,
"CityID": 123,
"RegionID": 123,
"TaxValue": 123,
"TaxCode": 123,
"VatName": "<string>",
"TaxId": "<string>",
"TaxIncluded": true
}
]
'import requests
url = "https://qa-lynx.nayax.com/operational/v1/productGroups/{ProductGroupID}/tax"
payload = [
{
"CountryID": 123,
"CityID": 123,
"RegionID": 123,
"TaxValue": 123,
"TaxCode": 123,
"VatName": "<string>",
"TaxId": "<string>",
"TaxIncluded": True
}
]
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([
{
CountryID: 123,
CityID: 123,
RegionID: 123,
TaxValue: 123,
TaxCode: 123,
VatName: '<string>',
TaxId: '<string>',
TaxIncluded: true
}
])
};
fetch('https://qa-lynx.nayax.com/operational/v1/productGroups/{ProductGroupID}/tax', 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://qa-lynx.nayax.com/operational/v1/productGroups/{ProductGroupID}/tax",
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([
[
'CountryID' => 123,
'CityID' => 123,
'RegionID' => 123,
'TaxValue' => 123,
'TaxCode' => 123,
'VatName' => '<string>',
'TaxId' => '<string>',
'TaxIncluded' => true
]
]),
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://qa-lynx.nayax.com/operational/v1/productGroups/{ProductGroupID}/tax"
payload := strings.NewReader("[\n {\n \"CountryID\": 123,\n \"CityID\": 123,\n \"RegionID\": 123,\n \"TaxValue\": 123,\n \"TaxCode\": 123,\n \"VatName\": \"<string>\",\n \"TaxId\": \"<string>\",\n \"TaxIncluded\": true\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://qa-lynx.nayax.com/operational/v1/productGroups/{ProductGroupID}/tax")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"CountryID\": 123,\n \"CityID\": 123,\n \"RegionID\": 123,\n \"TaxValue\": 123,\n \"TaxCode\": 123,\n \"VatName\": \"<string>\",\n \"TaxId\": \"<string>\",\n \"TaxIncluded\": true\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-lynx.nayax.com/operational/v1/productGroups/{ProductGroupID}/tax")
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 {\n \"CountryID\": 123,\n \"CityID\": 123,\n \"RegionID\": 123,\n \"TaxValue\": 123,\n \"TaxCode\": 123,\n \"VatName\": \"<string>\",\n \"TaxId\": \"<string>\",\n \"TaxIncluded\": true\n }\n]"
response = http.request(request)
puts response.read_body[
{
"TaxRowID": 123,
"ProductGroupID": 123,
"CountryID": 123,
"CityID": 123,
"RegionID": 123,
"TaxValue": 123,
"TaxCode": 123,
"CreatedBy": 123,
"CreatedDT": "2023-11-07T05:31:56Z",
"UpdatedBy": 123,
"UpdatedDT": "2023-11-07T05:31:56Z",
"VatName": "<string>",
"TaxId": "<string>",
"TaxIncluded": true
}
]Authorizations
Enter your Bearer token. It's required to authenticate API requests.
Path Parameters
The unique identifier of the product group.
Body
The unique identifier of the country where the tax applies.
The unique identifier of the city where the tax applies.
The unique identifier of the region where the tax applies (if applicable).
The value or rate of the tax to be created.
The code associated with the tax to be created.
The name of the VAT (Value Added Tax) associated with the tax entry.
The tax identification number associated with the tax entry.
Indicates whether the tax is included in the product price.
Response
The newly created tax details for the specified product group.
The unique identifier of the tax row.
The unique identifier of the product group associated with the tax.
The unique identifier of the country where the tax applies.
The unique identifier of the city where the tax applies.
The unique identifier of the region where the tax applies (if applicable).
The value or rate of the tax.
The code associated with the tax.
The identifier of the user who created the tax entry.
The date and time when the tax entry was created.
The identifier of the user who last updated the tax entry.
The date and time when the tax entry was last updated.
The name of the VAT (Value Added Tax) associated with the tax entry.
The tax identification number associated with the tax entry.
Indicates whether the tax is included in the product price.
Was this page helpful?