|
|
|
# Vehicles
|
|
|
|
|
|
|
|
[TOC]
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
|
|
Vehicles and their attached data will work pretty much as documented in the [IronAPI documentation](https://bitbucket.org/ironapigenesis/ironapi-gw/wiki/Home).
|
|
|
|
|
| ... | ... | @@ -35,3 +35,19 @@ core\__vehicle_file\__vehicle.id can be used to show a [download](https://bitbuc |
|
|
|
|
|
|
|
{{url}}/data/core/file/3/download/file
|
|
|
|
```
|
|
|
|
|
|
|
|
## Reowning a vehicle
|
|
|
|
|
|
|
|
To fulfil the requirement, that the data (vehicle_maintenance) stored should not be visible to the new owner of a vehicle, a new database entry with the same vin is created and the old entry gets the "reowned_id" set to the newly created entry.
|
|
|
|
|
|
|
|
To do this within one transaction, a plugin is provided:
|
|
|
|
|
|
|
|
```
|
|
|
|
#!json
|
|
|
|
|
|
|
|
POST https://garage.abocar.at/plugins/vehicle_reown
|
|
|
|
{
|
|
|
|
"vehicle_id" : 2,
|
|
|
|
"customer_id" : 5
|
|
|
|
}
|
|
|
|
``` |
|
|
\ No newline at end of file |