Skip to main content

Products

5 API calls in this section.

Browse Products (Catalog)​

Public APIs / Storefront / Products
GET/public/storefront/:storeSlug/catalog

Browse all active products in a storefront catalog.

No auth required.

Path parameters

ParameterTypeDescription
storeSlugRequiredstring

Example: my-store

Query parameters

ParameterTypeDescription
pagestring

Page number (default: 1) pagination

Example: 1

limitstring

Products per page (default: 12) pagination

Example: 12

searchOptionalstring

Search by product name or description search across name/description

category_idOptionalstring

Filter by category UUID filter by category

brand_idOptionalstring

Filter by brand UUID filter by brand

featured_typeOptionalstring

Featured products type: most_loved most_loved for popularity-sorted products

pagination.totalstring

total matching products for current filters (not the length of the current page)

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/public/storefront/${STORESLUG}/catalog?page=1&limit=12"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "market": {5      "id": "market-uuid",6      "slug": "my-store",7      "store_name": {8        "en": "My Store"9      },10      "status": "active",11      "banners": []12    },13    "products": [14      {15        "id": "product-uuid",16        "slug": "macbook-pro-laptop",17        "name": {18          "en": "MacBook Pro Laptop"19        },20        "description": {21          "en": "High-performance laptop"22        },23        "has_variant": true,24        "stock_quantity": 50,25        "rating": 4.8,26        "total_reviews": 120,27        "variant": {28          "id": "variant-uuid",29          "slug": "macbook-pro-space-gray-16gb",30          "name": {31            "en": "MacBook Pro Space Gray 16GB"32          },33          "description": {34            "en": ""35          },36          "price": 1999.99,37          "sku": "MBP-001",38          "images": [],39          "stock_quantity": 50,40          "attributes": {}41        }42      }43    ],44    "pagination": {45      "page": 1,46      "limit": 12,47      "total": 24,48      "totalPages": 249    }50  }51}
Public APIs / Storefront / Products
GET/public/storefront/:storeSlug/catalog/:listType

Curated product feeds powered by RPCs.

listType must be one of:

  • new-arrivals — recently added products

  • trending — gaining traction in the last N days

  • top-selling — highest order volume

  • recommended — personalized recommendations (uses user context if available)

No auth required.

Path parameters

ParameterTypeDescription
storeSlugRequiredstring

Example: my-store

listTypeRequiredstring

One of: new-arrivals, trending, top-selling, recommended

Example: new-arrivals

Query parameters

ParameterTypeDescription
pagestring

Example: 1

limitstring

Example: 12

category_idOptionalstring

Filter by category (supported for new-arrivals, trending, top-selling)

window_daysOptionalstring

Time window in days (trending default 14, top-selling default 90)

Staging

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "market": {5      "id": "market-uuid",6      "slug": "my-store",7      "store_name": {8        "en": "My Store"9      },10      "status": "active",11      "banners": []12    },13    "products": [14      {15        "id": "product-uuid",16        "slug": "wireless-earbuds",17        "name": {18          "en": "Wireless Earbuds"19        },20        "description": {21          "en": ""22        },23        "has_variant": true,24        "stock_quantity": 30,25        "rating": 4.5,26        "total_reviews": 80,27        "categories": [28          {29            "id": "cat-uuid",30            "name": {31              "en": "Electronics"32            }33          }34        ],35        "variant": {36          "id": "variant-uuid",37          "slug": "wireless-earbuds-black",38          "name": {39            "en": "Wireless Earbuds Black"40          },41          "price": 49.99,42          "sku": "WE-BLK",43          "images": [],44          "stock_quantity": 30,45          "attributes": {}46        }47      }48    ],49    "pagination": {50      "page": 1,51      "limit": 12,52      "total": 1,53      "totalPages": 154    }55  }56}

Get Product by ID​

Public APIs / Storefront / Products
GET/public/storefront/:storeSlug/products/:productId

Get a single product with all active variants.

Variants are returned sorted

primary variant first, then by creation date ascending.

No auth required.

Path parameters

ParameterTypeDescription
storeSlugRequiredstring

Example: my-store

productIdRequiredstring

Product UUID

