General
23 API calls in this section.
Get Public System Settings
/public/system-settings?language=en&key=&type=Retrieves public system settings. When key is provided, returns a single setting by setting_key. Otherwise returns all active public settings, optionally filtered by type. Query Parameters: - language (optional): Language code for localized messages - key (optional): setting_key to fetch a specific setting - type (optional): setting_type to filter the list (e.g., 'mobile', 'external_links', 'general') Public general settings include default_system_language and tenant_available_languages. Responses: - 200 OK (list) - 200 OK (single) - 404 Not Found (when key specified and not found)
1curl --request GET "$ONDI_BASE_URL/public/system-settings?language=en&key=&type=" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
keyOptionalOptional setting_key to fetch a single public setting
typeOptionalOptional setting_type to filter the list (e.g., 'mobile', 'external_links')
Responses
1{2 "success": true,3 "message": "system_settings_retrieved_successfully",4 "settings": {5 "general": {6 "default_system_language": {7 "default_language": "en"8 },9 "tenant_available_languages": {10 "available_languages": [11 "en",12 "ar",13 "ku",14 "fa"15 ],16 "language_names": {17 "en": "English",18 "ar": "Arabic",19 "ku": "Kurdish",20 "fa": "Farsi"21 }22 }23 }24 }25}1{2 "success": true,3 "message": "system_setting_retrieved_successfully",4 "settings": {5 "website_url": "https://ondi.io",6 "documentation_url": "https://docs.ondi.io",7 "api_docs_url": "https://api.ondi.io",8 "pos_portal_url": "https://pos.ondi.io",9 "restaurant_portal_url": "https://food.ondi.io",10 "express_portal_url": "https://express.ondi.io",11 "delivery_customer_portal_url": "https://track.ondi.io"12 }13}1{2 "success": true,3 "message": "system_setting_retrieved_successfully",4 "settings": {5 "default_language": "en"6 }7}1{2 "success": false,3 "message": "system_setting_not_found"4}1{2 "success": false,3 "message": "internal_server_error"4}Get Config Versions
/public/config/versions?tenant_id={{tenant_id}}&user_id={{user_id}}Returns cache resource versions for global + tenant scope and optional user scope. Headers: - Authorization: optional bearer token (needed only if requesting user scope) - If-None-Match: optional ETag from previous response Query Parameters: - tenant_id (required): UUID - user_id (optional): UUID Behavior: - Returns 200 with version maps and ETag when fresh - Returns 304 with no body when If-None-Match matches current version snapshot - Uses Cache-Control: no-store
1curl --request GET "$ONDI_BASE_URL/public/config/versions?tenant_id={{tenant_id}}&user_id={{user_id}}" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "If-None-Match: "Query parameters
tenant_idOptional{{tenant_id}}
Required UUID. Tenant scope selector.
user_idOptional{{user_id}}
Optional UUID. User scope is included only when Authorization user matches this value.
Headers
AuthorizationOptionalBearer {{access_token}}
Optional. Required only when requesting user scope with user_id.
If-None-MatchOptionalOptional ETag value returned by previous response to test 304 revalidation.
Responses
1{2 "success": true,3 "global": {4 "system.settings": 42,5 "i18n.config": 76 },7 "tenant": {8 "delivery.zones": 11,9 "warehouse.categories": 510 },11 "user": {12 "addresses.list": 313 },14 "server_time": "2026-05-24T10:00:00.000Z"15}1{2 "success": false,3 "message": "tenant_id_required"4}List Storefront Brands
/public/storefront/{{slug}}/brands?page=1&limit=20&search=&language=enList active brands for a public storefront with pagination and optional search.
1curl --request GET "$ONDI_BASE_URL/public/storefront/{{slug}}/brands?page=1&limit=20&search=&language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
slugRequiredURL-friendly identifier of the storefront
Query parameters
pageOptional1
Page number (optional, default: 1)
limitOptional20
Items per page (optional, default: 20)
searchOptionalSearch by brand name/description (optional)
languageOptionalen
Language code (optional, default: en)
Responses
1{2 "success": true,3 "data": {4 "market": {5 "id": "market-uuid",6 "slug": "my-store-slug",7 "store_name": {8 "en": "My Store"9 },10 "status": "approved"11 },12 "brands": [13 {14 "id": "brand-uuid",15 "name": {16 "en": "Apple",17 "ar": "آبل"18 },19 "slug": "apple",20 "logo_url": "https://example.com/apple.png",21 "is_active": true22 }23 ],24 "pagination": {25 "page": 1,26 "limit": 20,27 "total": 1,28 "totalPages": 129 }30 }31}Browse Storefront Product Feed
/public/storefront/{{slug}}/catalog/{{list_type}}?page=1&limit=12&category_id=&window_days=&language=enBrowse pre-ranked product feeds for a public storefront. Uses SQL procedures for minimal runtime cost and consistent response shape. Path Parameters: - slug: Storefront slug - list_type: One of trending, new-arrivals, top-selling, recommended Query Parameters: - page (optional): Page number (default: 1) - limit (optional): Items per page (default: 12) - category_id (optional): Filter by category - window_days (optional): Ranking window (trending default 14, top-selling default 90) - language (optional): Localization language code Response: - Same shape as catalog browse: { success, data: { market, products, pagination } }
1curl --request GET "$ONDI_BASE_URL/public/storefront/{{slug}}/catalog/{{list_type}}?page=1&limit=12&category_id=&window_days=&language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
slugRequiredURL-friendly identifier of the storefront (e.g., 'my-store-slug')
list_typeRequiredtrending
Feed type: trending | new-arrivals | top-selling | recommended
Query parameters
pageOptional1
Page number for pagination (Optional, default: 1)
limitOptional12
Number of products per page (Optional, default: 12)
category_idOptionalFilter by category ID (Optional)
window_daysOptionalWindow in days for ranking (Optional; used by trending/top-selling). Defaults: trending=14, top-selling=90
languageOptionalen
Language code for response localization (Optional, default: en)
Responses
1{2 "success": true,3 "data": {4 "market": {5 "id": "market-uuid",6 "slug": "my-store-slug",7 "store_name": {8 "en": "My Store"9 },10 "status": "approved",11 "banners": []12 },13 "products": [14 {15 "id": "product-uuid",16 "name": {17 "en": "Product Name"18 },19 "description": {20 "en": "Product description"21 },22 "stock_quantity": 10,23 "rating": 4.6,24 "total_reviews": 2325 }26 ],27 "pagination": {28 "page": 1,29 "limit": 12,30 "total": 12,31 "totalPages": 132 }33 }34}1{2 "success": false,3 "message": "Store not found"4}Verify Domain
/public/verify-domain/:subdomain?language=enVerifies if a domain/subdomain is associated with a tenant in the system. Path Parameters: - subdomain: The subdomain to verify (e.g., 'company' for company.example.com) Query Parameters: - language (optional): Language code for localized response messages (e.g., 'en')
1curl --request GET "$ONDI_BASE_URL/public/verify-domain/:subdomain?language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
subdomainRequiredSubdomain to verify (e.g., 'company' for company.example.com)
Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
Responses
1{2 "success": true,3 "tenantId": "tenant-uuid",4 "message": "Domain verified successfully"5}1{2 "success": false,3 "message": "Domain not found"4}1{2 "success": false,3 "message": "Internal server error"4}Get System Brand Settings
/public/system-brand-settings?language=enRetrieves the active system brand settings including brand name, assets, colors, and configurations. Query Parameters: - language (optional): Language code for localized response messages (e.g., 'en')
1curl --request GET "$ONDI_BASE_URL/public/system-brand-settings?language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
Responses
1{2 "success": true,3 "message": "System brand settings retrieved successfully",4 "brandSettings": {5 "brand_name": "System Brand Name",6 "assets": {7 "logo": "https://example.com/logo.png",8 "favicon": "https://example.com/favicon.ico"9 },10 "colors": {11 "primary": "#3f51b5",12 "secondary": "#f50057",13 "accent": "#ff4081"14 },15 "configurations": {16 "theme": "light",17 "defaultLanguage": "en"18 }19 }20}1{2 "success": false,3 "message": "Internal server error"4}Get Tenant Brand Settings
/public/tenants/:tenantId/brand-settings?language=enRetrieves tenant brand settings. Falls back to system defaults if no tenant branding exists. Checks if the tenant exists and is active before returning brand settings. Path Parameters: - tenantId: ID of the tenant to retrieve brand settings for Query Parameters: - language (optional): Language code for localized response messages (e.g., 'en')
1curl --request GET "$ONDI_BASE_URL/public/tenants/:tenantId/brand-settings?language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
tenantIdRequiredID of the tenant to retrieve brand settings for
Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
Responses
1{2 "success": true,3 "message": "Tenant brand settings retrieved successfully",4 "brandSettings": {5 "brand_name": "Tenant Brand Name",6 "assets": {7 "logo": "https://example.com/tenant-logo.png",8 "favicon": "https://example.com/tenant-favicon.ico"9 },10 "colors": {11 "primary": "#3f51b5",12 "secondary": "#f50057",13 "accent": "#ff4081"14 },15 "configurations": {16 "theme": "dark",17 "defaultLanguage": "en"18 },19 "metadata": {20 "lastUpdated": "2023-01-01T00:00:00Z"21 }22 }23}1{2 "success": true,3 "message": "System brand settings retrieved successfully",4 "brandSettings": {5 "brand_name": "System Brand Name",6 "assets": {7 "logo": "https://example.com/logo.png",8 "favicon": "https://example.com/favicon.ico"9 },10 "colors": {11 "primary": "#3f51b5",12 "secondary": "#f50057",13 "accent": "#ff4081"14 },15 "configurations": {16 "theme": "light",17 "defaultLanguage": "en"18 }19 }20}1{2 "success": false,3 "message": "Tenant not found"4}1{2 "success": false,3 "message": "Tenant not active"4}1{2 "success": false,3 "message": "Internal server error"4}Get Delivery Tracking
/public/deliveries/:deliveryId/tracking?tracking_token=&language=enPublic endpoint for real-time delivery tracking. Returns current status, location, and estimated delivery information. Path Parameters: - deliveryId: UUID of the delivery to track Query Parameters: - tracking_token (optional): Security token for accessing protected delivery tracking - language (optional): Language code for localized response messages (e.g., 'en')
1curl --request GET "$ONDI_BASE_URL/public/deliveries/:deliveryId/tracking?tracking_token=&language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
deliveryIdRequiredUUID of the delivery to track
Query parameters
tracking_tokenOptionalOptional security token for accessing protected delivery tracking
languageOptionalen
Language code for response localization (Optional, default: en)
Responses
1{2 "success": true,3 "message": "Delivery tracking retrieved successfully",4 "data": {5 "status": "in_transit",6 "currentLocation": {7 "type": "Point",8 "coordinates": [9 -73.935242,10 40.7306111 ]12 },13 "lastLocationAt": "2024-01-01T12:00:00Z",14 "eta": "2024-01-01T15:30:00Z",15 "estimatedTravelTime": 90,16 "estimatedDistanceKm": 25.5,17 "statusTimeline": [18 {19 "status": "picked_up",20 "timestamp": "2024-01-01T12:00:00Z",21 "location": {22 "latitude": 40.73061,23 "longitude": -73.93524224 },25 "notes": "Picked up from warehouse"26 }27 ],28 "type": "Delivery",29 "routePath": {30 "distance": 25.5,31 "duration": 90,32 "polyline": "encoded_polyline_string"33 },34 "destination": {35 "address": "123 Delivery St, New York, NY 10001",36 "latitude": 40.75061,37 "longitude": -73.94524238 }39 }40}1{2 "success": false,3 "message": "Delivery ID is required"4}1{2 "success": false,3 "message": "Invalid tracking token"4}1{2 "success": false,3 "message": "Delivery not found"4}1{2 "success": false,3 "message": "Internal server error"4}1{2 "success": true,3 "message": "Delivery tracking retrieved successfully",4 "data": {5 "status": "in_transit",6 "currentLocation": {7 "type": "Point",8 "coordinates": [longitude, latitude]9 },10 "lastLocationAt": "2024-01-01T12:00:00Z",11 "eta": "2024-01-01T15:30:00Z",12 "estimatedTravelTime": 90,13 "estimatedDistanceKm": 25.5,14 "statusTimeline": [15 {16 "status": "picked_up",17 "timestamp": "2024-01-01T12:00:00Z",18 "location": {19 "latitude": 0,20 "longitude": 021 },22 "notes": "Picked up from warehouse"23 }24 ],25 "type": "Delivery",26 "routePath": {27 "distance": 25.5,28 "duration": 90,29 "polyline": "encoded_polyline_string"30 },31 "destination": {32 "address": "123 Delivery St",33 "latitude": 0,34 "longitude": 035 }36 }37}Get Color Palettes
/public/color-palettes?language=enRetrieves all available color palettes from the system, ordered by creation date (newest first). Query Parameters: - language (optional): Language code for localized response messages (e.g., 'en')
1curl --request GET "$ONDI_BASE_URL/public/color-palettes?language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
Responses
1{2 "success": true,3 "message": "Color palettes retrieved successfully",4 "colorPalettes": [5 {6 "id": "uuid-123",7 "created_at": "2024-01-01T00:00:00Z",8 "name": "Default Theme",9 "palette": {10 "primary": {11 "dark": "#007867",12 "main": "#00A76F",13 "light": "#5BE49B",14 "darker": "#004B50",15 "lighter": "#C8FAD6",16 "contrastText": "#FFFFFF"17 },18 "secondary": {19 "dark": "#1939B7",20 "main": "#3366FF",21 "light": "#84A9FF",22 "darker": "#091A7A",23 "lighter": "#D6E4FF",24 "contrastText": "#FFFFFF"25 }26 }27 },28 {29 "id": "uuid-456",30 "created_at": "2024-01-02T00:00:00Z",31 "name": "Ocean Theme",32 "palette": {33 "primary": {34 "dark": "#004080",35 "main": "#0066CC",36 "light": "#4D94FF",37 "darker": "#002654",38 "lighter": "#B3D6FF",39 "contrastText": "#FFFFFF"40 },41 "secondary": {42 "dark": "#2E7A7A",43 "main": "#4DB8B8",44 "light": "#7DD6D6",45 "darker": "#1A4949",46 "lighter": "#C7EEEE",47 "contrastText": "#FFFFFF"48 }49 }50 }51 ]52}1{2 "success": false,3 "message": "Internal server error"4}1{2 "success": true,3 "message": "Color palettes retrieved successfully",4 "colorPalettes": [5 {6 "id": "uuid-123",7 "created_at": "2024-01-01T00:00:00Z",8 "name": "Default Theme",9 "palette": {10 "primary": {11 "dark": "#007867",12 "main": "#00A76F",13 "light": "#5BE49B",14 "darker": "#004B50",15 "lighter": "#C8FAD6",16 "contrastText": "#FFFFFF"17 },18 "secondary": {19 "dark": "#1939B7",20 "main": "#3366FF",21 "light": "#84A9FF",22 "darker": "#091A7A",23 "lighter": "#D6E4FF",24 "contrastText": "#FFFFFF"25 }26 }27 }28 ]29}Browse Storefront Products
/public/storefront/{{slug}}/catalog?page=1&limit=12&category_id=&brand_id=&search=&featured_type=&language=enBrowse products in a public storefront. Returns active products with only primary variants for listing view. Supports recursive category filtering, advanced search, and featured product types. Path Parameters: - slug: URL-friendly identifier of the storefront Query Parameters: - page (optional): Page number for pagination (default: 1) - limit (optional): Products per page (default: 12) - category_id (optional): Filter by category ID and all its child categories recursively - brand_id (optional): Filter by brand ID - search (optional): Search products by name, description, or variant details - featured_type (optional): Featured product type. Use most_loved to get products ordered by Most Loved score (calculated from wishlist additions and qualified reviews 4-5 stars). When not provided, uses default ordering by created_at DESC. - language (optional): Language code for localized response Featured Types: - most_loved: Products ordered by Most Loved score (wishlist_count × favorite_weight + qualified_review_count × review_weight). Only includes products that have stats calculated. - Future types: trending, new_arrivals, top_selling (extensible design) Search Behavior: - When no search is provided: Returns only primary variants - When search matches product name/description: Returns primary variant only - When search matches variant name/description: Returns matching variant (may include multiple instances of same product with different variants) Category Filtering: - When category_id is provided: Returns products from the specified category and all its child categories (recursive) - Uses database RPC for optimal performance Example Requests: - Get most loved products: GET /public/storefront/my-store/catalog?featured_type=most_loved - Get most loved in category: GET /public/storefront/my-store/catalog?featured_type=most_loved&category_id=category-uuid - Regular browse: GET /public/storefront/my-store/catalog (default ordering)
1curl --request GET "$ONDI_BASE_URL/public/storefront/{{slug}}/catalog?page=1&limit=12&category_id=&brand_id=&search=&featured_type=&language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
slugRequiredURL-friendly identifier of the storefront (e.g., 'my-store-slug')
Query parameters
pageOptional1
Page number for pagination (Optional, default: 1)
limitOptional12
Number of products per page (Optional, default: 12)
category_idOptionalFilter by category ID and all its child categories (Optional)
brand_idOptionalFilter by brand ID (Optional)
searchOptionalSearch products by name, description, or variant details (Optional)
featured_typeOptionalFeatured product type filter (Optional). Use 'most_loved' to get products ordered by Most Loved score (wishlist + qualified reviews). When not provided, uses default ordering by created_at DESC.
languageOptionalen
Language code for response localization (Optional, default: en)
Responses
1{2 "success": true,3 "data": {4 "market": {5 "id": "market-uuid",6 "slug": "my-store-slug",7 "store_name": {"en": "My Store"},8 "status": "approved",9 "banners": []10 },11 "products": [12 {13 "id": "product-uuid",14 "name": {"en": "Product Name"},15 "description": {"en": "Product description"},16 "stock_quantity": 10,17 "category": {18 "id": "category-uuid",19 "name": {"en": "Electronics"}20 },21 "variant": {22 "id": "variant-uuid",23 "name": {"en": "Standard Edition"},24 "description": {"en": "Standard variant description"},25 "price": 29.99,26 "sku": "PROD-001",27 "images": ["image1.jpg", "image2.jpg"],28 "stock_quantity": 1029 },30 "rating": 4.6,31 "total_reviews": 2332 }33 }34 ],35 "pagination": {36 "page": 1,37 "limit": 12,38 "total": 50,39 "totalPages": 540 }41 }42 }1{2 "success": false,3 "message": "Store not found"4}1{2 "success": true,3 "data": {4 "market": {5 "id": "market-uuid",6 "slug": "my-store-slug",7 "store_name": {"en": "My Store"},8 "status": "approved",9 "banners": []10 },11 "products": [12 {13 "id": "product-uuid",14 "name": {"en": "Product Name"},15 "description": {"en": "Product description"},16 "stock_quantity": 10,17 "category": {18 "id": "category-uuid",19 "name": {"en": "Category Name"}20 },21 "variant": {22 "id": "variant-uuid",23 "name": {"en": "Variant Name"},24 "description": {"en": "Variant description"},25 "price": 29.99,26 "sku": "PROD-001",27 "images": ["image1.jpg"],28 "stock_quantity": 1029 },30 "rating": 4.6,31 "total_reviews": 2332 }33 }34 ],35 "pagination": {36 "page": 1,37 "limit": 12,38 "total": 50,39 "totalPages": 540 }41 }42 }Get Storefront Product
/public/storefront/{{slug}}/products/{{product_id}}?language=enGet detailed information about a specific product including all variants. Path Parameters: - slug: URL-friendly identifier of the storefront - product_id: UUID of the product Query Parameters: - language (optional): Language code for localized response
1curl --request GET "$ONDI_BASE_URL/public/storefront/{{slug}}/products/{{product_id}}?language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
slugRequiredURL-friendly identifier of the storefront
product_idRequiredUUID of the product to retrieve
Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
Responses
1{2 "success": true,3 "data": {4 "market": {5 "id": "market-uuid",6 "slug": "my-store-slug",7 "store_name": {8 "en": "My Store"9 }10 },11 "product": {12 "id": "product-uuid",13 "name": {14 "en": "Product Name"15 },16 "description": {17 "en": "Product description"18 },19 "rating": 4.6,20 "total_reviews": 23,21 "variants": [22 {23 "id": "variant-uuid",24 "price": 29.99,25 "stock_quantity": 10,26 "is_primary": true,27 "variant_options": {28 "size": "M",29 "color": "blue"30 }31 }32 ]33 }34 }35}Get Similar Storefront Products
/public/storefront/{{slug}}/products/{{product_id}}/similar?limit=10&language=enReturns random similar products from the same categories as the given product. - Input: product_id - Logic: find products sharing at least one category with the reference product, exclude the reference product, only active products with at least one active in-stock variant. - Output: same product listing shape (one best variant per product).
1curl --request GET "$ONDI_BASE_URL/public/storefront/{{slug}}/products/{{product_id}}/similar?limit=10&language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
slugRequiredURL-friendly identifier of the storefront (e.g., 'my-store-slug')
product_idRequiredReference product UUID
Query parameters
limitOptional10
Number of similar products to return (Optional, default: 10, max: 50)
languageOptionalen
Language code for response localization (Optional, default: en)
Responses
1{2 "success": true,3 "data": {4 "market": {5 "id": "market-uuid",6 "slug": "my-store-slug",7 "store_name": {8 "en": "My Store"9 },10 "status": "approved"11 },12 "products": [13 {14 "id": "product-uuid-2",15 "name": {16 "en": "Similar Product"17 },18 "description": {19 "en": "Similar product description"20 },21 "stock_quantity": 5,22 "variant": {23 "id": "variant-uuid-2",24 "name": {25 "en": "Standard"26 },27 "description": {28 "en": "Variant description"29 },30 "price": 19.99,31 "sku": "PROD-002",32 "images": [33 "image.jpg"34 ],35 "stock_quantity": 536 },37 "rating": 4.2,38 "total_reviews": 1139 }40 ],41 "pagination": {42 "page": 1,43 "limit": 10,44 "total": 1,45 "totalPages": 146 }47 }48}Get Storefront Categories
/public/storefront/{{slug}}/categories?language=enGet all categories available in the storefront. Path Parameters: - slug: URL-friendly identifier of the storefront Query Parameters: - language (optional): Language code for localized response
1curl --request GET "$ONDI_BASE_URL/public/storefront/{{slug}}/categories?language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
slugRequiredURL-friendly identifier of the storefront
Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
Responses
1{2 "success": true,3 "data": {4 "market": {5 "id": "market-uuid",6 "slug": "my-store-slug",7 "store_name": {8 "en": "My Store"9 }10 },11 "categories": [12 {13 "id": "category-uuid",14 "name": {15 "en": "Electronics"16 },17 "description": {18 "en": "Electronic devices and accessories"19 },20 "parent_id": null,21 "sort_order": 122 }23 ]24 }25}Get Storefront Information
/public/storefront/{{slug}}/info?language=enGet basic information about the storefront including branding and theme settings. Path Parameters: - slug: URL-friendly identifier of the storefront Query Parameters: - language (optional): Language code for localized response
1curl --request GET "$ONDI_BASE_URL/public/storefront/{{slug}}/info?language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
slugRequiredURL-friendly identifier of the storefront
Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
Responses
1{2 "success": true,3 "data": {4 "slug": "my-store-slug",5 "is_valid": true,6 "exists": true,7 "market": {8 "id": "market-uuid",9 "slug": "my-store-slug",10 "store_name": {11 "en": "My Store"12 },13 "status": "approved",14 "currency": {15 "currency_code": "IQD",16 "currency_mode": "code",17 "currency_name": "Iraqi Dinar",18 "currency_symbol": "د.ع.",19 "system_currency": {20 "currency_code": "USD",21 "currency_mode": "symbol",22 "currency_name": "US Dollar",23 "currency_symbol": "$"24 },25 "exchange_rate_to_system": 226 },27 "logo_url": "https://example.com/logo.png",28 "theme_settings": {29 "primary_color": "#007AFF",30 "secondary_color": "#FFFFFF",31 "accent_color": "#FF9500",32 "theme_style": "modern"33 }34 }35 }36}1{2 "success": true,3 "data": {4 "id": "market-uuid",5 "slug": "my-store-slug",6 "store_name": {7 "en": "My Store"8 },9 "tagline": {10 "en": "Quality products for everyone"11 },12 "logo_url": "https://example.com/logo.png",13 "theme_settings": {14 "primary_color": "#007AFF",15 "secondary_color": "#FFFFFF",16 "accent_color": "#FF9500",17 "theme_style": "modern"18 },19 "banners": [],20 "status": "approved",21 "created_at": "2024-01-01T00:00:00Z"22 }23}Resolve Storefront By Domain
/public/storefront/resolve-domain?domain=shop.example.com&language=enResolves an active custom domain to the storefront validation payload, including the owning tenant_id, effective tenant currency, explicit default_currency, the effective tenant default_country, and the effective tenant allowed_countries list derived from phone login settings.
1curl --request GET "$ONDI_BASE_URL/public/storefront/resolve-domain?domain=shop.example.com&language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Query parameters
domainOptionalshop.example.com
Custom domain to resolve
languageOptionalen
Language code for localized response localization (Optional, default: en)
Responses
1{2 "success": true,3 "data": {4 "slug": "my-store-slug",5 "is_valid": true,6 "exists": true,7 "market": {8 "id": "market-uuid",9 "tenant_id": "tenant-uuid",10 "slug": "my-store-slug",11 "store_name": {12 "en": "My Store"13 },14 "status": "approved",15 "currency": {16 "currency_code": "IQD",17 "currency_mode": "code",18 "currency_name": "Iraqi Dinar",19 "currency_symbol": "د.ع.",20 "system_currency": {21 "currency_code": "USD",22 "currency_mode": "symbol",23 "currency_name": "US Dollar",24 "currency_symbol": "$"25 },26 "exchange_rate_to_system": 227 },28 "default_currency": {29 "currency_code": "IQD",30 "currency_mode": "code",31 "currency_name": "Iraqi Dinar",32 "currency_symbol": "د.ع.",33 "system_currency": {34 "currency_code": "USD",35 "currency_mode": "symbol",36 "currency_name": "US Dollar",37 "currency_symbol": "$"38 },39 "exchange_rate_to_system": 240 },41 "default_country": {42 "code": "CA",43 "name": "Canada",44 "dial_code": "+1"45 },46 "allowed_countries": [47 {48 "code": "CA",49 "name": "Canada",50 "dial_code": "+1"51 },52 {53 "code": "IN",54 "name": "India",55 "dial_code": "+91"56 }57 ],58 "logo_url": "https://example.com/logo.png",59 "theme_settings": {60 "primary_color": "#007AFF",61 "secondary_color": "#FFFFFF",62 "accent_color": "#FF9500",63 "theme_style": "modern"64 }65 }66 }67}1{2 "success": false,3 "message": "Store not found"4}Validate Storefront Slug
/public/storefront/{{slug}}/validate?language=enValidates if a slug exists and points to a published and active storefront. On valid storefronts, the response includes the owning tenant_id, effective tenant currency, explicit default_currency, the effective tenant default_country, and the effective tenant allowed_countries list derived from phone login settings. Path Parameters: - slug: URL-friendly identifier to validate Query Parameters: - language (optional): Language code for localized response Use Cases: - Frontend route validation - Subdomain verification - URL availability checking - SEO-friendly URL validation - Custom domain setup
1curl --request GET "$ONDI_BASE_URL/public/storefront/{{slug}}/validate?language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
slugRequiredURL-friendly identifier to validate (e.g., 'my-store-slug')
Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
Responses
1{2 "success": true,3 "data": {4 "slug": "my-store-slug",5 "is_valid": true,6 "exists": true,7 "market": {8 "id": "market-uuid",9 "tenant_id": "tenant-uuid",10 "slug": "my-store-slug",11 "store_name": {12 "en": "My Store"13 },14 "status": "approved",15 "currency": {16 "currency_code": "IQD",17 "currency_mode": "code",18 "currency_name": "Iraqi Dinar",19 "currency_symbol": "د.ع.",20 "system_currency": {21 "currency_code": "USD",22 "currency_mode": "symbol",23 "currency_name": "US Dollar",24 "currency_symbol": "$"25 },26 "exchange_rate_to_system": 227 },28 "default_currency": {29 "currency_code": "IQD",30 "currency_mode": "code",31 "currency_name": "Iraqi Dinar",32 "currency_symbol": "د.ع.",33 "system_currency": {34 "currency_code": "USD",35 "currency_mode": "symbol",36 "currency_name": "US Dollar",37 "currency_symbol": "$"38 },39 "exchange_rate_to_system": 240 },41 "default_country": {42 "code": "CA",43 "name": "Canada",44 "dial_code": "+1"45 },46 "allowed_countries": [47 {48 "code": "CA",49 "name": "Canada",50 "dial_code": "+1"51 },52 {53 "code": "IN",54 "name": "India",55 "dial_code": "+91"56 }57 ]58 }59 }60}1{2 "success": true,3 "data": {4 "slug": "non-existent-slug",5 "is_valid": false,6 "exists": false,7 "market": null8 }9}1{2 "success": true,3 "data": {4 "slug": "my-store-slug",5 "is_valid": true,6 "exists": true,7 "market": {8 "id": "market-uuid",9 "tenant_id": "tenant-uuid",10 "slug": "my-store-slug",11 "store_name": {12 "en": "My Store"13 },14 "status": "approved",15 "default_currency": {16 "currency_code": "IQD"17 },18 "default_country": {19 "code": "CA",20 "name": "Canada",21 "dial_code": "+1"22 },23 "allowed_countries": [24 {25 "code": "CA",26 "name": "Canada",27 "dial_code": "+1"28 }29 ]30 }31 }32}Get Public Advertisements
/public/storefront/{{slug}}/ads/{{placement}}?limit=5Retrieves active advertisements for a specific placement on a public storefront. No authentication required. Authentication: - None required - Public endpoint Path Parameters: - slug: URL-friendly identifier of the store/market - placement: Advertisement placement (home, category, product, checkout, global) Query Parameters: - limit (optional): Maximum ads to return (default: 5) Response Data: - Only active advertisements within date range - Sorted by priority (highest first) - Multi-language content - Ready for frontend display Features: - Public access for frontend integration - Automatic filtering of active/scheduled ads - Priority-based ordering - Placement-specific results - Performance optimized Use Cases: - Website banner integration - Mobile app advertisement display - Category page promotions - Product page cross-sells - Checkout upsells
1curl --request GET "$ONDI_BASE_URL/public/storefront/{{slug}}/ads/{{placement}}?limit=5" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
slugRequiredVariable used inside the request path.
placementRequiredVariable used inside the request path.
Query parameters
limitOptional5
Maximum number of advertisements to return (default: 5)
Responses
1{2 "success": true,3 "advertisements": [4 {5 "id": "ad-uuid",6 "type": "banner",7 "placement": "home",8 "title": {9 "en": "Special Offer",10 "ar": "عرض خاص",11 "ku": "پێشکەشکراوی تایبەت"12 },13 "content": {14 "en": "Limited time offer - don't miss out!",15 "ar": "عرض لفترة محدودة - لا تفوت الفرصة!",16 "ku": "پێشکەشکراوی کاتی سنووردار - لە دەستت مەدە!"17 },18 "image_url": "https://example.com/special-offer.jpg",19 "link_url": "/special-offers",20 "priority": 10,21 "is_currently_active": true22 }23 ],24 "placement": "home",25 "slug": "my-store-slug",26 "store_name": {27 "en": "My Store",28 "ar": "متجري",29 "ku": "دوکانەکەم"30 }31}1{2 "success": false,3 "message": "Store not found"4}Record Advertisement View
/public/ads/{{advertisement_id}}/viewRecords when an advertisement is viewed by a user. Used for analytics tracking. Authentication: - None required - Public endpoint Path Parameters: - advertisement_id: UUID of the viewed advertisement Request Body: - viewer_info: Object containing viewer context - user_id (optional): Authenticated user ID - session_id (optional): Session identifier - user_agent (optional): Browser user agent - ip (optional): Client IP address Features: - Anonymous tracking support - User session correlation - Browser fingerprinting - Geographic tracking via IP - Graceful error handling Use Cases: - Impression tracking - User engagement analysis - Geographic performance data - A/B testing metrics - Campaign reach measurement Implementation Notes: - Call when advertisement becomes visible - Handle failures gracefully (don't break user experience) - Respect privacy regulations - Consider rate limiting for abuse prevention
1curl --request POST "$ONDI_BASE_URL/public/ads/{{advertisement_id}}/view" \2 --header "Content-Type: application/json" \3 --header "Content-Type: application/json" \4 --data '{5 "viewer_info": {6 "user_id": "user-uuid",7 "session_id": "session-uuid",8 "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",9 "ip": "192.168.1.1"10 }11}'1{2 "viewer_info": {3 "user_id": "user-uuid",4 "session_id": "session-uuid",5 "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",6 "ip": "192.168.1.1"7 }8}Path parameters
advertisement_idRequiredVariable used inside the request path.
Request body fields
viewer_infoExampleExample field from the request body.
viewer_info.user_idExampleExample field from the request body.
viewer_info.session_idExampleExample field from the request body.
viewer_info.user_agentExampleExample field from the request body.
viewer_info.ipExampleExample field from the request body.
Headers
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "message": "View recorded successfully"4}1{2 "success": true,3 "message": "View processed"4}Record Advertisement Click
/public/ads/{{advertisement_id}}/clickRecords when an advertisement is clicked by a user. Used for conversion tracking and analytics. Authentication: - None required - Public endpoint Path Parameters: - advertisement_id: UUID of the clicked advertisement Request Body: - clicker_info: Object containing click context - user_id (optional): Authenticated user ID - session_id (optional): Session identifier - user_agent (optional): Browser user agent - ip (optional): Client IP address Features: - Click-through tracking - User journey correlation - Conversion attribution - Geographic click data - Fraud detection support Use Cases: - CTR calculation - Conversion tracking - User engagement measurement - Campaign effectiveness - ROI analysis - Attribution modeling Implementation Notes: - Call immediately on advertisement click - Fire before navigation to target URL - Handle network failures gracefully - Consider click fraud prevention - Respect user privacy settings
1curl --request POST "$ONDI_BASE_URL/public/ads/{{advertisement_id}}/click" \2 --header "Content-Type: application/json" \3 --header "Content-Type: application/json" \4 --data '{5 "clicker_info": {6 "user_id": "user-uuid",7 "session_id": "session-uuid",8 "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",9 "ip": "192.168.1.1"10 }11}'1{2 "clicker_info": {3 "user_id": "user-uuid",4 "session_id": "session-uuid",5 "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",6 "ip": "192.168.1.1"7 }8}Path parameters
advertisement_idRequiredVariable used inside the request path.
Request body fields
clicker_infoExampleExample field from the request body.
clicker_info.user_idExampleExample field from the request body.
clicker_info.session_idExampleExample field from the request body.
clicker_info.user_agentExampleExample field from the request body.
clicker_info.ipExampleExample field from the request body.
Headers
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "message": "Click recorded successfully"4}1{2 "success": true,3 "message": "Click processed"4}List Storefront Markets (with primary variant)
/public/storefront/markets?page=1&limit=10&search=&language=en&country=Returns a paginated list of published markets, each with at most one primary active variant. Useful for discovery/listing pages. Query Parameters: - page (optional): Page number (default 1) - limit (optional): Page size (default 10) - search (optional): Filter by store name or slug - language (optional): Localization language code - country (optional): ISO country code; filters by tenant domestic country (system_settings / tenant_settings domestic_country) Response: - markets: Array of markets, each with country { code, name, dial_code } and optional primary_variant - pagination: page, limit, total, totalPages
1curl --request GET "$ONDI_BASE_URL/public/storefront/markets?page=1&limit=10&search=&language=en&country=" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Query parameters
pageOptional1
Page number (default: 1)
limitOptional10
Items per page (default: 10)
searchOptionalSearch by store name or slug (optional)
languageOptionalen
Localization language (optional, default: en)
countryOptionalOptional. ISO 3166-1 alpha-2/alpha-3. Filters by tenant domestic country (tenant_settings override, else system_settings default).
Responses
1{2 "success": true,3 "data": {4 "markets": [5 {6 "id": "market-uuid-1",7 "code": 1000,8 "slug": "store-one",9 "store_name": {10 "en": "Store One"11 },12 "status": "approved",13 "publish_status": "published",14 "logo_url": "https://example.com/logo.png",15 "theme_settings": {16 "primary_color": "#007AFF"17 },18 "banners": [],19 "country": {20 "code": "CA",21 "name": "Canada",22 "dial_code": "+1"23 },24 "primary_variant": {25 "id": "variant-uuid-1",26 "name": {27 "en": "Default Variant"28 },29 "description": null,30 "price": 29.99,31 "images": [],32 "product_id": "product-uuid-1"33 }34 },35 {36 "id": "market-uuid-2",37 "code": 1001,38 "slug": "store-two",39 "store_name": {40 "en": "Store Two"41 },42 "status": "approved",43 "publish_status": "published",44 "logo_url": null,45 "theme_settings": {},46 "banners": [],47 "country": null,48 "primary_variant": null49 }50 ],51 "pagination": {52 "page": 1,53 "limit": 10,54 "total": 2,55 "totalPages": 156 }57 }58}Get OneSignal Public Config
/public/push/onesignalReturns the public OneSignal App ID for frontend use.
1curl --request GET "$ONDI_BASE_URL/public/push/onesignal" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Responses
1{2 "success": true,3 "appId": "05a0dd64-de54-4a08-a65e-dd8f2b52b686"4}Create Demo Request
/public/demo-requestSubmits a new demo request from a prospective tenant. Request Body: - name (required): Contact person's name (2-100 chars) - email (required): Valid email address - phone_number (required): Contact number (6-20 chars) - notes (optional): Additional details or requirements (max 2000 chars) - interested_modules (optional): Array of modules interested in (e.g., 'delivery', 'storefront', 'restaurant')
1curl --request POST "$ONDI_BASE_URL/public/demo-request" \2 --header "Content-Type: application/json" \3 --header "Content-Type: application/json" \4 --data '{5 "name": "John Doe",6 "email": "john.doe@company.com",7 "phone_number": "+15551234567",8 "notes": "We are a logistics company looking to modernize our fleet management.",9 "interested_modules": [10 "delivery",11 "storefront"12 ]13}'1{2 "name": "John Doe",3 "email": "john.doe@company.com",4 "phone_number": "+15551234567",5 "notes": "We are a logistics company looking to modernize our fleet management.",6 "interested_modules": [7 "delivery",8 "storefront"9 ]10}Request body fields
nameExampleExample field from the request body.
emailExampleExample field from the request body.
phone_numberExampleExample field from the request body.
notesExampleExample field from the request body.
interested_modulesExampleExample field from the request body.
Headers
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "message": "demo_request_submitted_successfully",4 "data": {5 "id": "a1b2c3d4-e5f6-7890-1234-56789abcdef0",6 "status": "Requested"7 }8}1{2 "success": false,3 "message": "validation_failed",4 "errors": [5 "name:min_length",6 "email:invalid_email",7 "phone_number:min_length"8 ]9}1{2 "success": true,3 "message": "demo_request_submitted_successfully",4 "data": {5 "id": "request-uuid",6 "status": "Requested"7 }8}1{2 "success": false,3 "message": "validation_failed",4 "errors": [5 "email:invalid_email"6 ]7}List Public System Modules
/public/system-modules?language=enRetrieves a list of active public system modules. Useful for populating dropdowns in forms like 'Request Demo'. Query Parameters: - language (optional): Language code for localized response messages (e.g., 'en')
1curl --request GET "$ONDI_BASE_URL/public/system-modules?language=en" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
Responses
1{2 "success": true,3 "message": "modules_retrieved_successfully",4 "modules": [5 {6 "code": "delivery",7 "name": "Delivery Management",8 "description": "Comprehensive delivery tracking and fleet management"9 },10 {11 "code": "storefront",12 "name": "E-commerce Storefront",13 "description": "Online store builder and management"14 }15 ]16}