Skip to main content

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 Configuration / Storefront Administration
GET/system/storefront/markets

Retrieves a paginated list of all markets across all tenants, with optional filtering by status. Requires system admin access.

Query parameters

ParameterTypeDescription
pagestring

Page number for pagination

Example: 1

limitstring

Number of markets per page

Example: 20

statusstring

Filter by market status (e.g., 'active', 'pending', 'suspended')

Example: active

languagestring

Preferred language for response messages

Example: en

searchstring

Search by market name

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
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

200Success Response
Response body
json
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 Configuration / Storefront Administration
GET/system/storefront/analytics

Retrieves global analytics and insights across all storefronts on the platform. Requires system admin access.

Query parameters

ParameterTypeDescription
languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
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

200Success Response
Response body
json
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 Configuration / Storefront Administration
PUT/system/storefront/markets/:marketId/status

Updates 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

ParameterTypeDescription
marketIdRequiredstring

Example: market-uuid-1

Query parameters

ParameterTypeDescription
languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
statusstring—
reasonstring—
Staging
Request
curl
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

200Success Response
Response body
json
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}