Skip to main content

Storefront Administration

This section contains 3 subgroups.

List All Markets

System Configuration / Storefront Administration
GET/system/storefront/markets?page=1&limit=20&status=active&language=en&search=

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

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/system/storefront/markets?page=1&limit=20&status=active&language=en&search=" \2  --header "Authorization: Bearer {{access_token}}"

Query parameters

pageOptional
query string

1

Page number for pagination

limitOptional
query string

20

Number of markets per page

statusOptional
query string

active

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

languageOptional
query string

en

Preferred language for response messages

searchOptional
query string

Search by market name

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

Success Response200
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?language=en

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

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/system/storefront/analytics?language=en" \2  --header "Authorization: Bearer {{access_token}}"

Query parameters

languageOptional
query string

en

Preferred language for response messages

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

Success Response200
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?language=en

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.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/system/storefront/markets/:marketId/status?language=en" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "status": "suspended",7  "reason": "Violation of terms of service."8}'
Request body
json
1{2  "status": "suspended",3  "reason": "Violation of terms of service."4}

Path parameters

marketIdRequired
path string

market-uuid-1

Query parameters

languageOptional
query string

en

Preferred language for response messages

Request body fields

statusExample
string

Example field from the request body.

reasonExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response200
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}
Error - Market Not Found404
Response body
json
1{2  "success": false,3  "message": "Market not found"4}
Error - Invalid Transition409
Response body
json
1{2  "success": false,3  "message": "Market status transition is not allowed",4  "data": null5}