Sell our catalogue on your own store
One REST API behind your storefront: product data, wholesale prices in USD, live shipping quotes, order placement and tracking numbers. You sell to your customers, we source and ship, and every step stays inside this API — you never deal with our suppliers directly.
API reference
v1 · Base URL https://szspd.cn/api/partner/v1
Sell our catalogue on your own website, app or marketplace. Your customers order on your storefront, the order reaches us through this API, and we handle sourcing, shipping and tracking. You never talk to any upstream supplier directly — product data, prices, images, fulfilment and after-sales all flow through this API.
GET /products to pull the catalogue →
③ POST /orders to place an order. Money movement is in section 6.1. Create an account (self-service)
Sign up on this page — no call, no email approval. You get a live API key immediately and can start integrating within a minute. New accounts start on our standard wholesale markup (see section 4); we check new sign-ups every working day and will email you to agree volume pricing and payment terms. Until then the standard markup applies and nothing is blocked.
| Field | Required | Notes |
|---|---|---|
company | yes | Your trading name, used on invoices |
email | yes | One account per email. Used for billing and support |
country | yes | ISO-3166 alpha-2, e.g. GH, NG, KE |
phone | no | WhatsApp number for fast support |
website | no | Where you will resell; helps us review the account |
The API key is displayed once, on screen, immediately after sign-up. Store it server-side right away — we keep only a hash and cannot show it again. Lost key? Contact support and we issue a new one.
2. Authentication
Send your key with every request. Three equivalent forms — use the first one:
X-API-Key: pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# or
Authorization: Bearer pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# or (debugging only — URLs end up in logs)
?api_key=pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Keep the key in a server-side environment variable. Never ship it to a browser or mobile app — anyone who opens dev tools would own your account. All calls are server-to-server.
| Status / code | Meaning |
|---|---|
401 missing_api_key | No key in the request |
401 invalid_api_key | Key unknown, mistyped, or rotated |
401 key_revoked | This particular key was disabled |
403 partner_suspended | Account on hold (unpaid invoice / abuse review) |
3. Products
GET /products
Paginated catalogue. All amounts are USD.
| Query | Default | Notes |
|---|---|---|
q | — | Full-text search over title |
category_id | — | Filter by category (see category_path in results) |
page | 1 | 1-based |
limit | 20 | Max 100 |
sort | relevance | relevance · price_asc · price_desc · newest |
curl "https://szspd.cn/api/partner/v1/products?q=power%20bank&limit=2" \
-H "X-API-Key: $SZSPD_KEY"
{
"ok": true,
"data": {
"items": [
{
"sku": "CJAB1234567",
"title": "20000mAh Power Bank with Digital Display",
"image": "https://szspd.cn/api/partner/v1/assets/image?t=...",
"price": 12.4,
"currency": "USD",
"price_is_range": false,
"has_video": true,
"category_id": "...",
"category_path": "Consumer Electronics > Chargers > Power Banks"
}
],
"page": 1, "limit": 2, "total": 14334, "total_pages": 7167, "sort": "relevance"
},
"meta": { "request_id": "...", "ms": 27 }
}
GET /products/{sku}
Full detail: multiple images, plain-text and HTML description, specifications, variant ids, weight.
Add ?stock=1 for a live stock check (slower — cache the answer, do not call it on every page view).
curl "https://szspd.cn/api/partner/v1/products/CJAB1234567?stock=1" -H "X-API-Key: $SZSPD_KEY"
{
"ok": true,
"data": {
"sku": "CJAB1234567",
"title": "20000mAh Power Bank with Digital Display",
"description_text": "...",
"description_html": "<p>...<img src=\"https://szspd.cn/api/partner/v1/assets/image?t=...\">...</p>",
"images": ["https://szspd.cn/api/partner/v1/assets/image?t=...", "..."],
"video": null,
"specs": [{ "label": "Capacity", "value": "20000mAh" }],
"weight_grams": 420,
"price": 12.4,
"price_max": 12.4,
"price_is_range": false,
"variants": [{ "vid": "...", "name": "Black", "price": 12.4, "stock": 132 }],
"currency": "USD"
}
}
https://szspd.cn/api/partner/v1/assets/image?t=..., never at an upstream CDN — safe to hotlink from your
storefront, cached for 30 days, and no API key needed for those requests. Treat the
t token as an opaque string: do not decode or rewrite it.4. Pricing
Prices you receive are your wholesale price, with our margin already included. You set
your own retail price on top — we never dictate it. The formula is
max(cost x (1 + markup%), cost + min_margin), applied server-side at order time; the default
is a single-digit markup agreed at onboarding.
Totals are always recalculated by us when you place an order. A price you send is ignored — we will never bill you more than the total returned in the order response, and that total is final.
5. Orders
POST /orders
Creates an order and returns the amounts, the chosen shipping line and the payment instruction. Shipping is quoted live for the destination country at the moment of the call.
curl -X POST "https://szspd.cn/api/partner/v1/orders" \
-H "X-API-Key: $SZSPD_KEY" -H "Content-Type: application/json" \
-d '{
"partner_ref": "SHOP-1001",
"customer": { "name": "Kwame Mensah", "email": "kwame@example.com", "phone": "+233241234567" },
"shipping": { "address": "12 Liberation Rd", "city": "Accra", "province": "Greater Accra",
"zip": "GA100", "country_code": "GH" },
"items": [ { "sku": "CJAB1234567", "vid": "optional-variant-id", "qty": 1 } ],
"payment": "wallet"
}'
| Field | Required | Notes |
|---|---|---|
partner_ref | recommended | Your own order id. Also used for idempotency |
items[].sku | yes | From GET /products |
items[].qty | yes | 1–999, max 50 lines per order |
items[].vid | no | Variant id; omit to let us pick the default |
customer.name / customer.email | yes | End-customer printed on the parcel |
customer.phone | yes | Couriers require it in most African markets |
shipping.address / city / country_code | yes | Street, city, ISO-2 country |
shipping.province / zip | no | Recommended where the courier asks for it |
payment | no | wallet · manual · link · auto |
logistic | no | Force a shipping line by exact name; default is our cheapest quote |
{
"ok": true,
"data": {
"order_no": "SZ-261127-SWGSA",
"partner_ref": "SHOP-1001",
"status": "awaiting_payment",
"paid": false,
"duplicate": false,
"currency": "USD",
"amounts": { "subtotal": 12.4, "shipping": 6.2, "total": 18.6 },
"logistic": "CJPacket Liquid Line",
"items": [{ "sku": "CJAB1234567", "name": "...", "qty": 1, "unit_price": 12.4, "line_total": 12.4 }],
"payment": { "method": "wallet", "charged": true, "balance_after": 481.4 }
}
}
Idempotency-Key: <uuid> header, or reuse the
same partner_ref. A retry after a timeout returns the same order_no with
"duplicate": true instead of creating a second order. Always set one of them — mobile networks drop responses.GET /orders
?limit=20&page=1 — your orders, newest first.
GET /orders/{order_no}
One order: amounts, address, lines, and the tracking block once shipped.
| status | Meaning |
|---|---|
awaiting_payment | Created, no money received yet |
paid | Funded, queued for sourcing |
processing | Placed with our supplier, being prepared |
shipped | Tracking number in tracking.number |
cancelled | Cancelled before dispatch (contact support) |
Poll every 30–60 minutes; tracking updates are not real-time. Webhooks are on the roadmap — ask us if you need them earlier.
6. Payments
Three modes exist in the API. Two are enabled on production right now — see the table.
| Mode | payment= | How money moves | Status |
|---|---|---|---|
| A. Prepaid wallet (recommended) | wallet |
Top up once, every order is debited automatically and dispatched immediately. Fully unattended. | Live |
| B. Hosted checkout | link |
Each order returns a checkout_url for card / mobile money; the order flips to paid on callback. |
Not enabled |
| C. Manual settlement | manual |
The order returns bank / mobile-money instructions; we confirm receipt and release it. | Live |
payment=link silently falls
back to manual instructions. Use wallet at volume, manual for your first orders.POST /topups
Creates a top-up request. With {"method": "manual"} you receive the account details to pay into;
with "link" a hosted checkout URL (once mode B is enabled).
curl -X POST "https://szspd.cn/api/partner/v1/topups" -H "X-API-Key: $SZSPD_KEY" \
-H "Content-Type: application/json" -d '{"amount_usd": 500, "method": "manual"}'
{ "ok": true, "data": { "topup_no": "TP-261127-2LSU", "amount_usd": 500, "method": "manual",
"instructions": { "title": "Top-up created, awaiting payment", "lines": ["..."] } } }
Once we confirm the transfer, GET /account shows the new balance and the ledger gets an entry.
Quote the topup_no in your payment reference — that is how we reconcile.
GET /account
Your profile, pricing tier, wallet balance, credit limit and recent ledger entries. Use it to build a "funds available" indicator in your own admin panel.
{
"ok": true,
"data": {
"partner_id": "PT-261127ABCD",
"name": "Accra Gadgets Ltd",
"email": "ops@accragadgets.com",
"country": "GH",
"status": "active",
"currency": "USD",
"pricing": { "markup_pct": 8, "min_margin_usd": 0.3 },
"wallet": { "balance_usd": 500, "credit_limit_usd": 0, "available_usd": 500 },
"keys": [{ "id": "PK-...", "prefix": "pk_live_abc123", "label": "prod", "last_used_at": "..." }],
"ledger": [{ "kind": "topup", "amount_usd": 500, "balance_after": 500, "ref": "TP-..." }]
}
}
POST /orders/{order_no}/pay
Pays an existing unpaid order without creating a new one — the correct move after you top up.
Body: {"method":"wallet"}. Never re-place the order: two order numbers means two parcels.
7. Errors, limits and conventions
Every response is either {"ok":true,"data":...,"meta":...} or
{"ok":false,"error":{"code":"...","message":"..."},"meta":{"request_id":"..."}}.
The HTTP status is meaningful; branch on the code. The request_id is what support
needs to trace a call.
| HTTP | code | What to do |
|---|---|---|
| 400 | empty_cart / invalid_address / invalid_country | Fix the request body |
| 400 | missing_customer | customer.name and customer.email are required |
| 401 | missing_api_key / invalid_api_key / key_revoked | Check the key and the header name |
| 402 | insufficient_balance | Top up, then POST /orders/{order_no}/pay. required_usd / available_usd tell you how much |
| 404 | order_not_found | Wrong order number, or it belongs to another account |
| 409 | email_already_registered | Sign-up with an email that already has an account |
| 429 | rate_limited | Back off, retry after the delay |
| 5xx | order_failed / upstream_error | Retry with the same partner_ref — safe |
Rate limits: 300 requests/minute per API key. Unauthenticated endpoints (sign-up, docs) are limited per IP, so keep them out of your request path. Image proxy requests are not counted.
Conventions: amounts are USD with 2 decimals; timestamps are UTC; unknown fields in requests are ignored (we may add fields, never remove them without a version bump).
8. Complete examples
Node.js 18+
const API = "https://szspd.cn/api/partner/v1";
const KEY = process.env.SZSPD_KEY;
async function api(path, init = {}) {
const r = await fetch(API + path, {
...init,
headers: {
"X-API-Key": KEY,
"Content-Type": "application/json",
...(init.headers || {}),
},
});
const j = await r.json();
if (!j.ok) throw new Error(j.error.code + ": " + j.error.message);
return j.data;
}
// 1) browse
const list = await api("/products?q=power+bank&limit=5");
// 2) detail (for your product page)
const p = await api("/products/" + list.items[0].sku);
// 3) order
const order = await api("/orders", {
method: "POST",
body: JSON.stringify({
partner_ref: "SHOP-1001",
customer: { name: "Kwame", email: "kwame@example.com", phone: "+233241234567" },
shipping: { address: "12 Liberation Rd", city: "Accra", country_code: "GH" },
items: [{ sku: p.sku, vid: p.variants?.[0]?.vid, qty: 1 }],
payment: "wallet",
}),
});
// 4) poll tracking
const s = await api("/orders/" + order.order_no);
console.log(s.status, s.tracking?.number);
Python 3.9+
import os, requests
API = "https://szspd.cn/api/partner/v1"
H = {"X-API-Key": os.environ["SZSPD_KEY"]}
def api(path, **kw):
r = requests.request(kw.pop("method", "GET"), API + path,
headers=H, json=kw.get("json"), timeout=60)
j = r.json()
if not j.get("ok"):
raise RuntimeError(j["error"]["code"] + ": " + j["error"]["message"])
return j["data"]
products = api("/products", params={"q": "power bank", "limit": 5})
sku = products["items"][0]["sku"]
order = api("/orders", method="POST", json={
"partner_ref": "SHOP-1001",
"customer": {"name": "Kwame", "email": "kwame@example.com",
"phone": "+233241234567"},
"shipping": {"address": "12 Liberation Rd", "city": "Accra",
"country_code": "GH"},
"items": [{"sku": sku, "qty": 1}],
"payment": "wallet",
})
print(order["order_no"], order["amounts"]["total"])
9. Go-live checklist
- Key stored server-side only; rotate it if it ever touched a frontend bundle.
- Always send
partner_reforIdempotency-Key, and retry 5xx with the same value. - Cache product detail; do not hit
?stock=1on every page view. - Use our
priceas your cost basis and mark up on your side — but never publish our wholesale price as if it were your retail price. - Watch
GET /accountand alert below a threshold, so you never accept an order you cannot fund. - Address changes, cancellations after dispatch and returns go through support with the
order_no.
10. Support
Email support@szspd.cn with your partner_id and the
request_id of the failing call. For urgent order issues, use the WhatsApp number given at onboarding.
We answer within one business day, and same day for production incidents.
Version v1 · fields are additive only · this page is the authoritative reference for the integration.