Click or drag to resize

VehicleInformationServiceGetTax Method

OFV Kjøretøydata service

Get tax for vehicle.

Namespace:  OfvVehicleData.Service
Assembly:  OfvVehicleData.Service (in OfvVehicleData.Service.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public DTO GetTax(
	UserDTO user,
	int engineOutputKw,
	string engineCo2Emmission,
	string engineNoxEmmission,
	int vehicleOwnWeight,
	string fuelShortName,
	int chargeableHybrid,
	string date,
	int vehicleGroup,
	Nullable<int> batteryRange,
	string format
)

Parameters

user
Type: OfvService.DTO.LoginUserDTO
UserDTO
engineOutputKw
Type: SystemInt32
Engine output in KW. For Hybrids, the ouput power from combustionengine has to be used.
engineCo2Emmission
Type: SystemString
Engine CO2 emmission in g/km.
engineNoxEmmission
Type: SystemString
Engine nox emmission in mg/km.
vehicleOwnWeight
Type: SystemInt32
Vehicle weight in kilos without driver.
fuelShortName
Type: SystemString
Fuelcode in short-format.

Fuelcodes

  • B - Gasoline
  • D - Diesel
  • E - Electric
  • A - Etanol
  • HB - Hybrid (gasoline)
  • HD - Hybrid (diesel)

chargeableHybrid
Type: SystemInt32
Is chargeable when set to 1
date
Type: SystemString
Date of registration (yyyy-mm-dd).
vehicleGroup
Type: SystemInt32
Vehiclegroup code defines which group to work with. Only tax-calculation for passengercars (101) and commercial cars (311).
batteryRange
Type: SystemNullableInt32
Battery range for hybrid vehicle
format
Type: SystemString
json/xml - which format result will be delivered in.

Return Value

Type: DTO
XML string of calculation result
Examples
Hers`s an example on how to get tax-calculated for a vehicle (this example is for an electric car).
Input
{
    "user" : {
        "username" : "my@email.com",
        "token" : "b0d7bfc7c0afd3092d50df077110783c",
        "ipAddress" : "192.168.1.254"
    },
    "engineOutputKw" : 47,
    "engineCo2Emmission" : 0,
    "vehicleOwnWeight" : 1110,
    "fuelShortName" : "E",
    "chargeableHybrid" : 1,
    "date" : "2018-06-01",
    "vehicleGroup" : "101",
    "batteryRange" : 50
}
The result has data on xml-format because its the result of another external service.
Output
{
    "success" : true,
    "data" : "?<?xml version=\"1.0\" encoding=\"utf-8\"?><CalculatedItem xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"><Text xmlns=\"http:\/\/api.ofv.no\/\">Personbil 2012<\/Text><Sum xmlns=\"http:\/\/api.ofv.no\/\">0<\/Sum><\/CalculatedItem>"
}
See Also