Skip to main content

Products

5 API calls in this section.

Browse Products (Catalog)

Public APIs / Storefront / Products
GET/public/storefront/:storeSlug/catalog?page=1&limit=12

Browse all active products in a storefront catalog. No auth required. Query params: - page, limit: pagination - pagination.total: total matching products for current filters (not the length of the current page) - search: search across name/description - category_id: filter by category - brand_id: filter by brand - featured_type: most_loved for popularity-sorted products

Most OnDi APIs require an authenticated session or service token. Public endpoints are marked by their path and module context.
Request
curl
1curl --request GET "$ONDI_BASE_URL/public/storefront/:storeSlug/catalog?page=1&limit=12" \2  --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"

Path parameters

storeSlugRequired
path string

my-store

Query parameters

pageOptional
query string

1

Page number (default: 1)

limitOptional
query string

12

Products per page (default: 12)

Responses

Success200OK
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}
Store Not Found404Not Found
Response body
json
1{2  "success": false,3  "message": "Store not found"4}
Public APIs / Storefront / Products
GET/public/storefront/:storeSlug/catalog/:listType?page=1&limit=12

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.

Most OnDi APIs require an authenticated session or service token. Public endpoints are marked by their path and module context.
Request
curl
1curl --request GET "$ONDI_BASE_URL/public/storefront/:storeSlug/catalog/:listType?page=1&limit=12" \2  --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"

Path parameters

storeSlugRequired
path string

my-store

listTypeRequired
path string

new-arrivals

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

Query parameters

pageOptional
query string

1

limitOptional
query string

12

Responses

Success - New Arrivals200OK
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.

Most OnDi APIs require an authenticated session or service token. Public endpoints are marked by their path and module context.
Request
curl
1curl --request GET "$ONDI_BASE_URL/public/storefront/:storeSlug/products/:productId" \2  --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"

Path parameters

storeSlugRequired
path string

my-store

productIdRequired
path string

product-uuid

Product UUID

Responses

Success200OK
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}
Product Not Found404Not Found
Response body
json
1{2  "success": false,3  "message": "Product not found"4}

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.

Most OnDi APIs require an authenticated session or service token. Public endpoints are marked by their path and module context.
Request
curl
1curl --request GET "$ONDI_BASE_URL/public/storefront/:storeSlug/products/slug/:productSlug" \2  --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"

Path parameters

storeSlugRequired
path string

my-store

productSlugRequired
path string

macbook-pro-laptop

Product slug

Responses

Success200OK
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}
Product Not Found404Not Found
Response body
json
1{2  "success": false,3  "message": "Product not found"4}

Get Similar Products

Public APIs / Storefront / Products
GET/public/storefront/:storeSlug/products/:productId/similar?page=1&limit=10

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

Most OnDi APIs require an authenticated session or service token. Public endpoints are marked by their path and module context.
Request
curl
1curl --request GET "$ONDI_BASE_URL/public/storefront/:storeSlug/products/:productId/similar?page=1&limit=10" \2  --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"

Path parameters

storeSlugRequired
path string

my-store

productIdRequired
path string

product-uuid

Query parameters

pageOptional
query string

1

limitOptional
query string

10

Max 50

Responses

Success200OK
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}