WebApi

<back to all web services

AddCostBasis

Create new cost basis for client

The following routes are available for this service:
POST, OPTIONS/TaxReports/CostBasis
AddCostBasis Parameters:
NameParameterData TypeRequiredDescription
TimestampbodyDateTimeYes
TypebodystringYes
ExchangebodystringYes
CurrencybodystringYes
UserKeyNamebodystringYes
AmountbodystringYes
BasisbodystringNo
CostBasis Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo
TimestampformDateTimeNo
TypeformCostBasisTypeNo
ExchangeformExchangeNameNo
CurrencyformCurrencyNo
UserKeyNameformstringNo
AmountformdecimalNo
Basisformdecimal?No
Currency Parameters:
NameParameterData TypeRequiredDescription
NameformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /TaxReports/CostBasis HTTP/1.1 
Host: burntrouter.info 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"Timestamp":"\/Date(-62135596800000)\/","Type":"String","Exchange":"String","Currency":"String","UserKeyName":"String","Amount":"String","Basis":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Id":"String","Timestamp":"\/Date(-62135596800000)\/","Type":"OpeningBalance","Exchange":null,"UserKeyName":"String","Amount":0,"Basis":0}