Example: product-uuid

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

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "market": {5      "id": "market-uuid",6      "slug": "my-store",7      "store_name": {8        "en": "My Store"9      }10    },11    "product": {12      "id": "product-uuid",13      "slug": "macbook-pro-laptop",14      "market_id": "market-uuid",15      "brand_id": "brand-uuid",16      "name": {17        "en": "MacBook Pro Laptop",18        "ar": "لابتوب ماك بوك برو"19      },20      "description": {21        "en": "High-performance laptop"22      },23      "price": 1999.99,24      "is_active": true,25      "has_variant": true,26      "tags": [27        "laptop",28        "apple"29      ],30      "images": [31        "https://cdn.example.com/product.jpg"32      ],33      "stock_quantity": 80,34      "rating": 4.8,35      "total_reviews": 120,36      "variant_options": [37        "colors",38        "ram"39      ],40      "available_option_values": {41        "colors": [42          "Space Gray",43          "Silver"44        ],45        "ram": [46          "16GB",47          "32GB"48        ]49      },50      "variants": [51        {52          "id": "variant-uuid",53          "slug": "macbook-pro-space-gray-16gb",54          "name": {55            "en": "MacBook Pro Space Gray 16GB"56          },57          "price": 1999.99,58          "sku": "MBP-SG-16",59          "stock_quantity": 40,60          "is_active": true,61          "is_primary": true,62          "images": [],63          "attributes": {64            "colors": "Space Gray",65            "ram": "16GB"66          }67        }68      ],69      "categories": [70        {71          "id": "cat-uuid",72          "name": {73            "en": "Electronics"74          }75        }76      ],77      "brand": {78        "id": "brand-uuid",79        "name": {80          "en": "Apple"81        }82      },83      "created_at": "2024-01-01T00:00:00Z",84      "updated_at": "2024-01-01T00:00:00Z"85    }86  }87}

Get Product by Slug​

Public APIs / Storefront / Products
GET/public/storefront/:storeSlug/products/slug/:productSlug

Get a single product by its URL slug with all active variants.

Identical response shape to Get Product by ID — use this endpoint for SEO-friendly product pages.

Variants are returned sorted

primary variant first, then by creation date ascending.

No auth required.

Path parameters

ParameterTypeDescription
storeSlugRequiredstring

Example: my-store

productSlugRequiredstring

Product slug

Example: macbook-pro-laptop

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

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "market": {5      "id": "market-uuid",6      "slug": "my-store",7      "store_name": {8        "en": "My Store"9      }10    },11    "product": {12      "id": "product-uuid",13      "slug": "macbook-pro-laptop",14      "market_id": "market-uuid",15      "brand_id": "brand-uuid",16      "name": {17        "en": "MacBook Pro Laptop",18        "ar": "لابتوب ماك بوك برو"19      },20      "description": {21        "en": "High-performance laptop"22      },23      "price": 1999.99,24      "is_active": true,25      "has_variant": true,26      "tags": [27        "laptop",28        "apple"29      ],30      "images": [31        "https://cdn.example.com/product.jpg"32      ],33      "stock_quantity": 80,34      "rating": 4.8,35      "total_reviews": 120,36      "variant_options": [37        "colors",38        "ram"39      ],40      "available_option_values": {41        "colors": [42          "Space Gray",43          "Silver"44        ],45        "ram": [46          "16GB",47          "32GB"48        ]49      },50      "variants": [51        {52          "id": "variant-uuid",53          "slug": "macbook-pro-space-gray-16gb",54          "name": {55            "en": "MacBook Pro Space Gray 16GB"56          },57          "price": 1999.99,58          "sku": "MBP-SG-16",59          "stock_quantity": 40,60          "is_active": true,61          "is_primary": true,62          "images": [],63          "attributes": {64            "colors": "Space Gray",65            "ram": "16GB"66          }67        }68      ],69      "categories": [70        {71          "id": "cat-uuid",72          "name": {73            "en": "Electronics"74          }75        }76      ],77      "brand": {78        "id": "brand-uuid",79        "name": {80          "en": "Apple"81        }82      },83      "created_at": "2024-01-01T00:00:00Z",84      "updated_at": "2024-01-01T00:00:00Z"85    }86  }87}

Get Similar Products​

Public APIs / Storefront / Products
GET/public/storefront/:storeSlug/products/:productId/similar

Get products similar to the given product (same categories, via RPC).

No auth required.

Path parameters

ParameterTypeDescription
storeSlugRequiredstring

Example: my-store

productIdRequiredstring

Example: product-uuid

Query parameters

ParameterTypeDescription
pagestring

Example: 1

limitstring

Max 50

Example: 10

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/public/storefront/${STORESLUG}/products/${PRODUCTID}/similar?page=1&limit=10"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "market": {5      "id": "market-uuid",6      "slug": "my-store",7      "store_name": {8        "en": "My Store"9      },10      "status": "active"11    },12    "products": [13      {14        "id": "product-uuid",15        "slug": "wireless-earbuds",16        "name": {17          "en": "Wireless Earbuds"18        },19        "description": {20          "en": ""21        },22        "has_variant": true,23        "stock_quantity": 30,24        "rating": 4.5,25        "total_reviews": 80,26        "variant": {27          "id": "variant-uuid",28          "slug": "wireless-earbuds-black",29          "name": {30            "en": "Wireless Earbuds Black"31          },32          "price": 49.99,33          "sku": "WE-BLK",34          "images": [],35          "stock_quantity": 30,36          "attributes": {}37        }38      }39    ],40    "pagination": {41      "page": 1,42      "limit": 10,43      "total": 1,44      "totalPages": 145    }46  }47}