Admin API

Beta

Read and change store data for the merchants who install your app, with only the permissions they approved.

Beta

This is in private beta, for approved developers. It works today, and small details may still change.

How a store connects

Installing uses OAuth 2 with an authorisation code.

  1. The merchant installsThey open Extensions, By developers, in their Backroom, press Install, and approve the permissions your app asks for. Only the store owner can install or remove apps.
  2. We send them to youWe open your install_url with ?code=…&state=…&store=<slug>&hmac=…. The hmac is a hex HMAC-SHA256 of the other three, sorted by name and joined as a query string, made with your client secret. Check it, so you know the merchant really came from us.
  3. You swap the codeFrom your server, send the code with your client id and secret to POST https://qcom.ng/api/admin/v1/oauth/token. You get a token for that store. The code lasts 10 minutes and works once.
Check the install link (PHP)
<?php
// Your install_url. QuickCommerce sends the merchant here with
// ?code=…&state=…&store=…&hmac=…  Check it really came from us first.
$query = $_GET;
$hmac = $query['hmac'] ?? '';
unset($query['hmac']);
ksort($query); // code, state, store
$expected = hash_hmac('sha256', http_build_query($query), getenv('QC_CLIENT_SECRET'));

if (! hash_equals($expected, $hmac)) {
    http_response_code(400);
    exit('Not signed by QuickCommerce.');
}
// Now swap $query['code'] for a store token, from your server.
Swap the code for a store token
curl -X POST "https://qcom.ng/api/admin/v1/oauth/token" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "grant_type": "authorization_code",
    "client_id": "qc_app_…",
    "client_secret": "qc_sec_…",
    "code": "THE_CODE_FROM_INSTALL"
  }'
200 OK
{
  "access_token": "qc_live_…",
  "token_type": "Bearer",
  "store": "ivie-studio",
  "scope": ["read_store", "read_orders", "write_orders"]
}
ErrorWhy
401 invalid_clientThe client id and secret don’t match the app.
400 invalid_grantThe code is wrong, used, or older than 10 minutes. Ask the merchant to install again.
400 invalid_requestSomething is missing from the request.

Keep the token on your server, encrypted. Never put it in browser code. Installing again gives a new token and stops the old one.

Calling the API

  • The base address is https://qcom.ng/api/admin/v1.
  • Send the token as Authorization: Bearer <token>.
  • JSON only. Money is whole kobo: ₦2,500 is 250000.
  • Lists come 50 to a page. Ask for the next with ?page=2, and stop when meta.has_more is false.
  • Listed apps get tokens starting qc_live_. Your own unlisted app, installed on a store you own to try it, gets qc_test_. Both work the same way.
List orders
curl "https://qcom.ng/api/admin/v1/orders?page=1" \
  -H "Authorization: Bearer qc_live_…" \
  -H "Accept: application/json"
200 OK
{
  "data": [
    {
      "id": 9001,
      "number": "QC-IV-000123",
      "status": "paid",
      "channel": "storefront",
      "customer": { "name": "Ada Obi", "email": "ada@example.com", "phone": "+2348000000000" },
      "delivery_address": "12 Allen Avenue, Ikeja, Lagos",
      "note": null,
      "items": [
        { "product_id": 1001, "variant_id": 2001, "name": "Lume Lip Oil", "variant": null,
          "quantity": 2, "unit_price": 800000, "total": 1600000 }
      ],
      "subtotal": 1600000,
      "shipping": 150000,
      "discount": 0,
      "total": 1750000,
      "tracking_number": "QCT-…",
      "notes": null,
      "created_at": "2026-11-28T09:14:00+01:00",
      "updated_at": "2026-11-28T09:15:00+01:00"
    }
  ],
  "meta": { "page": 1, "per_page": 50, "total": 1, "has_more": false }
}

Backroom pages and the session token

If your app has a backroom_page, the merchant opens it from Extensions and we show it in a frame inside their Backroom. To prove who’s looking, we give it a short session token. It never goes in the address: we post it to your page with postMessage, and only to your page’s own origin.

  • When your page loads, we post { type: "qc:session", token } to it.
  • Post { type: "qc:session-request" } to the parent window at any time for a fresh one.
  • The token is a JWT, HS256, signed with your client secret. It lasts 5 minutes.
  • Payload: iss (https://qcom.ng), aud (your client id), sub (the merchant’s user id), store (the store’s slug), iat, exp and jti.
  • Check the signature, aud and exp on your server before you show any store data.
Your page (JavaScript)
// In your backroom_page, running in a frame inside the merchant's Backroom.
const QC = "https://qcom.ng";

window.addEventListener("message", async (e) => {
  if (e.origin !== QC || e.data?.type !== "qc:session") return;
  // Send it to your server, which checks it before showing store data.
  await fetch("/qc/session-check", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ token: e.data.token }),
  });
});

