Skip to main content

Store

5 API calls in this section.

Validate Store Slug​

Public APIs / Storefront / Store
GET/public/storefront/:storeSlug/validate

Check if a store slug exists and is publicly accessible.

Returns market info including currency, allowed countries, and theme settings when valid.

No auth required.

Response fields

  • is_valid: true when market exists, is published, and is active

  • exists: true when market exists regardless of publish/active state

  • market: full market context (null when not valid)

Path parameters

ParameterTypeDescription
storeSlugRequiredstring

Store slug to validate

Example: my-store

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/public/storefront/${STORESLUG}/validate"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "slug": "my-store",5    "is_valid": true,6    "exists": true,7    "market": {8      "id": "market-uuid",9      "tenant_id": "tenant-uuid",10      "slug": "my-store",11      "store_name": {12        "en": "My Store",13        "ar": "متجري"14      },15      "status": "active",16      "currency": {17        "code": "USD",18        "symbol": "$"19      },20      "default_currency": {21        "code": "USD",22        "symbol": "$"23      },24      "default_country": {25        "code": "US",26        "name": "United States",27        "dial_code": "+1"28      },29      "allowed_countries": [30        {31          "code": "US",32          "name": "United States",33          "dial_code": "+1"34        }35      ],36      "logo_url": "https://cdn.example.com/logo.png",37      "theme_settings": {}38    }39  }40}

Get Store Info​

Public APIs / Storefront / Store
GET/public/storefront/:storeSlug/info

Get detailed store/market information including branding, theme settings, and banners.

No auth required.

Path parameters

ParameterTypeDescription
storeSlugRequiredstring

Store slug

Example: my-store

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/public/storefront/${STORESLUG}/info"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "id": "market-uuid",5    "code": 1001,6    "slug": "my-store",7    "store_name": {8      "en": "My Store",9      "ar": "متجري",10      "ku": "فرۆشگاکەم"11    },12    "tagline": {13      "en": "Quality you can trust"14    },15    "logo_url": "https://cdn.example.com/logo.png",16    "theme_settings": {17      "primary_color": "#3B82F6"18    },19    "banners": [],20    "status": "active",21    "created_at": "2024-01-01T00:00:00Z"22  }23}

Resolve Custom Domain​

Public APIs / Storefront / Store
GET/public/storefront/resolve-domain

Resolve a custom domain to its corresponding storefront market.

Used by storefronts hosted on custom domains to determine which market to load.

No auth required.

Response is cached with Cache-Control: public, max-age=60.

Query parameters

ParameterTypeDescription
domainstring

Custom domain or hostname to resolve to a store

Example: shop.example.com

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/public/storefront/resolve-domain?domain=shop.example.com"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "slug": "my-store",5    "is_valid": true,6    "exists": true,7    "market": {8      "id": "market-uuid",9      "tenant_id": "tenant-uuid",10      "slug": "my-store",11      "store_name": {12        "en": "My Store"13      },14      "status": "active",15      "currency": {16        "code": "USD",17        "symbol": "$"18      },19      "logo_url": null,20      "theme_settings": {}21    }22  }23}

Resolve Customer Portal Custom Domain​

Public APIs / Storefront / Store
GET/public/delivery/customer-portal/resolve-domain

Resolve a custom domain to its corresponding tenant's customer portal.

Used by the customer portal hosted on a custom domain to determine which tenant + branding to load.

No auth required.

Response is cached with Cache-Control: public, max-age=300.

Query parameters

ParameterTypeDescription
domainstring

Custom domain or hostname to resolve to a tenant customer portal

Example: portal.tenant.com

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/public/delivery/customer-portal/resolve-domain?domain=portal.tenant.com"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "tenant_id": "tenant-uuid",5    "tenant_slug": "tenant-one",6    "custom_domain": "portal.tenant.com",7    "portal_settings": {8      "pickup_settings": {9        "mode": "address",10        "allow_change": true,11        "default_pickup_address_id": null12      },13      "delivery_service_settings": {14        "default_delivery_service_id": null15      },16      "cod_settings": {17        "enabled": true18      },19      "delivery_creation_fields": {},20      "package_settings": {},21      "visibility_settings": {},22      "support_ticket_settings": {23        "enabled": true,24        "allow_customer_close": true,25        "default_priority": "normal"26      },27      "wallet_settings": {}28    },29    "brand_settings": {30      "name": {31        "en": "Tenant One"32      },33      "page_title": "Tenant One Portal"34    },35    "assets": {36      "favicon_url": "https://cdn.example.com/favicon.ico",37      "logo_url": "https://cdn.example.com/logo.png"38    },39    "theme": {40      "colors": {41        "primary": "#3B82F6"42      }43    }44  }45}

List All Markets​

Public APIs / Storefront / Store
GET/public/storefront/markets

List all published active markets with their primary variant (first listed product image/price).

No auth required.

Query parameters

ParameterTypeDescription
pagestring

Page number (default: 1) page number

Example: 1

limitstring

Items per page (default: 10) results per page

Example: 10

searchOptionalstring

Search by store name or slug filter by store name (en) or slug

countryOptionalstring

Filter by ISO country code (e.g. US, IQ) ISO 2-3 letter country code filter

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/public/storefront/markets?page=1&limit=10"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "markets": [5      {6        "id": "market-uuid",7        "code": 1001,8        "slug": "my-store",9        "store_name": {10          "en": "My Store",11          "ar": "متجري"12        },13        "status": "active",14        "publish_status": "published",15        "logo_url": "https://cdn.example.com/logo.png",16        "theme_settings": {},17        "banners": [],18        "country": {19          "code": "IQ",20          "name": "Iraq",21          "dial_code": "+964"22        },23        "primary_variant": {24          "id": "variant-uuid",25          "slug": "sample-product-default",26          "name": {27            "en": "Sample Product"28          },29          "price": 25,30          "images": [31            "https://cdn.example.com/img.jpg"32          ],33          "product_id": "product-uuid",34          "product_slug": "sample-product",35          "has_variant": false36        }37      }38    ],39    "pagination": {40      "page": 1,41      "limit": 10,42      "total": 1,43      "totalPages": 144    }45  }46}