Storefront API
LiveRead a store’s live products from any website or server. No key needed.
Live
You can use this today.
At a glance
| Access | Public and read-only. No key. |
| Format | JSON. |
| Money | Whole kobo: ₦112,000 is 11200000. |
| Rate limit | 60 requests a minute from one IP address, for each store. |
| Caching | Answers may be cached for 60 seconds (Cache-Control: public, max-age=60). |
| Browsers | Growth and Pro stores: from any website. Starter stores: from a server only. See calling from a browser. |
The store’s address
| The store is on | Its API address |
|---|---|
| Growth or Pro | https://yourstore.qcom.ng/api/v1 |
| Starter | https://qcom.ng/s/yourstore/api/v1 |
- When a store changes plan, its address changes. The old address answers with a redirect (
302) to the new one, so follow redirects. - Use the qcom.ng address even when the store has its own domain.
- The
store.urlin every answer is the store’s current address.
List products
GET /products gives the store’s products, newest first.
| Query | What it does |
|---|---|
limit | How many to send, from 1 to 100. The default is 12. Anything above 100 sends 100. |
page | Which page, from 1. The default is 1. A page past the end sends an empty list. |
category | Only products in this category. Use its name or its slug, such as two-pieces. It matches the same products as the store’s own category page. |
curl
curl "https://yourstore.qcom.ng/api/v1/products?limit=1"200 OK
{
"store": {
"name": "Ivie Studio",
"slug": "ivie-studio",
"url": "https://ivie-studio.qcom.ng"
},
"data": [
{
"name": "Ivory Lace Two Piece",
"slug": "ivory-lace-two-piece",
"price": 11200000,
"compare_price": null,
"from_price": true,
"currency": "NGN",
"image": "https://res.cloudinary.com/example/image/upload/ivory-lace-two-piece.jpg",
"in_stock": true,
"url": "https://ivie-studio.qcom.ng/ivory-lace-two-piece",
"categories": ["Two Pieces"]
}
],
"meta": { "total": 37, "page": 1, "limit": 1 }
}One product
GET /products/{slug} gives one product. The slug is the last part of the product’s address on the store.
curl
curl "https://yourstore.qcom.ng/api/v1/products/ivory-lace-two-piece"The answer has the same store, and data is a single product rather than a list. There’s no meta.
Fields
store
| Field | What it is |
|---|---|
name | The store’s name. |
slug | Its short name, as in its address. |
url | The store’s home page. |
Each product
| Field | What it is |
|---|---|
name | The product’s name. |
slug | Its short name, used in its address and in /products/{slug}. |
price | The price in kobo. If its options cost different amounts, this is the cheapest. |
compare_price | The old price in kobo, when it’s on sale, or null. |
from_price | true when options cost different amounts. Show “From ₦…”. |
currency | Always NGN. |
image | The first photo’s full address, or null. |
in_stock | true or false. We never share stock counts. |
url | The product’s page on the store. Send shoppers here to buy. |
categories | Up to 5 category names. |
meta (lists only)
| Field | What it is |
|---|---|
total | How many products match, across all pages. |
page | The page you asked for. |
limit | The page size used. |
Which products show
- Only active products that anyone can see on the store. Drafts never show.
- Products a store lists only for shoppers abroad are left out.
- A closed, unapproved or suspended store answers
404, the same as a store that doesn’t exist. - A product whose price is kept secret until a launch has
price0. Show “Price soon”, not ₦0. in_stockistruewhen the store doesn’t track stock for the product, or when at least one option has stock.
Errors
| Status | When |
|---|---|
404 | The product or store doesn’t exist, or the store is closed. The body is JSON with a message. |
429 | Too many requests. Wait for the number of seconds in Retry-After. |
Limits and good manners
- 60 requests a minute from one IP address, for each store. Each answer carries
X-RateLimit-LimitandX-RateLimit-Remaining. - Cache what you get. Answers may be kept for 60 seconds. Our WordPress plugin keeps them for 5 minutes.
- Every answer counts towards the store’s monthly bandwidth on QuickCommerce, so cache rather than ask on every page view.
- Answers carry
X-Robots-Tag: noindex, so search engines don’t list them.
Calling from a browser
- Growth and Pro stores (
yourstore.qcom.ng) sendAccess-Control-Allow-Origin: *, sofetchworks from any website. - Starter stores (
qcom.ng/s/yourstore) can only be read from a server. Reading a store straight from a browser on another website is part of the Growth and Pro plans. - Calling from your server works for every store on every plan, and lets you cache.
Examples
JavaScript
// Node 18+, or a browser page calling a yourstore.qcom.ng address.
const base = "https://yourstore.qcom.ng/api/v1";
function naira(kobo) {
const hasKobo = kobo % 100 !== 0;
return "₦" + (kobo / 100).toLocaleString("en-NG", {
minimumFractionDigits: hasKobo ? 2 : 0,
maximumFractionDigits: 2,
});
}
const res = await fetch(base + "/products?limit=6");
if (!res.ok) throw new Error("Store answered " + res.status);
const { store, data, meta } = await res.json();
console.log(store.name + ": " + meta.total + " products");
for (const p of data) {
const price = p.price === 0 ? "Price soon" : (p.from_price ? "From " : "") + naira(p.price);
console.log(p.name, price, p.in_stock ? "" : "(sold out)", p.url);
}PHP
<?php
$base = 'https://yourstore.qcom.ng/api/v1';
$context = stream_context_create(['http' => [
'timeout' => 8,
'header' => "Accept: application/json\r\n",
'follow_location' => 1,
'max_redirects' => 3,
]]);
$body = @file_get_contents($base.'/products?limit=6', false, $context);
if ($body === false) {
exit("The store could not be reached.\n");
}
$answer = json_decode($body, true);
foreach ($answer['data'] ?? [] as $product) {
$naira = $product['price'] / 100;
$price = $product['price'] === 0
? 'Price soon'
: ($product['from_price'] ? 'From ' : '').'₦'.number_format($naira, $product['price'] % 100 ? 2 : 0);
echo $product['name'].' '.$price.($product['in_stock'] ? '' : ' (sold out)').' '.$product['url']."\n";
}Something unclear or missing? Email owodunnitech@gmail.com. We usually reply within 48 hours, but it can take up to 7 days.