Returns a list off all the tax settings linked to the logged in account
GET https://api.billagain.com/v1/tax
None - optional paging values can be passed through
Parameter |
Format |
Description |
taxSettingID |
Numeric |
Unique tax setting identifier |
Name |
Alpha Numeric |
The tax name |
rules |
Object List |
|
taxRuleID |
Numeric |
Unique tax rule identifier |
Perc |
Numeric |
The Tax percentage |
countryID |
Numeric |
Unique country identifier |
countryStateID |
Numeric |
Unique country's state identifier |
TaxNumber |
Alpha Numeric |
Specified tax, Tax Number |
|
JSON Output
HTTP CODE: 200 OK
[
{
"taxSettingID": 245,
"Name": "VAT",
"rules": [
{
"taxRuleID": 72,
"countryID": 71,
"countryStateID": 5,
"Perc": 0.14,
"TaxNumber": "1323123456"
}
]
},
{
"taxSettingID": 246,
"Name": "PSD",
"rules": [
{
"taxRuleID": 74,
"countryID": 71,
"countryStateID": 4,
"Perc": 0.12,
"TaxNumber": ""
}
]
}
]
Returns a specific tax setting
GET https://api.billagain.com/v1/tax/{taxSettingID}
Parameter |
Format |
Description |
taxSettingID |
Numeric |
Unique tax setting identifier |
Parameter |
Format |
Description |
taxSettingID |
Numeric |
Unique tax setting identifier |
Name |
Alpha Numeric |
The tax name |
rules |
Object List |
|
taxRuleID |
Numeric |
Unique tax rule identifier |
Perc |
Numeric |
The Tax percentage |
countryID |
Numeric |
Unique country identifier |
countryStateID |
Numeric |
Unique country's state identifier |
TaxNumber |
Alpha Numeric |
Specified tax, Tax Number |
|
JSON Output
HTTP CODE: 200 OK
[
{
"taxSettingID": 245,
"Name": "VAT",
"rules": [
{
"taxRuleID": 72,
"countryID": 71,
"countryStateID": 5,
"Perc": 0.14,
"TaxNumber": "1323123456"
}
]
},
{
"taxSettingID": 246,
"Name": "PSD",
"rules": [
{
"taxRuleID": 74,
"countryID": 71,
"countryStateID": 4,
"Perc": 0.12,
"TaxNumber": ""
}
]
}
]
Adds a tax setting to your account
POST https://api.billagain.com/v1/tax
Parameter |
Format |
Description |
Name req |
Alpha Numeric |
The tax name |
rules |
Object List |
List of tax rules |
Perc req |
Numeric |
The Tax percentage |
countryID |
Numeric |
Unique country identifier |
countryStateID |
Numeric |
Unique country's state identifier |
TaxNumber |
Alpha Numeric |
Specified tax, Tax Number |
|
Parameter |
Format |
Description |
taxSettingID |
Numeric |
Unique tax setting identifier |
Name |
Alpha Numeric |
The tax name |
rules |
Object List |
List of tax rules |
taxRuleID |
Numeric |
Unique tax rule identifier |
Perc |
Numeric |
The Tax percentage |
countryID |
Numeric |
Unique country identifier |
countryStateID |
Numeric |
Unique country's state identifier |
TaxNumber |
Alpha Numeric |
Specified tax, Tax Number |
|
JSON Input
{
"Name": "VAT",
"rules": [
{
"countryID": 71,
"countryStateID": 5,
"Perc": 0.14,
"TaxNumber": "123123123"
}
]
}
JSON Output
HTTP CODE: 201 Created
{
"taxSettingID": 248,
"Name": "VAT",
"rules": [
{
"taxRuleID": 76,
"countryID": 71,
"countryStateID": 5,
"Perc": 0.14,
"TaxNumber": "123123123"
}
]
}
Edits a specific tax setting
PUT https://api.billagain.com/v1/tax/{taxSettingID}
Parameter |
Format |
Description |
taxSettingID req |
Numeric |
Unique tax setting identifier |
Parameter |
Format |
Description |
Name req |
Alpha Numeric |
The tax name |
rules |
Object List |
List of tax rules - options:
- Add - by posting a nested rule object and excluding the {taxRuleID}
- Edit- by posting a nested rule object and including existing {taxRuleID} connected to the this {taxSettingID}
- Delete - by not including the existing rule object from the rule list
|
taxRuleID |
Numeric |
Unique tax rule identifier |
Perc req |
Numeric |
The Tax percentage |
countryID |
Numeric |
Unique country identifier |
countryStateID |
Numeric |
Unique country's state identifier |
TaxNumber |
Alpha Numeric |
Specified tax, Tax Number |
|
JSON Input
{
"Name": "Vat",
"rules": [
{
"taxRuleID": 72,
"countryID": 71,
"countryStateID": 5,
"Perc": 0.14,
"TaxNumber": "123123123"
},
{
"countryID": 71,
"countryStateID": 6,
"Perc": 0.14,
"TaxNumber": "123"
}
]
}
JSON Output
HTTP CODE: 204 No Content
Delete a tax setting in your account
DELETE https://api.billagain.com/v1/tax/{taxSettingID}
Parameter |
Format |
Description |
taxSettingID req |
Numeric |
Unique tax setting identifier |
JSON Output
HTTP CODE: 204 No Content