Tax Types API Reference
This section of the API reference details the available endpoints for managing and retrieving tax types.
The TaxType model
Tax types categorize different tax rates applicable to items in invoices and estimates. They provide businesses with flexibility in applying various tax rates based on the nature of goods or services. This allows for accurate and customizable tax calculations, ensuring compliance with regulatory requirements and providing transparency in financial transactions.
Properties
- Name
id
- Type
- string
- Field Type
- Description
Unique identifier for the tax type.
- Name
name
- Type
- string
- Field Type
- Description
Name of the tax type.
- Name
percent
- Type
- float
- Field Type
- Description
Percentage of tax.
- Name
description
- Type
- string
- Field Type
- Description
Description about the tax type.
- Name
business_id
- Type
- string
- Field Type
- Description
Unique identifier for the business.
List all tax types
Retrieve a paginated list of all tax types.
Query Parameters
- Name
limit
- Type
- integer
- Field Type
optional
- Description
Maximum number of tax types to return per page. (default is 5)
- Name
page
- Type
- integer
- Field Type
optional
- Description
Page number for pagination. (default is 1)
Request
curl --request GET \
--get "https://payments.your-domain.com/api/v1/tax-types" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"data": [
{
"id": "99745a4e-7d35-4766-974d-1a225e2258ac",
"name": "sales tax",
"percent": 5,
"description": "5% of the tax will be imposed on the total amount.",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}, {...}
]
}
Create a tax type
This endpoint allows you to create a new tax type.
Body Parameters
- Name
name
- Type
- string
- Field Type
required
- Description
Name of the tax type.
- Name
percent
- Type
- float
- Field Type
required
- Description
percentage of tax.
- Name
description
- Type
- string
- Field Type
optional
- Description
Description about the tax type.
Request
curl --request POST \
"https://payments.your-domain.com/api/v1/tax-types" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data "{
\"name\": \"sales tax\",
\"percent\": \"5\",
\"description\": \"5% of the tax will be imposed on the total amount.\"
}"
Response
{
"data": {
"id": "99745a4e-7d35-4766-974d-1a225e2258ac",
"name": "sales tax",
"percent": 5,
"description": "5% of the tax will be imposed on the total amount.",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}
}
Retrieve a tax type
This endpoint allows you to retrieve a tax type object.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the tax type.
Request
curl --request GET \
--get "https://payments.your-domain.com/api/v1/tax-types/99745a4e-7d35-4766-974d-1a225e2258ac" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"data": {
"id": "99745a4e-7d35-4766-974d-1a225e2258ac",
"name": "sales tax",
"percent": 5,
"description": "5% of the tax will be imposed on the total amount.",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}
}
Update a tax type
This endpoint allows you to perform an update on tax type.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the tax type.
Body Parameters
- Name
name
- Type
- string
- Field Type
optional
- Description
Name of the tax type.
- Name
percent
- Type
- float
- Field Type
optional
- Description
Percentage of tax.
- Name
description
- Type
- string
- Field Type
optional
- Description
Description about the tax type.
Request
curl --request PUT \
"https://payments.your-domain.com/api/v1/tax-types/99745a4e-7d35-4766-974d-1a225e2258ac" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data "{
\"name\": \"sales tax\",
\"percent\": \"6\",
\"description\": \"6% of the tax will be imposed on the total amount.\"
}"
Response
{
"data": {
"id": "99745a4e-7d35-4766-974d-1a225e2258ac",
"name": "sales tax",
"percent": 6,
"description": "6% of the tax will be imposed on the total amount.",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}
}
Delete a tax type
This endpoint allows you to delete a tax type.
URL Parameters
- Name
id
- Type
- string
- Field Type
required
- Description
The ID of the tax type.
Request
curl --request DELETE \
"https://payments.your-domain.com/api/v1/tax-types/99745a4e-7d35-4766-974d-1a225e2258ac" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"id": "99745a4e-7d35-4766-974d-1a225e2258ac",
"object": "TaxType",
"deleted": true
}