Upgrading to API v1.3
New version in URL
The API version used is encoded in the API URLs. To start using version 1.3, start by replacing all the request URLs.
v1.2 | v1.3 |
---|---|
https://api.omocom.se/v1.2/<platform>/<market>/Users |
https://api.omocom.se/v1.3/<platform>/<market>/Users |
The Rental and Transport qualifiers have been removed
In version 1.3 there is no longer a distinct difference between a rental and a transport insurance. They are all just insurance now. This again affects the URLs.
v1.2 | v1.3 |
---|---|
https://api.omocom.se/v1.2/<platform>/<market>/InsurableRentalObjects https://api.omocom.se/v1.2/<platform>/<market>/InsurableTransportObjects |
https://api.omocom.se/v1.3/<platform>/<market>/InsurableObjects |
https://api.omocom.se/v1.2/<platform>/<market>/RentalInsurances https://api.omocom.se/v1.2/<platform>/<market>/TransportInsurances |
https://api.omocom.se/v1.3/<platform>/<market>/Insurances |
Changes in payload
Insurable Objects
Rental Objects
There are no special changes required here.
Transport Objects
In previous API versions, transport objects had a number of fairly specific properties which have now been moved to the Properties section of the requests.
Old: v1.2
{
PickUpLocation: {
StoreName: "The Chainsaw Store",
StreetAddress: "OldHouseInTheWoods",
StreetAddress2: null,
ZipCode: "12345",
City: "Texas",
Country: "USA"
},
PickUpLocationType: "InHouse",
CarryingAssistanceAvailableAtPickUp: false,
DropOffLocation: {
StoreName: "BlockBuster",
StreetAddress: "OtherOldHouseInTheWoods",
StreetAddress2: null,
ZipCode: "12345",
City: "Texas",
Country: "USA"
},
DropOffLocationType: "InHouse",
CarryingAssistanceAvailableAtDropOff: false,
ObjectId: "chainsaw637601276930460543",
ObjectCategory: "Power tools",
OwnerHandle: "bc1a8e6f-387e-4b3a-93b7-08d936d5b792",
ShortDescription: "Chainsaw",
Description: "A splendid chainsaw",
ObjectValue: {
Amount: 500,
Currency: "SEK"
}
}
New: v1.3
{
ObjectId: "chainsaw637601276933092323",
ObjectCategory: "Power tools",
OwnerHandle: "c65d985a-e396-4676-93aa-08d936d5b792",
ShortDescription: "Chainsaw",
Description: "A splendid chainsaw",
PhysicalId: null,
ObjectValue: {
Amount: 500,
Currency: "SEK"
},
ExternalProperties: [
{
Type: "The Chainsaw Store",
Name: "PickUpLocation",
Description: null,
AddressValue: {
Street: "OldHouseInTheWoods",
Street2: null,
City: "Texas",
ZipCode: "12345",
Country: "USA"
}
},
{
Type: "Text",
Name: "PickUpLocationType",
Value: "InHouse"
},
{
Type: "Unknown",
Name: "DropOffLocation",
Description: "BlockBuster",
AddressValue: {
Street: "OtherOldHouseInTheWoods",
Street2: null,
City: "Texas",
ZipCode: "12345",
Country: "USA"
}
},
{
Type: "Text",
Name: "DropOffLocationType",
Value: "InHouse"
},
{
Type: "Text",
Name: "CarryingAssistanceAvailableAtPickUp",
Value: false
},
{
Type: "Text",
Name: "CarryingAssistanceAvailableAtDropOff",
Value: false
}
]
}
Insurances
Rental Insurances
The field "TotalRent" has moved to be a property.
Old TotalRent: v1.2
{
"Product": "$Product",
"insuredAmount": {
"amount": 1500,
"currency": "SEK"
},
"CounterpartHandle": "$COUNTERPART_HANDLE",
"insuranceStartDateTime": "$StartTime",
"insuranceEndDateTime": "$EndTime",
"totalRent": {
"amount": 150,
"currency": "SEK"
}
}
New TotalRent: v1.3
{
"Product": "$Product",
"insuredAmount": {
"amount": 1500,
"currency": "SEK"
},
"CounterpartHandle": "$COUNTERPART_HANDLE",
"insuranceStartDateTime": "$StartTime",
"insuranceEndDateTime": "$EndTime",
"properties": [
{
"name": "TotalRent",
"monetaryvalue": {
"amount": 150,
"currency": "SEK"
}
}
]
}
Transport Insurances
There are no specific payload changes for transport insurances.