Storefront Catalog & Metadata

Allows public guests and custom storefront applications to inspect a store's details and query active product listings.


1. Access Store Profile Details

Get the store's operational name, currency settings, dispatch ports, and support emails.

  • Method: GET
  • Route: /api/v1/stores/:storeId
curl -X GET https://api.bazaara.store/api/v1/stores/YOUR_STORE_ID
async function getStoreDetails(storeId: string) {
  const response = await fetch(`https://api.bazaara.store/api/v1/stores/${storeId}`);
  return response.json();
}
import requests

def get_store_details(store_id):
    url = f"https://api.bazaara.store/api/v1/stores/{store_id}"
    response = requests.get(url)
    return response.json()
async fn get_store_details(store_id: &str) -> Result<serde_json::Value, reqwest::Error> {
    let res = reqwest::get(&format!("https://api.bazaara.store/api/v1/stores/{}", store_id))
        .await?
        .json::<serde_json::Value>()
        .await?;
    Ok(res)
}

2. Browse Store Products Catalog

Retrieve all active products in the store's catalog. You can filter the listings by passing parameters like search strings, price ceilings, categories, sorting fields, and pagination offsets.

  • Method: GET
  • Route: /api/v1/stores/:storeId/products
  • Query Options:
    • q (string): Search term matching name/description.
    • category (string): Filter by product classification.
    • minPrice / maxPrice (number): Price ranges.
    • sort (createdAt | price | name) and order (ASC | DESC).
curl -X GET "https://api.bazaara.store/api/v1/stores/YOUR_STORE_ID/products?category=Electronics&minPrice=50&sort=price&order=ASC"
interface QueryParams {
  category?: string;
  minPrice?: number;
  sort?: string;
  order?: 'ASC' | 'DESC';
}

async function getProducts(storeId: string, params: QueryParams = {}) {
  const query = new URLSearchParams(params as any).toString();
  const response = await fetch(`https://api.bazaara.store/api/v1/stores/${storeId}/products?${query}`);
  return response.json();
}
import requests

def get_products(store_id, category=None, min_price=None):
    url = f"https://api.bazaara.store/api/v1/stores/{store_id}/products"
    params = {}
    if category: params["category"] = category
    if min_price: params["minPrice"] = min_price
    
    response = requests.get(url, params=params)
    return response.json()
async fn get_products(store_id: &str, category: &str) -> Result<serde_json::Value, reqwest::Error> {
    let url = format!(
        "https://api.bazaara.store/api/v1/stores/{}/products?category={}",
        store_id, category
    );
    let res = reqwest::get(&url)
        .await?
        .json::<serde_json::Value>()
        .await?;
    Ok(res)
}

3. Retrieve Single Product Details

Retrieve full details of a specific product using its unique ID.

  • Method: GET
  • Route: /api/v1/stores/:storeId/products/:productId
curl -X GET https://api.bazaara.store/api/v1/stores/YOUR_STORE_ID/products/PRODUCT_UUID_HERE
async function getProductById(storeId: string, productId: string) {
  const response = await fetch(`https://api.bazaara.store/api/v1/stores/${storeId}/products/${productId}`);
  return response.json();
}
import requests

def get_product(store_id, product_id):
    url = f"https://api.bazaara.store/api/v1/stores/{store_id}/products/{product_id}"
    response = requests.get(url)
    return response.json()
async fn get_product(store_id: &str, product_id: &str) -> Result<serde_json::Value, reqwest::Error> {
    let res = reqwest::get(&format!("https://api.bazaara.store/api/v1/stores/{}/products/{}", store_id, product_id))
        .await?
        .json::<serde_json::Value>()
        .await?;
    Ok(res)
}