Blockchain
In a pilot project together with BloXmove, we found out that the TOMP-API should be extended a bit to cope with exchanging validatable account information. Next to this, the operator information should be extended to be able to inform more accurately about the pricing and conditions of the assets. It resulted in 2 issues (# and #), and we’re going to describe the solution for both of these.
Adding pricing to asset types
The TOMP-API until version 1.2.2 is able to communicate about pricing plans and available asset (types) in the Operator Information module, without any relation. The conditions were already there, but only available as a result of a planning request.
In version 1.3.0 we decided to connect the asset type and the applicable pricing plans AND the asset type and the conditions. This makes it possible to fetch this data upfront. In the returned “available assets”, the related pricing plans and their conditions (like required data for booking, return areas, or deposits) are available.
[ {
"id": "Family car",
"nrAvailable": 32,
"assetClass": "CAR",
"sharedProperties": { ... },
"applicablePricings": [
{ "planId": "Family car price",
"name": "Family car price",
"fare": { "estimated": false, "class": "FAIR", "parts": [ { "amount": 25.0, "currencyCode": "EUR", "type": "FIXED" } ] }
},
{ "planId": "Reduced family car price",
"name": "Family car price - frequent users",
"fare": { "estimated": false, "class": "FAIR", "parts": [ { "amount": 22.5, "currencyCode": "EUR", "type": "FIXED" } ] }
}
]
}
]
To cope with blockchain aspects we extended the required booking data with the so-called ‘user claims’. With such a claim the TO can express the requirement of certain personal data, like having to be older than 18 and have a valid driving licence. A small extension in the API has been made for this, the possible user claims are posted on our wiki since there is no standard for this yet. This proposal list can be extended, and we will communicate about this user-claim list with every new release.
[ {
"id": "Family car",
"nrAvailable": 32,
"assetClass": "CAR",
"sharedProperties": { ... },
"applicablePricings": [ ... ],
"conditions": [
{
"requiredFields": [ "BLOCKCHAIN_CLAIMS" ],
"claims": [ "ABOVE_18", "DRIVER_LICENSE_CAR" ],
"conditionType": "conditionRequireBookingData",
"id": "validDriver"
}
]
}
]