Skip to main content
POST
/
admin
/
taxes
Create Tax
curl --request POST \
  --url https://api.decodahealth.com/admin/taxes \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
{
  "name": "<string>",
  "percentage": 50,
  "locationIds": [
    "<string>"
  ],
  "scope": "ALL",
  "categoryNames": [
    "<string>"
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "percentage": 123,
  "locationIds": [
    "<string>"
  ],
  "scope": "ALL",
  "categoryNames": [
    "<string>"
  ]
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Body

application/json

Schema for creating a new tax.

name
string
required

Name of the tax (e.g., 'Sales Tax', 'VAT')

percentage
number
required

Tax percentage (e.g., 8.25 for 8.25%)

Required range: 0 <= x <= 100
locationIds
string[] | null

Location IDs this tax applies to. Empty/null = all-locations (all locations)

scope
enum<string>
default:ALL

Scope of the tax (ALL, PRODUCTS_ONLY, SERVICES_ONLY, SPECIFIC_CATEGORIES)

Available options:
ALL,
PRODUCTS_ONLY,
SERVICES_ONLY,
MEMBERSHIPS_ONLY,
SPECIFIC_CATEGORIES
categoryNames
string[] | null

Category names for SPECIFIC_CATEGORIES scope

Response

Successful Response

Detailed tax information.

id
string
required

Unique identifier for the tax

name
string
required

Name of the tax (e.g., 'Sales Tax', 'VAT')

percentage
number
required

Tax percentage (e.g., 8.25 for 8.25%)

locationIds
string[] | null

Location IDs this tax applies to. Empty/null = all-locations (all locations)

scope
enum<string>
default:ALL

Scope of the tax (ALL, PRODUCTS_ONLY, SERVICES_ONLY, SPECIFIC_CATEGORIES)

Available options:
ALL,
PRODUCTS_ONLY,
SERVICES_ONLY,
MEMBERSHIPS_ONLY,
SPECIFIC_CATEGORIES
categoryNames
string[] | null

Category names for SPECIFIC_CATEGORIES scope