Entities
Cross-cutting Entities
Omocom is a multi-tenant platform where each tenant is identified as a Platform. Each platform is identified in the
URL, e.g. https://v1.3/Contoso/SE/Insurances
is used by the platform Contoso in the Swedish (SE) market.
Each market is sub-divided into Markets. Markets can be named anything but typically country abbreviations like "SE"
for Sweden, "GB"
for Great Britain etc. Markets can be compared to a namespace dividing user and object identities
into geographical/administrative areas. Whether e.g. a user "bosse123"
is global within the platform or unique in
combination with the Market is controlled platform by platform at initial setup in collaboration with Omocom. Most
common setup is to have users be scoped to market.
The Market also controls things like default currency, default language in communication with the user etc.
Main Entities
There are three main types of objects the API is concerned with:
- User (renter and rentee)
- InsurableObject
- Insurance
Furthermore, once created an insurance can be in one of the following states:
- Quote
- Pending
- Active
- Ended
This is described more in detail in the section on Insurances.
Typical Flow
The API is typically used in the following sequence:
- Two users are created (
POST User
) - One
InsurableObject
isPOST
ed, containing details on the object to be insured; make, description, image links etc. - One
Insurance
isPOST
ed with details on planned insurance time slot, counterpart etc. and a price quote is returned. - The Insurance is
Accept
ed - everything is ready. - When the rental period actually starts, an
Activate
is posted. - Insurance is active until the
End
is posted. - Each of the users in the transaction get to rate each other and the result is posted to Omocom.
Time
All timestamps are given in ISO8601 format 'Datetime with time zone'. More precisely: yyyy-mm-ddThh:mm:ss+|-hh:mm
, examplified by 2008-09-15T15:53:00+05:00
.
For example, local time 2021-06-08 13.12 local time in Sweden while daylight savings is in effect would be written 2021-06-08T13:12:00+02:00
since Sweden at this time is 2 hours ahead of UTC. The same point in time in Finland would be written 2021-06-08T14:12:00+03:00
as Finland is 3 hours ahead of UTC in the summer.
Without DST in effect, a December time in Sweden would be e.g. 2021-12-08T17:03:00+01:00
for 17.03 local time.