POST /PropertyGain
Returns the tax calculation for Property gain. 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/PropertyGain
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 fromzipandmunicipalitymust be provided in order for a request to succeed.-
cantonSemi-optional
Canton of Switzerland to which a property belongs to. This value corresponds to an index in a list returned by the /CantonList service.Example Values:
0-25 -
municipality-of-taxationSemi-optional
Place name of the municipality of taxation.Example Value:
Yvorne -
zipSemi-optional
Postal code of the municipality to which the property belongs.Example Value:
1853 -
municipalitySemi-optional
Name of the municipality to which the property belongs.Example Value:
Yvorne -
propertyOptional
Property name.Example Value:
Effervescence -
purchase-dateRequired
Date when property was purchased. This value has to be in the following format:
YYYY-MM-DD.Example Value:2009-11-19 -
sale-dateRequired
Date when property was sold. This value has to be in the following format:
YYYY-MM-DD.Example Value:2015-07-01 -
type-of-wealthRequired
Type of the property, private or business property.Example Value:
0for private property,1for business property. -
self-occupiedOptional
Type of the property is private property and property municipality of taxation belongs to canton Basel-Landschaft, St. Gallen or Vaud, this value represents whether the property is self-occupied.Example Values:
true, false -
selfuse-yearOptional
Type of the property is private property and property municipality of taxation belongs to canton Basel-Stadt, this value represents the number of years that property was self-used. This value cannot be longer than the number of years between purchase date and selling date. If longer, the value will be set to be the number of years between purchase and selling dates.Example Value:
5 -
taxable-personOptional
Taxable person.Example Value:
Nadine Schneider -
marital-statusRequired
Marital status of the taxable person. This value corresponds to an index in a list returned by the /MaritalStatusList service.Example Values:
0-8 -
childrenOptional
How many children does the taxable person have. Value can be integer or non-integer. If not provided, the default value is
0. Example Value: 1.5 -
concubinageOptional
If relationship with partner involve concubinage then value should be set to 'true'. By default value is assumed to be false. This is important parameter for the Canton VD.
-
religious-affiliationSemi-optional
Taxable person's religious affiliation, if taxable person has any. This value corresponds to an index in a list returned by the /ReligiousAffiliationList service.Example Values:
0-4 -
partner-religious-affiliationSemi-optional
If taxable person has a partner, this parameter represents the partner's religious affiliation, if parter has any. This value corresponds to an index in a list returned by the /ReligiousAffiliationList service.Example Values:
0-4 -
church-communitySemi-optional
If property municipality of taxation belongs to canton Appenzell Innerrhoden, this parameter represents the taxable person's church community, and it has to be one of the values in the list returned by the /ChurchCommunityList service.Example Value:
Kath. Brülisau -
partner-church-communitySemi-optional
If taxable person has a partner, and property municipality of taxation belongs to canton Appenzell Innerrhoden, this parameter represents the partner's church community, and it has to be one of the values in the list returned by the /ChurchCommunityList service.Example Value:
Kath. Oberegg
-
-
fiscal-factors Required
Contains fiscal factors for the tax calculation.
-
selling-priceRequired
Property selling price.Example Value:
5848742.25 -
revenue-correctionOptional
Contains revenue correction parameters. Can contain up to 4 parameters. Any additional parameters will be ignored.
-
selling-expensesOptional
Selling expensesExample Value:
5848742.25 -
comissions-to-third-partiesOptional
Commisions to third parties.Example Value:
23234.65 -
transfer-tax-and-feesOptional
Transfer tax and fees.Example Value:
78574.43 -
renewal-fund-upon-saleOptional
Renewal fund upon sale.Example Value:
33928.32 -
capitalized-right-of-useOptional
Capitalized right of use.Example Value:
78594.25 -
recurring-benefitsOptional
Recurring benefits.Example Value:
328272.32 -
capitalized-value-business-assetOptional
Capilized value (Business asset)Example Value:
239782.78 -
other-contributionsOptional
Other contributions.Example Value:
2156.32 -
otherOptional
Other revenue correction.Example Value:
87584.33 -
customOptional
Contains custom revenue correction parameter.
-
descriptionOptional
Description of the custom revenue correction.Example Value:
Catalog expenses -
totalOptional
Value of the custom revenue correction.Example Value:
2290922.45
-
-
-
purchase-priceRequired
Property purchase price.Example Value:
427827.44 -
investment-costsOptional
Contains investment costs parameters. Can contain up to 4 parameters, not including
construction-investments. Any additional parameters will be ignored.-
purchase-costsOptional
Purchase costs.Example Value:
3229723.23 -
comissions-to-third-partiesOptional
Comissions to third parties.Example Value:
1228.56 -
transfer-tax-and-feesOptional
Transfer tax and fees.Example Value:
472612.54 -
value-enhancing-expendituresOptional
Value enhancing expenditures.Example Value:
76483.32 -
value-enhancing-contributions-in-own-workOptional
Value enhancing contributions in own work.Example Value:
26597.56 -
selling-expensesOptional
Selling expenses.Example Value:
32663.65 -
other-expensesOptional
Other expenses.Example Value:
122485.65 -
otherOptional
Other investment costs.Example Value:
4864.23 -
customOptional
Contains custom investment cost parameter.
-
descriptionOptional
Description of the custom investment cost.Example Value:
Required electrical equipment -
totalOptional
Value of the custom investment cost.Example Value:
23923.67
-
-
construction-investmentsOptional
If property municipality of taxation belongs to canton Basel-Stadt, this value represents the construction investments.Example Value:
78573.23
-
-
income-determining-tax-rateOptional
If property municipality of taxation belongs to canton Aargau, Appenzell Innerrhoden, Appenzell Ausserrhoden, Fribourg, Geneva, Glarus, Luzern, Neuchâtel, Obwalden, St. Gallen, Schaffhausen, Solothurn, Vaud, Valais or Zug, this value represents income determining tax rate.Example Value:
34737.45
-
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/PropertyGain
{
"basic-data": {
"zip": 4000,
"type-of-wealth": 0,
"children": 1,
"sale-date": "2015-06-15",
"self-occupied": false,
"property": "Test property",
"municipality": "Basel",
"canton": 5,
"purchase-date": "1998-09-30",
"religious-affiliation": 0,
"marital-status": 2,
"taxable-person": "Peter Müller"
},
"fiscal-factors": {
"selling-price": 15615156,
"purchase-price": 186518,
"investment-costs": {
"comissions-to-third-parties": 165884,
"selling-expenses": 156165,
"transfer-tax-and-fees": 1321325,
"value-enhancing-expenditures": 13515,
"construction-investments": 5645554
},
"revenue-correction": {
"transfer-tax-and-fees": 131515,
"capitalized-right-of-use": 135145,
"other-contributions": 1655445,
"renewal-fund-upon-sale": 1321516
}
},
"language": "fr",
"key": "55c35523dc19e8.64742828"
}Example Result
{
"data": {
"id": "4d83dc95-1542-4949-abd1-5735660feb14",
"request-date-time": "2015-09-02T16:02:41.839+0200",
"attributes": {
"taxes-in-percent-of-real-estate-capital-gains": {
"total": "19.2%",
"description": "Impôt en % du gain immobilier"
},
"relevant-investment-costs": {
"total": 7488961,
"description": "Coût d'investissement déterminant"
},
"relevant-sales-proceeds": {
"total": 1.5952715E7,
"description": "Produit de la vente déterminant"
},
"total-property-gains-tax": {
"total": 1625040,
"description": "Total Impôt sur les gains immobiliers"
},
"marginal-tax-rate": {
"total": "20",
"description": "Taux d'impôt marginal"
},
"relevant-real-estate-gain": {
"total": 8463754,
"description": "Gain immobilier déterminant"
},
"property-gains-tax": {
"total": 1625040,
"description": "Impôt sur les gains immobiliers"
},
"taxation-system": "moniste",
"ownership-period": "16/9"
},
"type": "calculation-results"
}
}