// Ask for a fresh one whenever you need it (they last 5 minutes).
window.parent.postMessage({ type: "qc:session-request" }, QC);
Your server (PHP)
<?php
function qcSession(string $token, string $clientId, string $clientSecret): ?array
{
    [$head, $body, $sig] = array_pad(explode('.', $token), 3, '');
    $expected = rtrim(strtr(base64_encode(hash_hmac('sha256', "$head.$body", $clientSecret, true)), '+/', '-_'), '=');

    if (! hash_equals($expected, $sig)) {
        return null;
    }

    $payload = json_decode(base64_decode(strtr($body, '-_', '+/')), true);

    if (($payload['aud'] ?? null) !== $clientId || ($payload['exp'] ?? 0) < time()) {
        return null;
    }

    return $payload; // ['store' => 'ivie-studio', 'sub' => '21', …]
}

Permissions

Ask only for what your app needs. The merchant sees these words before they install.

PermissionThe merchant sees
read_storeSee your store name, link and currency
read_productsSee your products, prices and categories
write_productsAdd and change products
read_inventorySee your stock levels
write_inventoryChange your stock levels
read_ordersSee your orders, with shoppers’ names and delivery addresses
write_ordersUpdate order status and notes
read_customersSee your customers’ names, emails and phone numbers
read_shipping, write_shippingDelivery prices (no endpoints yet)
read_discounts, write_discountsDiscount codes (no endpoints yet)

An app that changes something must also ask to see it: write_orders needs read_orders.

Never available to apps

  • The wallet and its balance.
  • Payouts.
  • Bank details.
  • Identity checks (KYC).
  • Staff accounts.
  • The store’s payment settings.

Endpoints

CallPermissionWhat it does
GET /storeread_storeThe store: slug, name, url, currency, country, timezone.
GET /productsread_productsProducts, newest first. ?status=active|draft|archived.
GET /products/{id}read_productsOne product, with its variants (each with id, sku, price and quantity).
POST /productswrite_productsAdd a product: name (up to 45 characters), price, and optionally description, compare_at_price, stock, made_to_order, sku, category, status (draft by default).
PATCH /products/{id}write_productsChange name, description, status, category, made_to_order, or price and compare_at_price on a product without options.
GET /categoriesread_productsCategories, with how many products each has.
GET /inventoryread_inventoryStock for every option: variant_id, product_id, sku, tracked, quantity.
PATCH /inventorywrite_inventorySet one option’s stock: { "variant_id": 2001, "quantity": 30 }. The merchant sees your app’s name on the change.
GET /ordersread_ordersOrders, newest first. ?status=paid and so on.
GET /orders/{id}read_ordersOne order.
PATCH /orders/{id}write_ordersChange status (paid, processing, shipped, delivered, cancelled, refunded), with an optional note, or the merchant’s notes.
GET /customersread_customersCustomers, newest first. ?search= by name, email or phone.
POST /usageNoneAnswers 501 for now: every app is free in the beta.

Products and orders follow the same rules as the merchant’s own Backroom. A product needs a photo before it can go live, and the plan’s product limit applies; add photos in the Backroom for now. A closed or cancelled order can’t move. Calls for delivery prices and discount codes will follow.

Limits and errors

At most 60 requests a minute for each store, for each app. Every error has a short error code and a plain message.

StatusWhat it meansWhat to do
401 unauthenticatedThe token is wrong, or the app was removed and the token revoked.Stop calling for that store.
403 missing_permissionYour app doesn’t have the permission for this call. The answer names it.Add it to your app file and submit again.
404 not_foundNothing with that id in this store, or no such endpoint.
422Something in your request isn’t valid. errors says which field.Read the message and fix the request.
423 store_unavailableThe store is suspended for now.Try again later.
429 rate_limitedToo many requests.Wait for the seconds in Retry-After.
501 not_available_yetUsage charges, before paid apps open.

Something unclear or missing? Email owodunnitech@gmail.com. We usually reply within 48 hours, but it can take up to 7 days.