Developer API
For a website your developer built: read your published catalogue and stock, and send online orders into Nexpura — create, update, cancel, or report a refund — with a scoped API key. Server-to-server only; orders go through the same safety checks as Shopify and WooCommerce.
Quick reference
- Base URL
https://nexpura.com/api/v1. JSON in, JSON out. The full machine-readable reference ishttps://nexpura.com/api/v1/openapi.json. - Create keys on Website → Connect under Custom Website API Keys. A key is shown once; Nexpura stores only a hash.
- Server-to-server only.Call the API from your website's server, never from a browser — a key in page code can be copied by anyone. There is no CORS support on purpose.
- Scopes:
catalog:read(products and stock),orders:read(look up an order),orders:write(send, cancel, report refunds). Give each key only what it needs. - Live keys start
npk_live_. Test keys startnpk_test_: reads work normally, and order calls are checked and answered but nothing is written. - Requires the Studio or Atelier plan and an active subscription.
Authentication
Send the key as a bearer token (or in an X-Api-Key header). The key decides which shop the request belongs to — a shop id in the body is ignored.
curl https://nexpura.com/api/v1/products?limit=20 \
-H "Authorization: Bearer npk_live_…"401— the key is missing, wrong or revoked (always the same answer, whichever it was).403— the key doesn't have the scope this call needs, or the plan doesn't include it.402— the shop's subscription is inactive.429— too many requests; wait and retry. Limits apply per key, per shop and per IP.
Reading your catalogue and stock
GET /products— published products only, in a stable order you can page through. Query:limit(1–100, default 50),cursor(thenext_cursorof the previous page) andupdated_since(ISO time) to fetch only what changed.GET /products/{id}— one published product.GET /inventory?sku=A,B,C— available quantity for up to 100 SKUs, for showing accurate stock at checkout.
A product carries its title, description, materials, price (null when the shop hides prices), availability, quantity available and image URLs. Cost prices and internal notes are never included.
Sending orders
POST /orders records an order — or, if Nexpura already has that external_id, brings it up to date. Sending the same order twice never creates a second sale, so it is safe to retry after a timeout.
curl -X POST https://nexpura.com/api/v1/orders \
-H "Authorization: Bearer npk_live_…" \
-H "Content-Type: application/json" \
-d '{
"external_id": "10423",
"currency": "AUD",
"customer_name": "Ada Lovelace",
"customer_email": "ada@example.com",
"payment_status": "paid",
"payment_method": "stripe",
"payment_reference": "pi_3Px…",
"paid_at": "2026-10-27T03:14:00Z",
"tax_amount": 136.36,
"line_items": [
{ "sku": "RING-0142", "name": "Solitaire ring", "quantity": 1, "unit_price": 1500 }
]
}'external_id— your order number. Required; it is how Nexpura recognises the order later.line_items— 1 to 200 lines. A line whoseskumatches a Nexpura item takes that item out of stock; a line without a match is recorded without moving stock.payment_status—unpaid(default),authorized,partially_paid(withamount_paid) orpaid. Nexpura records money only when you say it was captured; an authorised-only payment is not recorded as paid.totalis optional (the sum of the lines is used);tax_amountis the tax already included in that total.
From a Node.js server:
const NEXPURA = "https://nexpura.com/api/v1";
const headers = {
Authorization: `Bearer ${process.env.NEXPURA_API_KEY}`, // never in the browser
"Content-Type": "application/json",
};
// After your checkout succeeds:
const res = await fetch(`${NEXPURA}/orders`, { method: "POST", headers, body: JSON.stringify(order) });
const result = await res.json();
// 201 created · 200 already known (updated or unchanged) · 202 kept for the shop to reviewResponses:
201{"status":"created","sale_id":…}— recorded as a new sale.200{"status":"updated"|"unchanged",…}— Nexpura already had this order.202{"status":"needs_review","reason":…}— kept aside for the shop rather than recorded, for example because an item is out of stock. Nothing is lost: the shop sees it in Online orders to review and decides.400— the body failed validation; the message says which field.
The order lifecycle
Payment taken later
Send the same order again with the new payment_status (and amount_paid for a part payment). Nexpura records only the difference, once.
Cancellations
curl -X POST https://nexpura.com/api/v1/orders/10423/cancel \
-H "Authorization: Bearer npk_live_…"An unpaid order is cancelled in Nexpura and its items go back into stock. If money has been recorded against it, the cancellation is kept for the shop to process (202) — Nexpura never reverses a payment on its own.
Refunds
curl -X POST https://nexpura.com/api/v1/orders/10423/refund \
-H "Authorization: Bearer npk_live_…" \
-H "Content-Type: application/json" \
-d '{ "amount": 1500, "reason": "Returned within 30 days" }'A refund is always kept for the shop to process in Nexpura (202), so the money and the stock move together through Nexpura's own refund screen. The API never creates refund records itself.
Looking an order up
GET /orders/{external_id} (scope orders:read) returns whether Nexpura recorded it, the sale's number, status, total and amount paid, and any reviews it is waiting in.
Testing safely
Build against a npk_test_ key first. Catalogue and stock reads return real data; order, cancel and refund calls are validated and answer with what would happen ({"mode":"test","would_apply":…}) without writing anything. Switch to a live key when the responses look right.
Common questions
Does Nexpura notify my site when stock changes?
Not yet — there are no outbound webhooks. Fetch GET /products?updated_since=… on a schedule, or check GET /inventory for the items in a basket at checkout.
I'm on Shopify or WooCommerce — do I need this?
No. Connect the store on Website → Connect instead; orders then arrive automatically. See the Shopify and WooCommerce pages.
A key leaked. What do I do?
Revoke it on Website → Connect — it stops working immediately — and create a new one. Other keys are unaffected.
What about the older /api/ingest/order?
It keeps working for existing live keys with the orders:write scope and takes the same order body as POST /orders. New integrations should use /api/v1.