SALTDRIO API · DEVELOPERSIntegrate SaltDrio
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
GET
https://saltdrio-api.vercel.app/api/productsQUERY PARAMETERS
RESPONSE FIELDS
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.