# BPM Enrichment

### Introduction <a href="#introduction" id="introduction"></a>

### Overview <a href="#overview" id="overview"></a>

EuroStocks will provide BPM enrichment details from provided LicensePlate number.

| Documentation can be incomplete and/or outdated, Contact EuroStocks team by sending an email on <api@eurostocks.com> for any questions regarding API. |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- |

### Disclaimer <a href="#overview" id="overview"></a>

In Dutch law there are various exemptions for BPM (household effects arrangement, ambulances, active WOK status, etc) and in exceptional situations no BPM has been paid. This means that a refund of BPM is not possible when the vehicle gets exported.\
\
If the vehicle meets the definition of a damaged vehicle as stated by the Dutch tax authorities, a refund of BPM is not possible.\
\
The above calculation is performed on the basis of the vehicle data provided by ‘Open Data RDW: Licensed vehicles’. EuroStocks B.V. is not liable for the correctness of this information. No rights can be derived from this calculation.\
\
Before exporting a vehicle, always contact ‘BelastingTelefoon Auto’ by phone 0800 – 0749 to validate the refundable BPM amount.<br>

### Main features <a href="#main_features" id="main_features"></a>

* BPM Enrichment

#### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

User must have credentials to access BPM Enrichment Service.

| <p><strong>Limited support for the development process and maintenance:</strong><br>Please note that all examples provided in our documentation are considered as guidelines for your development process but EuroStocks for itself is not able to directly assist with any of your preferred programming languages and/or used scripts.</p> |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

## Working with BPM Enrichment Service <a href="#working_with_ad_data" id="working_with_ad_data"></a>

## BPM Enrichment

<mark style="color:blue;">`GET`</mark> `https://services.eurostocks.com/api/v2/exportcalculation/getbmppricebylicenseplategivendate?exportDate={exportDate}&licensePlate={licensePlate}`

#### Headers

| Name                                       | Type   | Description                        |
| ------------------------------------------ | ------ | ---------------------------------- |
| UserName<mark style="color:red;">\*</mark> | String | Username which EuroStocks provides |
| Password<mark style="color:red;">\*</mark> | String | Password which EuroStocks provides |
| APIKey<mark style="color:red;">\*</mark>   | String | ApiKey which EuroStocks provides   |

#### Request Body

| Name         | Type   | Description                                                                   |
| ------------ | ------ | ----------------------------------------------------------------------------- |
| exportDate   | String | Export date to calculate Rest BPM accordingly. Date format will be dd-MM-yyyy |
| licensePlate | String | LicensePlate number to get BPM Enrichment details                             |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

**Sample Success Request**

```json
GET api/v2/exportcalculation/getbmppricebylicenseplategivendate?exportDate=11-12-2020&licensePlate=22GFP3
HOST: services.eurostocks.com
Content-type: "application/json"
```

**Sample Success Response**

```json
HTTP/1.1 200 OK

{
  "Status": 200,
  "Message": "",
  "Result": {
    "GrossBpmPrice": 8225,
    "RestBpmPrice": 406,
    "FirstRegistrationDate": "07-06-2008",
    "FirstRegistrationDateNl": "07-06-2008",
    "Make": "OPEL",
    "Model": "ZAFIRA",
    "NextMonthPercentageDepriciated": 95.154,
    "NextToNextMonthPercentageDepriciated": 95.237,
    "VehicleStatus": "",
    "RestBpmNextMonthDate": "07-01-2021",
    "RestBpmNextMonthPrice": 399,
    "RestBpmNextToNextMonthDate": "07-02-2021",
    "RestBpmNextToNextMonthPrice": 392,
    "NoOfMonths": 150,
    "NextMonthNoOfMonths": 151,
    "NextToNextMonthNoOfMonths": 152,
    "NoOfDays": 4,
    "NextMonthNoOfDays": 0,
    "NextToNextMonthNoOfDays": 0,
    "ImportedRestBpm": 0,
    "ImportedDepriciation": 0,
    "ExportedDepriciation": 95.071
  }
}
```

