Storefront Administration
This section contains 3 subgroups.
APIs for system administrators to manage all storefronts and global settings across the platform. These endpoints require system admin privileges.
List All Markets
/system/storefront/marketsRetrieves a paginated list of all markets across all tenants, with optional filtering by status. Requires system admin access.
Query parameters
| Parameter | Type | Description |
|---|---|---|
page | string | Page number for pagination Example: |
limit | string | Number of markets per page Example: |
status | string | Filter by market status ( Example: |
language | string | Preferred language for response messages Example: |
search | string | Search by market name |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/system/storefront/markets?page=1&limit=20&status=active&language=en" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
1{2 "success": true,3 "data": {4 "markets": [5 {6 "id": "market-uuid-1",7 "tenant_id": "tenant-uuid-1",8 "store_name": "Global Mart",9 "status": "active",10 "created_at": "2023-10-01T10:00:00Z"11 },12 {13 "id": "market-uuid-2",14 "tenant_id": "tenant-uuid-2",15 "store_name": "Local Bazaar",16 "status": "active",17 "created_at": "2023-10-05T14:00:00Z"18 }19 ],20 "pagination": {21 "page": 1,22 "limit": 20,23 "total": 2,24 "totalPages": 125 }26 },27 "message": "Markets retrieved successfully"28}Get Global Storefront Analytics
/system/storefront/analyticsRetrieves global analytics and insights across all storefronts on the platform. Requires system admin access.
Query parameters
| Parameter | Type | Description |
|---|---|---|
language | string | Preferred language for response messages Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/system/storefront/analytics?language=en" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
1{2 "success": true,3 "data": {4 "analytics": {5 "total_markets": 150,6 "active_markets": 135,7 "pending_markets": 10,8 "total_orders": 25430,9 "total_revenue": 1250670.5,10 "average_order_value": 49.18,11 "top_performing_market": {12 "id": "market-uuid-7",13 "store_name": "Super Store",14 "revenue": 8500015 }16 }17 }18}Update Market Status
/system/storefront/markets/:marketId/statusUpdates a market governance status. Allowed transitions: pending_approval -> approved, pending_approval -> rejected, approved -> suspended, suspended -> approved. Accepts either notes or legacy reason for admin comments. Requires system admin access.
Path parameters
| Parameter | Type | Description |
|---|---|---|
marketIdRequired | string | Example: |
Query parameters
| Parameter | Type | Description |
|---|---|---|
language | string | Preferred language for response messages Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
status | string | — |
reason | string | — |
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/system/storefront/markets/${MARKETID}/status?language=en" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "status": "suspended",6 "reason": "Violation of terms of service."7}'Response examples
1{2 "success": true,3 "message": "Market suspended successfully",4 "market": {5 "id": "market-uuid-1",6 "status": "suspended",7 "admin_notes": "Violation of terms of service."8 }9}