Create Product Group Tax
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
}
]Product Groups
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.
Create Product Group Tax
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
Body
application/json
Response
200 - application/json
The newly created tax details for the specified product group.
Was this page helpful?