SALTDRIO API · DEVELOPERS

Integrate SaltDrio
into your app.

Display SaltDrio products — new arrivals, sale items, and featured collections — directly inside your app or website using our simple REST API.

REST APIJSON ResponseAPI Key AuthFree Access

AUTHENTICATION

API Key

Every request requires your API key in the request header. Contact SaltDrio to get access.

x-api-key: your_api_key_here

ENDPOINT

GET /api/products

GEThttps://saltdrio-api.vercel.app/api/products

QUERY PARAMETERS

PARAMVALUESDEFAULTDESCRIPTION
typeauto · new · offers · events · randomautoauto = smart mix of new, sale & event products
limit1 – 205Number of products to return

RESPONSE FIELDS

FIELDTYPEDESCRIPTION
idstringUnique product ID
namestringProduct name
imagestring | nullCloudinary image URL
pricenumberOriginal price in BDT (৳)
salePricenumber | nullSale price — null if not on sale
onSalebooleanWhether active sale is running
eventTagstring | nullCollection label e.g. "New Arrival"
urlstringDirect link to product on SaltDrio

CODE EXAMPLES

Integration Guide

const API = "https://saltdrio-api.vercel.app/api/products"
const KEY = "your_api_key"

async function loadSaltDrioAds() {
  const res = await fetch(`${API}?type=random&limit=5`, {
    headers: { "x-api-key": KEY }
  })
  const { success, data } = await res.json()
  if (!success || !data.length) return

  const container = document.getElementById("saltdrio-ads")
  container.innerHTML = data.map(p => `
    <a href="${p.url}" target="_blank" class="sd-card">
      <img src="${p.image}" alt="${p.name}">
      <p>${p.name}</p>
      <p>${p.onSale ? "৳" + p.salePrice : "৳" + p.price}</p>
    </a>
  `).join("")
}

loadSaltDrioAds()

NOTES

🔑

Never expose your API key in public client-side code. Use environment variables.

📦

Cache the response for at least 10–30 minutes. Products don't change that frequently.

🚫

If count returns 0, show nothing — no products available at that moment.

📩

Need an API key? Contact SaltDrio via WhatsApp or Instagram.

Need Help?