POST /JP
Returns the tax calculation for Legal persons. Returns a string describing the failure condition when unsuccessful.
Sending an empty request will return an HTTP 415 error (Unsupported Media Type). Failure to provide any of the required parameters will result in an HTTP 400 error (Bad Request).
Resource URL
https://api.drtax.ch/TaxCalculator/JP
Resource Information
-
Response formats
JSON
-
Requires authentication?
Yes (
HMAC-SHA256based authentication) -
Rate limited?
Yes
Parameters
-
key Required
API key which was given to you after registering for access to the Tax calculator API.
-
language Optional
Language in which the descriptions of tax calculation are returned. If not provided, the default language is set to English.Example Values:
de, fr, it, en -
basic-data Required
Contains company basic data for a tax calculation. Either both
cantonandmunicipality-of-taxation, or either fromzipandheadquartermust be provided in order for a request to succeed.-
tax-yearOptional
Tax year for which the request is issued. If not provided, a year preeceding the current calendar year will be used.Example Value:
2014 -
cantonSemi-optional
Canton of Switzerland to which a company headquarter belongs to. This value corresponds to an index in a list returned by the /CantonList service.Example Values:
0-25 -
municipality-of-taxationSemi-optional
Municipality of taxation.Example Value:
Lauperswil -
zipSemi-optional
Postal code of the company headquarter.Example Value:
3543 -
headquarterSemi-optional
Place name of the company headquarter.Example Value:
Emmenmatt -
legal-formRequired
Legal form of the company. This value corresponds to an index in a list returned by the /LegalFormList service.Example Values:
0-8 -
company-typeSemi-optional
If the legal form of the company is Limited company, Cooperative, or Limited partnership business entity, this parameter represents the company type. This value corresponds to an index in a list returned by the /CompanyTypeList service.Example Values:
0-10 -
before-taxesOptional
Whether calculation base is before taxes. If not provided, the default value is
true.Example Values:true, false -
tax-liability-fromOptional
Start of the taxation period. This value has to be in the following format:
YYYY-MM-DD. If not provided, the default value is the first day of the tax year.Example Value:2014-01-01 -
tax-liability-tillOptional
End of the taxation period. This value has to be in the following format:
YYYY-MM-DD. If not provided, the default value is the last day of the tax year.Example Value:2014-12-31
-
-
fiscal-factors Required
Contains fiscal factors for the tax calculation.
-
taxable-amountsRequired
Contains amounts that are a subject for taxation.
-
cantonal-profitRequired
Cantonal profit.Example Value:
1568781.12 -
cantonal-capitalRequired
Cantonal capital.Example Value:
4347837.25 -
confederation-profitOptional
Confederation profit.Example Values:
1235843.84 -
at-the-regular-rateOptional
If the legal form of the company is Limited company and the company type is Holding company, this value represents how much of cantonal profit is at the regular rate.Example Value:
48772.12
-
-
determining-for-the-rateOptional
Contains determining for the rate parameters.
-
cantonal-profitSemi-optional
Cantonal profit.Example Value:
105125.47 -
cantonal-capitalSemi-optional
Cantonal capital.Example Value:
658871.87 -
at-the-regular-rateSemi-optional
If the legal form of the company is Limited company and the company type is Holding company, this value represents how much of cantonal profit is at the regular rate.Example Value:
186871.15
-
-
deduction-for-participationsOptional
Contains deduction for participations parameters.
-
cantonal-profitSemi-optional
Cantonal profit.Example Values:
0 - 100(%) -
cantonal-capitalSemi-optional
Cantonal capital.Example Values:
0 - 100(%) -
confederation-profitSemi-optional
Confederation profit.Example Values:
0 - 100(%)
-
-
profit-tax-relief-tariffOptional
If company headquarter belongs to canton Basel-Landschaft, this parameter represents profit tax relief tariff.Example Values:
0 - 100(%) -
value-of-land-in-canton-minimum-taxOptional
If company headquarter belongs to canton Appenzell Ausserrhoden, Basel-Stadt, Luzern, Schaffhausen or Valais, this parameter reresents value of land in canton (Minimum tax).Example Value:
987742.52 -
proportional-capitalOptional
If company headquarter belongs to canton Basel-Stadt, this parameter represents proportional capital.Example Value:
15867.94 -
gross-receipts-of-wholesale-trade-and-manufacturingOptional
If company headquarter belongs to canton Fribourg, this parameters represents gross receipts of wholesale trade and manufacturing.Example Value:
135747.54 -
other-incomeOptional
If company headquarter belongs to canton Fribourg, this parameter represents other income.Example Value:
168778.89 -
tax-value-of-rented-propertiesOptional
If company headquarter belongs to canton Geneva, this parameter represents tax value of rented properties.Example Value:
15887.18 -
tax-value-of-owner-occupied-propertiesOptional
If company headquarter belongs to canton Geneva, this parameter represents tax value of owner occupied properties.Example Value:
1567787.94
-
Authentication
Tax Calculator API uses Hash-based message authentication code (HMAC-SHA256) to authenticate your request.
Each request to Tax Calculator API must contain:
- API Key - used to identify your account,
HMAC-SHA256signature inserted in'X-Signature'HTTP header - used to verify your request.
To create an HMAC-SHA256 signature you perform hashing of your request with API Secret as the hashing key.
In-detail information on what API Key and API Secret are, where to find them, and how to create a request signature and put it in the request can be found here.
If either of API Key or HMAC-SHA256 signature is not present in the request, the request will be rejected.
Example Request
POST
https://api.drtax.ch/TaxCalculator/JP
{
"basic-data": {
"zip": 3543,
"tax-year": 2014,
"municipality-of-taxation": "Lauperswil",
"headquarter": "Emmenmatt",
"company-type": 4,
"canton": 3,
"tax-liability-from": "2014-01-01",
"before-taxes": false,
"tax-liability-till": "2014-12-31",
"legal-form": 1
},
"fiscal-factors": {
"determining-for-the-rate": {
"cantonal-profit": 154564,
"cantonal-capital": 213545
},
"deduction-for-participations": {
"confederation-profit": 10,
"cantonal-profit": 32,
"cantonal-capital": 20
},
"taxable-amounts": {
"confederation-profit": 132154,
"cantonal-profit": 155648,
"cantonal-capital": 1321354
}
},
"language": "de",
"key": "55c35523dc19e8.64742828"
}Example Result
{
"data": {
"id": "db5dd7a4-9450-46b0-a123-db3c7b644a87",
"request-date-time": "2015-08-31T09:28:09.335+0200",
"attributes": {
"number-of-days": 365,
"cantonal-and-municipal-taxes": {
"total": 18924,
"profit": 18924,
"canton-taxes": {
"total": 11358,
"profit": 11358,
"canton": {
"total": 11358,
"profit": 11358,
"description": "Kanton",
"capital": 0
},
"capital": 0
},
"description": "Kantons- und Gemeindesteuern",
"community-taxes": {
"total": 6867,
"profit": 6867,
"community": {
"total": 6867,
"profit": 6867,
"description": "Gemeinde",
"capital": 0
},
"capital": 0
},
"church-taxes": {
"total": 699,
"profit": 699,
"church": {
"total": 699,
"profit": 699,
"description": "Kirche",
"capital": 0
},
"capital": 0
},
"capital": 0
},
"total-taxes": {
"total": 29030,
"profit": 29030,
"description": "Total Steuerbelastung",
"capital": 0
},
"community-tax-rate": {
"total": 0.3768,
"community-tax-rate": 0.1884,
"church-tax-rate": 0.1884
},
"marginal-tax-rate": {
"profit": "21.5%",
"description": "Grenzsteuersatz",
"capital": "0.0\u2030"
},
"canton-tax-rate": "3.06",
"direct-federal-tax": {
"total": 10106,
"profit": 10106,
"gross-tax-burden": {
"total": 11229,
"profit": 11229,
"description": "Bruttosteuerbelastung",
"capital": 0
},
"description": "Direkte Bundessteuer",
"deduction-for-participations": {
"total": -1123,
"profit": -1123,
"description": "Beteiligungsabzug",
"capital": 0
}
},
"data-before-after-tax": {
"net-profit-capital-before-tax": {
"total": 161184,
"profit": 184678,
"description": "Gewinn/Kapital vor Steuern",
"capital": 1350384
},
"net-profit-capital-after-tax": {
"total": 132154,
"profit": 155648,
"description": "Gewinn/Kapital nach Steuern",
"capital": 1321354
},
"minus-taxes": {
"total": -29030,
"profit": -29030,
"description": "Abzüglich Steuern",
"capital": -29030
}
}
},
"type": "calculation-results"
}
}