Basics
App start-up
What every app should call when it opens — the update check, platform settings and the lookup lists.
The Platform · Bootstrap endpoints are public: no token is needed, so an app can call them before the user has signed in.
Check for an update first#
GET init/app-version tells an app whether it must update before it can be used.
GET /api/v1/init/app-version?app=customer&platform=ios&version=1.4.2
| Query | Values |
|---|---|
app |
customer, driver or merchant |
platform |
ios or android |
version |
the build's version string, optional |
{
"status": "success",
"data": {
"app": "customer",
"platform": "ios",
"current_version": "1.4.2",
"latest_version": "1.5.0",
"minimum_version": "1.3.0",
"store_url": "https://apps.apple.com/…",
"update_available": true,
"force_update": false
}
}
force_update: truemeans the build is belowminimum_version, or Tote marked the latest release as mandatory. Block the app and send the user tostore_url.update_available: truewithoutforce_updateis a soft prompt the user may dismiss.- Both flags are
nullwhenversionis not sent. Always send it. - Versions compare numerically, so
1.10.0is newer than1.9.0.
Tote maintains these values in the admin dashboard; no app release is needed to raise the minimum version.
Platform settings#
GET init/settings returns the platform-wide content the apps display under settings: the privacy policy and terms for each app, the about-us text and the customer service details. Read it at start-up and cache it for the session. Settings change rarely, but they can change without an app release.
Lookup lists#
| Endpoint | Used for |
|---|---|
init/banners |
The home screen carousel in the customer app |
init/store-classifications |
The store type a merchant picks when creating a store |
init/vehicles |
The vehicle a driver picks when registering |
init/cities |
Legacy. Locations are coordinates now; see Location & store discovery |
Translatable names in these lists come back as {"ar": …, "en": …} objects, as everywhere else.