Top

Tax & Tax Group

List taxes
GET /settings/taxes
List of simple and compound taxes with pagination.
Get a tax
GET /settings/taxes/:tax_id
Get the details of a simple or compound tax.
Create a tax
POST /settings/taxes
Create a tax which can be associated with an item.
Update a tax
PUT /settings/taxes/:tax_id
Update the details of a simple or compound tax.
Delete a tax
DELETE /settings/taxes/:tax_id
Delete a simple or compound tax.
Get a tax group
GET /settings/taxgroups/:tax_group_id
Get the details of a tax group.
Create a tax group
POST /settings/taxgroups
Create a tax group associating multiple taxes.
Update tax group
PUT /settings/taxgroups/:tax_group_id
Update the details of the tax group.
Delete a tax group
DELETE /settings/taxgroups/:tax_group_id
Delete a tax group. Tax group that is associated to transactions cannot be deleted.

List taxes

GET  /settings/taxes

List of simple and compound taxes with pagination.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "taxes": [
    {
      "tax_id": "982000000566009",
      "tax_name": "Sales Group",
      "tax_percentage": 23,
      "tax_type": "tax_group"
    },
    {
      "tax_id": "982000000566007",
      "tax_name": "Sales Tax",
      "tax_percentage": 10.5,
      "tax_type": "tax"
    },
    {
      "tax_id": "982000000557028",
      "tax_name": "VAT",
      "tax_percentage": 12.5,
      "tax_type": "tax"
    }
  ],
  "page_context": {
    "page": 1,
    "per_page": 200,
    "has_more_page": false,
    "report_name": "Taxes",
    "sort_column": "tax_name",
    "sort_order": "A"
  }
}

Get a tax

GET  /settings/taxes/:tax_id

Get the details of a simple or compound tax.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "tax": {
    "tax_id": "982000000566009",
    "tax_name": "Sales Group",
    "tax_percentage": 23,
    "tax_type": "tax_group"
  }
}

Create a tax

POST  /settings/taxes

Create a tax which can be associated with an item.

Request attributes

tax_name* string
[50]
Name of the tax to be created.
tax_percentage* double Number of percentage taxable.
tax_type string Type to determine whether it is a simple or compound tax.
Allowed Values: tax and compound_tax

Sample Request

{
  "tax_name": "Sales Group",
  "tax_percentage": 23,
  "tax_type": "tax_group"
}

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The tax has been added.",
  "tax": {
    "tax_id": "982000000566009",
    "tax_name": "Sales Group",
    "tax_percentage": 23,
    "tax_type": "tax_group"
  }
}

Update a tax

PUT  /settings/taxes/:tax_id

Update the details of a simple or compound tax.

Request attributes

tax_name* string
[50]
Name of the tax to be created.
tax_percentage* double Number of percentage taxable.
tax_type string Type to determine whether it is a simple or compound tax.
Allowed Values: tax and compound_tax

Sample Request

{
  "tax_name": "Sales Group",
  "tax_percentage": 23,
  "tax_type": "tax_group"
}

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Tax information has been saved.",
  "tax": {
    "tax_id": "982000000566009",
    "tax_name": "Sales Group",
    "tax_percentage": 23,
    "tax_type": "tax_group"
  }
}

Delete a tax

DELETE  /settings/taxes/:tax_id

Delete a simple or compound tax.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The record has been deleted."
}

Get a tax group

GET  /settings/taxgroups/:tax_group_id

Get the details of a tax group.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "tax_group": {
    "tax_group_id": "982000000566009",
    "tax_group_name": "Sales Group",
    "tax_group_percentage": 23,
    "taxes": [
      {
        "tax_id": "982000000557028",
        "tax_name": "VAT",
        "tax_percentage": 12.5,
        "tax_type": "tax"
      },
      {
        "tax_id": "982000000566007",
        "tax_name": "Sales Tax",
        "tax_percentage": 10.5,
        "tax_type": "tax"
      }
    ]
  }
}

Create a tax group

POST  /settings/taxgroups

Create a tax group associating multiple taxes.

Request attributes

tax_group_name string
[50]
Name of the tax group.
taxes string List of tax IDs that are to be associated to the tax group.

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The tax group has been created.",
  "tax_group": {
    "tax_group_id": "982000000566009",
    "tax_group_name": "Sales Group",
    "tax_group_percentage": 23,
    "taxes": [
      {
        "tax_id": "982000000557028",
        "tax_name": "VAT",
        "tax_percentage": 12.5,
        "tax_type": "tax"
      },
      {
        "tax_id": "982000000566007",
        "tax_name": "Sales Tax",
        "tax_percentage": 10.5,
        "tax_type": "tax"
      }
    ]
  }
}

Update tax group

PUT  /settings/taxgroups/:tax_group_id

Update the details of the tax group.

Request attributes

tax_group_name string
[50]
Name of the tax group.
taxes string List of tax IDs that are to be associated to the tax group.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Tax Group information has been saved.",
  "tax_group": {
    "tax_group_id": "982000000566009",
    "tax_group_name": "Sales Group",
    "tax_group_percentage": 23,
    "taxes": [
      {
        "tax_id": "982000000557028",
        "tax_name": "VAT",
        "tax_percentage": 12.5,
        "tax_type": "tax"
      },
      {
        "tax_id": "982000000566007",
        "tax_name": "Sales Tax",
        "tax_percentage": 10.5,
        "tax_type": "tax"
      }
    ]
  }
}

Delete a tax group

DELETE  /settings/taxgroups/:tax_group_id

Delete a tax group. Tax group that is associated to transactions cannot be deleted.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The tax group has been deleted."
}