Tax rates

A tax rate that can be applied to line items in an invoice.

The tax rate object

Attributes

  • _id
    string

    A unique Id for the tax rate.

  • created
    string

    The date/time the tax rate was created.

  • description
    string

    A description of the tax rate (e.g. VAT).

  • modified
    string

    The date/time the tax rate was modified.

  • rate
    string

    The rate of tax as a percentage, e.g. 17.5.

  • tax_code
    string

    A unique tax code.

The tax rate object
{
    "_id": "6724fbc74f73a2cebf63770a",
    "created": "2024-11-01 16:03:19",
    "description": "Standard rate VAT",
    "modified": "2024-11-01 16:03:19",
    "rate": 20.0,
    "tax_code": "STANDARD"
}

List all tax rates

Return a list of tax rates setup for your account on CareHQ.

Parameters

  • attributes
    optional
    default ['_id']

    A list of attributes to include for fetched objects.

  • filters-ids
    optional

    A filter that accepts a list of Ids and filters the items returned to those with an Id in the list.

  • filters-modified_after
    optional

    A filter that accepts a date/time and filters the items returned to those modified after the date/time.

  • filters-modified_before
    optional

    A filter that accepts a date/time and filters the items returned to those modified before the date/time.

  • filters-q
    optional

    A case insensitive keyword filter applied to the following fields; description, tax_code.

  • page
    optional
    default 1

    The page number to fetch.

  • per_page
    optional
    default 10

    The number of items to return per page.

  • sort_by
    optional
    default _id

    A list of fields the returned items can be sorted by. Fields prefixed with minus (-) sign are sorted in descending order.

    • _id
    • created
    • modified
    • tax_code

Response

Returns a page of tax rates.

GET
/v1/tax-rates
var taxRates = apiClient.Request(
    HttpMethod.Get,
    "tax-rates",
    new MultiValueDict()
        .Add("attributes", "description", "rate")
);
<?php

$tax_rates = $api_client->request(
    'GET',
    'tax-rates',
    [
        'attributes'=>[
            'description',
            'rate'
        ]
    ]
);
tax_rates = api_client(
    'GET',
    'tax-rates',
    params={
        'attributes': [
            'description',
            'rate'
        ]
    }
)
tax_rates = api_client.request(
    'GET',
    'tax-rates',
    params: {
        'attributes' => [
            'description',
            'rate'
        ]
    }
)
Response
{
    "item_count": 3,
    "items": [
        {
            "_id": "6724fbc74f73a2cebf637708",
            "description": "Reduced rate VAT",
            "rate": 5.0
        },
        {
            "_id": "6724fbc74f73a2cebf63770a",
            "description": "Standard rate VAT",
            "rate": 20.0
        },
        {
            "_id": "6724fbc74f73a2cebf63770c",
            "description": "Zero rate VAT",
            "rate": 0.0
        }
    ],
    "page": 1,
    "page_count": 1,
    "per_page": 10
}

Retrieve a tax rate

Retrieve a tax rate object.

Response

Returns a tax rate object.

GET
/v1/tax-rates/<tax_rate_id>
var taxRate = apiClient.Request(HttpMethod.Get, $"tax-rates/{taxRateId}");
<?php

$tax_rate = $api_client->request('GET', 'tax-rates/' . $tax_rate_id);
tax_rate = api_client('GET', f'tax-rates/{tax_rate_id}')
tax_rate = api_client.request('GET', "tax-rates/#{tax_rate_id}")
Response
{
    "_id": "6724fbc74f73a2cebf63770a",
    "created": "2024-11-01 16:03:19",
    "description": "Standard rate VAT",
    "modified": "2024-11-01 16:03:19",
    "rate": 20.0,
    "tax_code": "STANDARD"
}