Admin API
BetaRead and change store data for the merchants who install your app, with only the permissions they approved.
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.
- 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.
- We send them to youWe open your
install_urlwith?code=…&state=…&store=<slug>&hmac=…. Thehmacis 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. - 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.
<?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.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"
}'{
"access_token": "qc_live_…",
"token_type": "Bearer",
"store": "ivie-studio",
"scope": ["read_store", "read_orders", "write_orders"]
}| Error | Why |
|---|---|
401 invalid_client | The client id and secret don’t match the app. |
400 invalid_grant | The code is wrong, used, or older than 10 minutes. Ask the merchant to install again. |
400 invalid_request | Something 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 whenmeta.has_moreis false. - Listed apps get tokens starting
qc_live_. Your own unlisted app, installed on a store you own to try it, getsqc_test_. Both work the same way.
curl "https://qcom.ng/api/admin/v1/orders?page=1" \
-H "Authorization: Bearer qc_live_…" \
-H "Accept: application/json"{
"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,expandjti. - Check the signature,
audandexpon your server before you show any store data.
// 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);<?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.
| Permission | The merchant sees |
|---|---|
read_store | See your store name, link and currency |
read_products | See your products, prices and categories |
write_products | Add and change products |
read_inventory | See your stock levels |
write_inventory | Change your stock levels |
read_orders | See your orders, with shoppers’ names and delivery addresses |
write_orders | Update order status and notes |
read_customers | See your customers’ names, emails and phone numbers |
read_shipping, write_shipping | Delivery prices (no endpoints yet) |
read_discounts, write_discounts | Discount 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
| Call | Permission | What it does |
|---|---|---|
GET /store | read_store | The store: slug, name, url, currency, country, timezone. |
GET /products | read_products | Products, newest first. ?status=active|draft|archived. |
GET /products/{id} | read_products | One product, with its variants (each with id, sku, price and quantity). |
POST /products | write_products | Add 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_products | Change name, description, status, category, made_to_order, or price and compare_at_price on a product without options. |
GET /categories | read_products | Categories, with how many products each has. |
GET /inventory | read_inventory | Stock for every option: variant_id, product_id, sku, tracked, quantity. |
PATCH /inventory | write_inventory | Set one option’s stock: { "variant_id": 2001, "quantity": 30 }. The merchant sees your app’s name on the change. |
GET /orders | read_orders | Orders, newest first. ?status=paid and so on. |
GET /orders/{id} | read_orders | One order. |
PATCH /orders/{id} | write_orders | Change status (paid, processing, shipped, delivered, cancelled, refunded), with an optional note, or the merchant’s notes. |
GET /customers | read_customers | Customers, newest first. ?search= by name, email or phone. |
POST /usage | None | Answers 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.
| Status | What it means | What to do |
|---|---|---|
401 unauthenticated | The token is wrong, or the app was removed and the token revoked. | Stop calling for that store. |
403 missing_permission | Your app doesn’t have the permission for this call. The answer names it. | Add it to your app file and submit again. |
404 not_found | Nothing with that id in this store, or no such endpoint. | |
422 | Something in your request isn’t valid. errors says which field. | Read the message and fix the request. |
423 store_unavailable | The store is suspended for now. | Try again later. |
429 rate_limited | Too many requests. | Wait for the seconds in Retry-After. |
501 not_available_yet | Usage 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.