# Taxes
Taxes are calculated for each product, modifier option, and charge separately. You can assign a Tax Group to each of these entities and assign a tax group to branches as well.
# The Tax Object
# Sample
{
"id": "8cd1956b",
"name": "Imported Goods",
"name_localized": null,
"rate": 14,
"tax_groups": [
{
"id": "8cd1956b",
"pivot": {
"tax_id": "8cd1956b",
"tax_group_id": "8cd1956b"
}
}
],
"created_at": "2019-02-24 11:43:28",
"updated_at": "2019-02-24 11:43:28",
"deleted_at": null
}
# Attributes
| Field | Type | Rule | Description |
|---|---|---|---|
id | string | Unique identifier for the tax | |
name* | string | updatable | Name of the tax |
name_localized | string | nullable updatable | Localized name of the tax if business uses localization. |
rate* | double | updatable | The tax rate. |
tax_groups | array | nullable updatable includable | List of Tax Group objects attched to the tax. |
created_at | string | sortable | Time YYYY-MM-DD HH-MM-SS in UTC at which the object was created. |
updated_at | string | sortable | Time YYYY-MM-DD HH-MM-SS in UTC at which the object was updated. |
deleted_at | string | nullable | Time YYYY-MM-DD HH-MM-SS in UTC at which the object was deleted. |
# List Taxes
GET /taxes
# Scope
general.read
# Filters
idnamename_localizedupdated_afteris_deletedcreated_onupdated_ondeleted_on
# Response
{
"data": [
{
"id": "8cd1956b",
"name": "Imported Goods",
"name_localized": null,
"rate": 14,
"tax_groups": [
{
"id": "8cd1956b",
"pivot": {
"tax_id": "8cd1956b",
"tax_group_id": "8cd1956b"
}
}
],
"created_at": "2019-02-24 11:43:28",
"updated_at": "2019-02-24 11:43:28",
"deleted_at": null
}
]
}
# Get Tax
GET /taxes/{taxId}
# Scope
general.read
# Response
{
"data": {
"id": "8cd1956b",
"name": "Imported Goods",
"name_localized": null,
"rate": 14,
"tax_groups": [
{
"id": "8cd1956b",
"pivot": {
"tax_id": "8cd1956b",
"tax_group_id": "8cd1956b"
}
}
],
"created_at": "2019-02-24 11:43:28",
"updated_at": "2019-02-24 11:43:28",
"deleted_at": null
}
}
# Create Tax
POST /taxes
# Scope
admin.write
# Request
{
"name": "Adams PLC",
"name_localized": null,
"rate": 14,
"tax_groups": [
{
"id": "8cd1956b"
}
]
}
# Response
{
"data": {
"id": "8cd1956b",
"name": "Imported Goods",
"name_localized": null,
"rate": 14,
"tax_groups": [
{
"id": "8cd1956b",
"pivot": {
"tax_id": "8cd1956b",
"tax_group_id": "8cd1956b"
}
}
],
"created_at": "2019-02-24 11:43:28",
"updated_at": "2019-02-24 11:43:28",
"deleted_at": null
}
}
# Update Tax
PUT /taxes/{taxId}
# Scope
admin.write
# Request
{
"name": "Adams PLC",
"name_localized": null,
"rate": 14,
"tax_groups": [
{
"id": "8cd1956b"
}
]
}
# Response
{
"data": {
"id": "8cd1956b",
"name": "Imported Goods",
"name_localized": null,
"rate": 14,
"tax_groups": [
{
"id": "8cd1956b",
"pivot": {
"tax_id": "8cd1956b",
"tax_group_id": "8cd1956b"
}
}
],
"created_at": "2019-02-24 11:43:28",
"updated_at": "2019-02-24 11:43:28",
"deleted_at": null
}
}
# Delete Tax
DELETE /taxes/{taxId}
# Scope
admin.write
The API will respond with 200 indicating that the tax has been deleted.
# Restore Tax
PUT /taxes/{taxId}/restore
# Scope
admin.restore
The API will respond with 200 indicating that the tax has been restored.
← Tax Groups Tills →