Storefront API

Live

Read a store’s live products from any website or server. No key needed.

Live

You can use this today.

At a glance

AccessPublic and read-only. No key.
FormatJSON.
MoneyWhole kobo: ₦112,000 is 11200000.
Rate limit60 requests a minute from one IP address, for each store.
CachingAnswers may be cached for 60 seconds (Cache-Control: public, max-age=60).
BrowsersGrowth and Pro stores: from any website. Starter stores: from a server only. See calling from a browser.

The store’s address

The store is onIts API address
Growth or Prohttps://yourstore.qcom.ng/api/v1
Starterhttps://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.url in every answer is the store’s current address.

List products

GET /products gives the store’s products, newest first.

QueryWhat it does
limitHow many to send, from 1 to 100. The default is 12. Anything above 100 sends 100.
pageWhich page, from 1. The default is 1. A page past the end sends an empty list.
categoryOnly 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

FieldWhat it is
nameThe store’s name.
slugIts short name, as in its address.
urlThe store’s home page.

Each product

FieldWhat it is
nameThe product’s name.
slugIts short name, used in its address and in /products/{slug}.
priceThe price in kobo. If its options cost different amounts, this is the cheapest.
compare_priceThe old price in kobo, when it’s on sale, or null.
from_pricetrue when options cost different amounts. Show “From ₦…”.
currencyAlways NGN.
imageThe first photo’s full address, or null.
in_stocktrue or false. We never share stock counts.
urlThe product’s page on the store. Send shoppers here to buy.
categoriesUp to 5 category names.

meta (lists only)

FieldWhat it is
totalHow many products match, across all pages.
pageThe page you asked for.
limitThe 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 price 0. Show “Price soon”, not ₦0.
  • in_stock is true when the store doesn’t track stock for the product, or when at least one option has stock.

Errors

StatusWhen
404The product or store doesn’t exist, or the store is closed. The body is JSON with a message.
429Too 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-Limit and X-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) send Access-Control-Allow-Origin: *, so fetch works 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.