cURL
curl --request POST \
--url https://api.numeralhq.com/tax/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference_product_id": "p-123456789",
"reference_product_name": "Red Shoes",
"product_category": "CLOTHING_GENERAL"
}
'import requests
url = "https://api.numeralhq.com/tax/products"
payload = {
"reference_product_id": "p-123456789",
"reference_product_name": "Red Shoes",
"product_category": "CLOTHING_GENERAL"
}
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({
reference_product_id: 'p-123456789',
reference_product_name: 'Red Shoes',
product_category: 'CLOTHING_GENERAL'
})
};
fetch('https://api.numeralhq.com/tax/products', 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.numeralhq.com/tax/products",
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([
'reference_product_id' => 'p-123456789',
'reference_product_name' => 'Red Shoes',
'product_category' => 'CLOTHING_GENERAL'
]),
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://api.numeralhq.com/tax/products"
payload := strings.NewReader("{\n \"reference_product_id\": \"p-123456789\",\n \"reference_product_name\": \"Red Shoes\",\n \"product_category\": \"CLOTHING_GENERAL\"\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://api.numeralhq.com/tax/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reference_product_id\": \"p-123456789\",\n \"reference_product_name\": \"Red Shoes\",\n \"product_category\": \"CLOTHING_GENERAL\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numeralhq.com/tax/products")
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 \"reference_product_id\": \"p-123456789\",\n \"reference_product_name\": \"Red Shoes\",\n \"product_category\": \"CLOTHING_GENERAL\"\n}"
response = http.request(request)
puts response.read_body{
"object": "tax.product",
"reference_product_id": "p-20506",
"reference_product_name": "Red Shoes",
"product_category": "CLOTHING_GENERAL",
"created_at": 1721694425,
"updated_at": 1721694425,
"testmode": "true"
}{
"error": {
"error_code": "missing_field",
"error_message": "Field is required",
"error_meta": {
"field": "path.to.fieldname",
"expected": "string",
"received": "undefined"
}
}
}Products
Create Products
Create and categorize a new product
POST
/
tax
/
products
cURL
curl --request POST \
--url https://api.numeralhq.com/tax/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference_product_id": "p-123456789",
"reference_product_name": "Red Shoes",
"product_category": "CLOTHING_GENERAL"
}
'import requests
url = "https://api.numeralhq.com/tax/products"
payload = {
"reference_product_id": "p-123456789",
"reference_product_name": "Red Shoes",
"product_category": "CLOTHING_GENERAL"
}
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({
reference_product_id: 'p-123456789',
reference_product_name: 'Red Shoes',
product_category: 'CLOTHING_GENERAL'
})
};
fetch('https://api.numeralhq.com/tax/products', 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.numeralhq.com/tax/products",
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([
'reference_product_id' => 'p-123456789',
'reference_product_name' => 'Red Shoes',
'product_category' => 'CLOTHING_GENERAL'
]),
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://api.numeralhq.com/tax/products"
payload := strings.NewReader("{\n \"reference_product_id\": \"p-123456789\",\n \"reference_product_name\": \"Red Shoes\",\n \"product_category\": \"CLOTHING_GENERAL\"\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://api.numeralhq.com/tax/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reference_product_id\": \"p-123456789\",\n \"reference_product_name\": \"Red Shoes\",\n \"product_category\": \"CLOTHING_GENERAL\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numeralhq.com/tax/products")
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 \"reference_product_id\": \"p-123456789\",\n \"reference_product_name\": \"Red Shoes\",\n \"product_category\": \"CLOTHING_GENERAL\"\n}"
response = http.request(request)
puts response.read_body{
"object": "tax.product",
"reference_product_id": "p-20506",
"reference_product_name": "Red Shoes",
"product_category": "CLOTHING_GENERAL",
"created_at": 1721694425,
"updated_at": 1721694425,
"testmode": "true"
}{
"error": {
"error_code": "missing_field",
"error_message": "Field is required",
"error_meta": {
"field": "path.to.fieldname",
"expected": "string",
"received": "undefined"
}
}
}Product Endpoint (2024-09-01)
Create and categorize a new product for tax calculation purposes.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Product creation response
The type of object: tax.product.
Example:
"tax.product"
The ID of the created product
Example:
"p-20506"
The name of the created product
Example:
"Red Shoes"
The category of the created product
Example:
"CLOTHING_GENERAL"
Epoch datetime representing the date and time the product was created
Example:
1721694425
Epoch datetime representing the date and time the product was last updated
Example:
1721694425
True if using a production API key. False if using a test API key.
Example:
"true"
⌘I