Calculate the sales tax with TaxJar service.
1 min
POST
https://app.amberflo.io/integration/tax/sales-tax/taxjar
Body Parameters
- bodycom.amberflo.integration.tax.SalesTaxRequest.in
- accountAddresscom.amberflo.integration.tax.Address.inrequiredDescription
- countrystringrequired
- postalCodestring
- statestring
- citystringrequired
- line1stringrequired
- customerAddresscom.amberflo.integration.tax.Address.inrequiredDescription
- countrystringrequired
- postalCodestring
- statestring
- citystringrequired
- line1stringrequired
- salesTaxOrdercom.amberflo.integration.tax.SalesTaxOrder.inrequiredDescription
- idstringrequired
- amountnumberrequired
- productCategorycom.amberflo.integration.tax.SalesTaxProductCategory.inrequiredDescription
- accountIntegrationDetailcom.amberflo.integration.tax.AccountIntegrationDetail.inrequiredDescription
- usernamestringDescription
- passwordstringDescription
- companyCodestringDescription
- environmentstringDescription
- customerIntegrationDetailcom.amberflo.integration.tax.CustomerIntegrationDetail.inrequiredDescription
- customerCodestringrequiredDescription
- timeInSecondsinteger<int64>requiredDescription
Responses
200
- com.amberflo.integration.tax.SalesTaxResponse.out
- salesTaxAmountnumberDescription
- invoiceSalesTaxcom.amberflo.integration.tax.InvoiceSalesTax.outDescription
- totalTaxAmountnumberDescription
- totalTaxableAmountnumberDescription
- totalExemptAmountnumberDescription
- combinedTaxRatenumberDescription
- hasNexusbooleanDescription
- taxCodestringDescription
- messagecom.amberflo.service.common.log_message.LogMessage.outDescription
- levelcom.amberflo.service.common.log_message.MessageLevel.out
- codecom.amberflo.service.common.log_message.MessageCode.out
- messagestring
curl
curl --request POST \
--url https://app.amberflo.io/integration/tax/sales-tax/taxjar \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"accountAddress": {
"country": "",
"city": "",
"line1": ""
},
"customerAddress": {
"country": "",
"city": "",
"line1": ""
},
"salesTaxOrder": {
"id": "",
"amount": ""
},
"productCategory": "",
"accountIntegrationDetail": {},
"customerIntegrationDetail": {
"customerCode": ""
},
"timeInSeconds": 0
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"accountAddress": {
"country": "",
"city": "",
"line1": ""
},
"customerAddress": {
"country": "",
"city": "",
"line1": ""
},
"salesTaxOrder": {
"id": "",
"amount": ""
},
"productCategory": "",
"accountIntegrationDetail": {},
"customerIntegrationDetail": {
"customerCode": ""
},
"timeInSeconds": 0
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://app.amberflo.io/integration/tax/sales-tax/taxjar", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://app.amberflo.io/integration/tax/sales-tax/taxjar")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"accountAddress": {
"country": "",
"city": "",
"line1": ""
},
"customerAddress": {
"country": "",
"city": "",
"line1": ""
},
"salesTaxOrder": {
"id": "",
"amount": ""
},
"productCategory": "",
"accountIntegrationDetail": {},
"customerIntegrationDetail": {
"customerCode": ""
},
"timeInSeconds": 0
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://app.amberflo.io/integration/tax/sales-tax/taxjar"
payload = json.dumps({
"accountAddress": {
"country": "",
"city": "",
"line1": ""
},
"customerAddress": {
"country": "",
"city": "",
"line1": ""
},
"salesTaxOrder": {
"id": "",
"amount": ""
},
"productCategory": "",
"accountIntegrationDetail": {},
"customerIntegrationDetail": {
"customerCode": ""
},
"timeInSeconds": 0
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Successful request
{
"salesTaxAmount": 0,
"invoiceSalesTax": {
"totalTaxAmount": 0,
"totalTaxableAmount": 0,
"totalExemptAmount": 0,
"combinedTaxRate": 0,
"hasNexus": false,
"taxCode": ""
},
"message": {
"level": "",
"code": "",
"message": ""
}
}