Skip to main content
GET
/
billing
/
sales-tax-report
/
export
Get Sales Tax Report
curl --request GET \
  --url https://api.decodahealth.com/billing/sales-tax-report/export \
  --header 'API-KEY: <api-key>' \
  --header 'TENANT: <tenant>'
import requests

url = "https://api.decodahealth.com/billing/sales-tax-report/export"

headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>'}};

fetch('https://api.decodahealth.com/billing/sales-tax-report/export', 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.decodahealth.com/billing/sales-tax-report/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"TENANT: <tenant>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.decodahealth.com/billing/sales-tax-report/export"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.decodahealth.com/billing/sales-tax-report/export")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.decodahealth.com/billing/sales-tax-report/export")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'

response = http.request(request)
puts response.read_body
[
  {
    "date": "<string>",
    "locationName": "<string>",
    "retailTaxable": 123,
    "totalTaxable": 123,
    "retailTax": 123,
    "totalTax": 123,
    "exempt": 123,
    "grossSales": 123,
    "serviceTaxable": 0,
    "giftTaxable": 0,
    "mbrTaxable": 0,
    "serviceTax": 0,
    "giftTax": 0,
    "mbrTax": 0
  }
]
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Query Parameters

start_date
string<date>
required

Start date (YYYY-MM-DD)

end_date
string<date>
required

End date (YYYY-MM-DD)

timezone
string
required

Timezone for date range

location_ids
string[] | null

Optional location IDs to filter by

Response

Successful Response

date
string
required

Date of the transactions (YYYY-MM-DD)

locationName
string
required

Location name

retailTaxable
number
required

Taxable amount for retail/product items (in cents)

totalTaxable
number
required

Total taxable amount (in cents)

retailTax
number
required

Tax collected on retail/product items (in cents)

totalTax
number
required

Total tax collected (in cents)

exempt
number
required

Exempt amount (gross sales - total taxable, in cents)

grossSales
number
required

Gross sales amount pre-tax (in cents)

serviceTaxable
number
default:0

Taxable amount for services (always 0)

giftTaxable
number
default:0

Taxable amount for gifts (always 0)

mbrTaxable
number
default:0

Taxable amount for memberships (always 0)

serviceTax
number
default:0

Tax collected on services (always 0)

giftTax
number
default:0

Tax collected on gifts (always 0)

mbrTax
number
default:0

Tax collected on memberships (always 0)