**Sample Success Request For Imported Vehicle**

```json
GET api/v2/exportcalculation/getbmppricebylicenseplategivendate?exportDate=11-12-2020&licensePlate=JZ933D
HOST: services.eurostocks.com
Content-type: "application/json"
```

**Sample Success Response For Imported Vehicle**

```json
HTTP/1.1 200 OK

{
  "Status": 200,
  "Message": "",
  "Result": {
    "GrossBpmPrice": 1699,
    "RestBpmPrice": 405,
    "FirstRegistrationDate": "27-11-2015",
    "FirstRegistrationDateNl": "07-07-2016",
    "Make": "VOLVO",
    "Model": "V40",
    "NextMonthPercentageDepriciated": 0,
    "NextToNextMonthPercentageDepriciated": 0,
    "VehicleStatus": "IMPORTED_VEHICLE",
    "RestBpmNextMonthDate": "",
    "RestBpmNextMonthPrice": 0,
    "RestBpmNextToNextMonthDate": "",
    "RestBpmNextToNextMonthPrice": 0,
    "NoOfMonths": 60,
    "NextMonthNoOfMonths": 0,
    "NextToNextMonthNoOfMonths": 0,
    "NoOfDays": 15,
    "NextMonthNoOfDays": 0,
    "NextToNextMonthNoOfDays": 0,
    "ImportedRestBpm": 1261,
    "ImportedDepriciation": 25.75,
    "ExportedDepriciation": 50.408
  }
}
```

**Sample Request when vehicle not found on RDW**

```json
GET api/v2/exportcalculation/getbmppricebylicenseplategivendate?exportDate=11-12-2020&licensePlate=5TPG07
HOST: services.eurostocks.com
Content-type: "application/json"
```

**Sample Response when vehicle not found on RDW**

```json
HTTP/1.1 200 OK

{
  "Status": 200,
  "Message": "Geen voertuig gevonden voor het opgegeven kenteken. RDW OpenData toont alleen het actieve voertuigpark. Als een voertuig geen tenaamstelling heeft, kan worden aangenomen dat deze voertuigen niet op de openbare weg rijden.",
  "Result": 404
}
```

**Sample Request when vehicle is TAXI**

```json
GET api/v2/exportcalculation/getbmppricebylicenseplategivendate?exportDate=11-12-2020&licensePlate=12ZLVH
HOST: services.eurostocks.com
Content-type: "application/json"
```

**Sample Response when vehicle is TAXI**

```json
HTTP/1.1 200 OK

{
  "Status": 200,
  "Message": "REST_BPM_NOT_POSSIBLE_REASON_TAXI",
  "Result": 204
}
```

**Sample Request when vehicle is older than 16/10/2006**

```json
GET api/v2/exportcalculation/getbmppricebylicenseplategivendate?exportDate=11-12-2020&licensePlate=ZDVV63

HOST: services.eurostocks.com
Content-type: "application/json"
```

**Sample Response when vehicle is older than 16/10/2006**

```json
HTTP/1.1 200 OK

{
  "Status": 200,
  "Message": "REST_BPM_NOT_POSSIBLE_REASON_REG_NL_BEFORE_16_OCTOBER_2006",
  "Result": 204
}
```

**Sample Request when vehicle is not Personenauto**

```json
GET api/v2/exportcalculation/getbmppricebylicenseplategivendate?exportDate=11-12-2020&licensePlate=V043KB

HOST: services.eurostocks.com
Content-type: "application/json"
```

**Sample Response when vehicle is not Personenauto**

```json
HTTP/1.1 200 OK

{
  "Status": 200,
  "Message": "REST_BPM_NOT_POSSIBLE_REASON_VEHICLE_TYPE_IS_NOT_PERSONENAUTO",
  "Result": 204
}
```
