One API.
Catalog to customer order.
WooCommerce products and Hiobuy marketplace discovery, with customer orders managed in your WordPress dashboard.
https://api.shoponbetterlifeapp.comExplore order handoff →Current routes, legacy aliases, parameters and copyable examples.
Mock discovery works with test keys. Live data requires approved marketplace authorization.
The order bridge sends customer order details to WooCommerce for manual purchasing.
Credentials stay on the server
Catalog access and paid-order submission use different authentication rules.
| Setting | Purpose | Usage |
|---|---|---|
| API_KEY | Optional BetterLife catalog protection | Empty in the current setup. If configured, clients send Authorization: Bearer or X-API-Key. |
| HIOBUY_API_KEY | Supplier access | hio_test_… for mock data; hio_live_… for production. Store only in server .env. |
| WOOCOMMERCE_CONSUMER_KEY + WOOCOMMERCE_CONSUMER_SECRET | WordPress access | Read permission for live categories/variations; read/write permission for orders. |
| ORDER_BRIDGE_KEY | Paid-order backend credential | Send as X-Order-Bridge-Key from a trusted backend. Never embed in browser/mobile code. |
Hiobuy production keys require per-marketplace authorization. Sandbox keys skip that requirement and return mock responses. The app’s optional BetterLife key is separate from all provider credentials.
When does an order appear in WordPress?
When your trusted payment backend submits the confirmed order to the bridge.
The order bridge records customer details, line items, quantities, selected options, supplier links and wallet references. It checks WooCommerce’s calculated total before marking the order paid.
The API does not deduct wallet balances. Browsing and adding to cart do not create WordPress orders. Your existing checkout must connect to a trusted backend that calls this endpoint; frontend and wallet code are outside this project.
Order item fields
| Field | Meaning |
|---|---|
| source | woocommerce or hiobuy. |
| name / quantity / total | Product name, positive integer quantity, full line total as a decimal string. total already covers the quantity. |
| product_id / variation_id | Native WooCommerce product ID and optional chosen variation ID. |
| supplier_product_id / supplier_url | Required for Hiobuy items. Supplier URL is used for manual purchasing. |
| variant / image / channel | Optional selected options, image URL and marketplace name; stored as visible order-item metadata. |
Retries and recovery
Use the same external order reference, wallet transaction reference and unchanged body on retries. Completed retries return the saved WordPress order ID. An unknown create outcome requires reconciliation against WooCommerce before another create attempt. Keep the debit and order payload in your payment backend until delivery is resolved.
Health
Process checks for the current and legacy API.
GET/api/v2/healthAPI process healthPublic⌄
No request fields required.
Returns service, version, status and timestamp. This reports the Node process; it does not verify database, wallet or supplier availability.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v2/health'GET/api/v1/healthLegacy API process healthPublic⌄
No request fields required.
Legacy health response without the version field.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v1/health'WooCommerce catalog
Browse local products, fetch complete categories, and select native variations.
GET/api/v2/productsBrowse the local WooCommerce catalogCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| page | Optional query | Positive integer; defaults to 1. |
| per_page | Optional query | Page size; defaults to 20, maximum 100. |
| category | Optional query | WooCommerce category ID. |
| orderby | Optional query | date, id, title, price or modified; defaults to date. |
| order | Optional query | asc or desc; defaults to desc. |
Returns data plus meta.total, page, per_page and pages. Products are served from the local MySQL sync.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v2/products?page=1&per_page=20'GET/api/v2/products/searchSearch the local catalogCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| q | Required query | Search text; search is accepted as an alias. |
| page | Optional query | Positive integer; defaults to 1. |
| per_page | Optional query | Page size; defaults to 20, maximum 100. |
| category | Optional query | WooCommerce category ID. |
Returns products ordered by relevance. Empty search text returns an empty list.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v2/products/search?q=shirt&page=1&per_page=20'GET/api/v2/products/:idRead a local productCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| id | Required path | WooCommerce product ID. |
Returns a single published product with images, categories and available raw attributes/variation references. Returns 404 when not found.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v2/products/123'GET/api/v2/products/:id/variationsChoose native product sizes and colorsCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| id | Required path | Published, visible WooCommerce parent product ID. |
| page | Optional query | Positive integer; defaults to 1. |
| per_page | Optional query | Page size; defaults to 20, maximum 100. |
Fetches published variations directly from WooCommerce, including variation ID, attributes, selling price, stock and image. Use the chosen variation_id in the order item. Requires WooCommerce read credentials.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v2/products/123/variations?page=1&per_page=20'GET/api/v2/categoriesLoad the complete category listCatalog · optional API key⌄
No request fields required.
Loads every WooCommerce category page, including empty categories. Each item includes id, name, slug, parent, description, image, count and product_count. Cached for 15 minutes. Counts come from WooCommerce; product listings still use the local database.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v2/categories'GET/api/v2/products/latestRecent local updatesCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| page | Optional query | Positive integer; defaults to 1. |
| per_page | Optional query | Page size; defaults to 20, maximum 100. |
| category | Optional query | WooCommerce category ID. |
Sorts by local updated_at descending. This date reflects synchronization, not the original publication date. This v2 route does not currently use Redis response caching.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v2/products/latest?per_page=20'GET/api/v2/products/featuredExisting product selectionCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| per_page | Optional query | Defaults to 20; maximum 100. |
| category | Optional query | WooCommerce category ID. |
Current behavior selects recently updated products on page 1. WooCommerce featured flags are not filtered by this implementation. This v2 route does not currently use Redis response caching.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v2/products/featured?per_page=20'Hiobuy marketplace catalog
Search and inspect supplier products. The configured sandbox key returns mock marketplace data.
POST/api/v1/hiobuy/products/searchSearch marketplace productsCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| channel | Required JSON | 1688 or taobao. |
| keyword | Required JSON | Search term. |
| page / page_size | Optional JSON | Defaults to 1 / 20; Taobao maximum 20 per page, 1688 maximum 100. |
| language | Optional JSON | Defaults to en. |
| category_ids | Optional JSON | Comma-separated numeric 1688 category IDs; supported only with channel 1688. |
Hiobuy returns items, total and pagination inside data. Use items[].id for product detail. Supplier prices retain their supplied currency.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v1/hiobuy/products/search' \
-X POST -H 'Content-Type: application/json' \
--data '{
"channel": "1688",
"keyword": "shirt",
"page": 1,
"page_size": 20,
"language": "en"
}'POST/api/v1/hiobuy/products/detailRead product details and supplier variantsCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| channel | Required JSON | 1688, taobao or weidian. |
| id / product_id / url / mi_id / tao_password | Identifier required | Supply a supported product identifier. Pass an opaque Taobao search ID as id, not product_id. |
| language | Optional JSON | Defaults to en. |
Product information is inside data.product, including available variants. Refresh Taobao IDs before checkout because they can rotate. Retain the supplier URL for manual purchasing.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v1/hiobuy/products/detail' \
-X POST -H 'Content-Type: application/json' \
--data '{
"channel": "1688",
"id": "ID_FROM_SEARCH",
"language": "en"
}'POST/api/v1/hiobuy/products/parseLook up a pasted marketplace linkCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| url | Required JSON | HTTP(S) marketplace product link without embedded credentials. |
| channel | Optional JSON | 1688, taobao or weidian; omit to let Hiobuy detect it. |
| language | Optional JSON | Defaults to en. |
Returns product details inside data.product. For Taobao share text use detail with tao_password instead.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v1/hiobuy/products/parse' \
-X POST -H 'Content-Type: application/json' \
--data '{
"url": "https://detail.1688.com/offer/554456348334.html",
"language": "en"
}'POST/api/v1/hiobuy/products/upload-imageUpload an image for reuseCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| channel | Required JSON | 1688 or taobao. |
| image_base64 | Image input | Required for Taobao; also supported for 1688. Up to 4 MiB decoded. A supported image data-URL prefix is stripped. |
| image_url | Alternative JSON | 1688 only; a public HTTP(S) image URL. |
Returns data.image_id for image search. Replace the example URL with an actual accessible image. Upload responses are not cached; JSON request limit is 6 MiB.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v1/hiobuy/products/upload-image' \
-X POST -H 'Content-Type: application/json' \
--data '{
"channel": "1688",
"image_url": "https://example.com/product.jpg"
}'POST/api/v1/hiobuy/products/search-by-imageFind products using an imageCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| channel | Required JSON | 1688 or taobao. |
| image_id / image_base64 / image_url | Image input required | Reuse an uploaded image ID or provide image data. |
| image_address | Alternative JSON | Existing image URL for 1688 only. |
| page / page_size | Optional JSON | Defaults to 1 / 20; same limits as keyword search. |
| language / keyword / region | Optional JSON | Language defaults to en; keyword refines results; region is a crop-box string. |
Returns the standard Hiobuy product list inside data.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v1/hiobuy/products/search-by-image' \
-X POST -H 'Content-Type: application/json' \
--data '{
"channel": "1688",
"image_id": "ID_FROM_UPLOAD",
"page": 1,
"page_size": 20,
"language": "en"
}'POST/api/v1/hiobuy/products/top-listBrowse a 1688 category rankingCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| channel | Required JSON | 1688 only. |
| rank_id | Required JSON | Ranking/category ID. |
| rank_type | Required JSON | Ranking type, for example hot, complex or goodPrice. |
| limit | Optional JSON | Defaults to 10; range 1–20. |
| language | Optional JSON | Defaults to en. |
Returns Hiobuy ranking data inside data. Ranked item field names can differ from keyword search; adapt the frontend parser.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v1/hiobuy/products/top-list' \
-X POST -H 'Content-Type: application/json' \
--data '{
"channel": "1688",
"rank_id": "10165",
"rank_type": "hot",
"limit": 10,
"language": "en"
}'GET/api/v1/hiobuy/products/channelsCheck marketplace capabilitiesCatalog · optional API key⌄
No request fields required.
Returns the capability information provided by Hiobuy for the configured app/key. Available capabilities and sandbox fixtures depend on the provider.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v1/hiobuy/products/channels'GET/api/v1/hiobuy/categoriesBrowse the official 1688 category treeCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| parent_id | Optional query | Omit for the full tree; use 0 for root nodes without children; another ID returns its direct children. |
Category nodes contain id, name and optional cn/children. Uses the official public category JSON, cached for one day. This is separate from WooCommerce categories.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v1/hiobuy/categories?parent_id=0'Existing China app URLs
Keep the GET URLs already used by your app; their provider is now Hiobuy.
GET/api/v1/china/products/searchExisting app search URLCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| keyword | Required query | q is also accepted. |
| platform | Optional query | Defaults to taobao; channel is an alias. Search supports taobao and 1688. |
| page / size | Optional query | Defaults to 1 / 20; page_size is an alias; Taobao maximum 20. |
| lang | Optional query | Defaults to en; language is an alias. |
| category_ids | Optional query | Comma-separated IDs for 1688 only. |
This URL now calls Hiobuy. The outer success/cached/data wrapper is retained; product data and IDs use the Hiobuy format.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v1/china/products/search?keyword=shirt&platform=1688&size=20'GET/api/v1/china/products/:idExisting app product detail URLCatalog · optional API key⌄
| Field | Where | Details |
|---|---|---|
| id | Required path | URL-encoded Hiobuy product ID. |
| platform | Optional query | Defaults to taobao; supports taobao, 1688 and weidian. channel is an alias. |
| lang | Optional query | Defaults to en; language is an alias. |
Supply the same marketplace used for the search. Former supplier IDs are not interchangeable with Hiobuy IDs.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v1/china/products/ID_FROM_SEARCH?platform=1688'WordPress customer orders
Every route in this section requires the server-only order bridge credential.
POST/api/v2/ordersSend a confirmed wallet order to WordPressTrusted backend only⌄
| Field | Where | Details |
|---|---|---|
| external_order_id | Required JSON | Unique app order reference; preserve across retries. |
| wallet_transaction_id | Required JSON | Unique confirmed wallet transaction reference; cannot fund another order. |
| paid_amount / currency | Required JSON | Positive decimal string and uppercase currency code, for example 25000.00 / NGN. |
| billing / shipping | Required JSON | Objects with first_name, address_1, city and uppercase two-letter country; contact details and other address fields are optional. |
| items | Required JSON | 1–100 items; see the full example and item field table below. |
| shipping_total | Optional JSON | Non-negative decimal string for delivery cost. |
| customer_id | Optional JSON | Positive WooCommerce user ID; omit for a guest order. |
| customer_note | Optional JSON | Customer note, up to 2,000 characters. |
Creates a pending WooCommerce order, compares its calculated total and currency with the confirmed wallet amount, then records payment. First success returns HTTP 201 and order_id; an identical completed retry returns HTTP 200 with duplicate: true. WooCommerce tax/plugin settings can change the final total.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v2/orders' \
-X POST -H 'Content-Type: application/json' \
-H 'X-Order-Bridge-Key: <SERVER_ONLY_KEY>' \
--data '{
"external_order_id": "app-order-1001",
"wallet_transaction_id": "wallet-txn-1001",
"paid_amount": "25000.00",
"currency": "NGN",
"billing": {
"first_name": "Ada",
"last_name": "Example",
"address_1": "1 Example Road",
"city": "Lagos",
"country": "NG",
"email": "customer@example.com"
},
"shipping": {
"first_name": "Ada",
"last_name": "Example",
"address_1": "1 Example Road",
"city": "Lagos",
"country": "NG"
},
"items": [
{
"source": "hiobuy",
"supplier_product_id": "ID_FROM_HIOBUY",
"supplier_url": "https://detail.1688.com/offer/554456348334.html",
"name": "Blue shirt",
"quantity": 2,
"total": "24000.00",
"variant": "Blue / L",
"channel": "1688",
"image": "https://example.com/shirt.jpg"
}
],
"shipping_total": "1000.00"
}'GET/api/v2/ordersList a customer’s WordPress ordersTrusted backend only⌄
| Field | Where | Details |
|---|---|---|
| customer_id | Required query | Positive WooCommerce customer ID; the trusted backend must verify ownership. |
| page / per_page | Optional query | Defaults to 1 / 20; maximum 100 per page. |
| status | Optional query | pending, processing, on-hold, completed, cancelled, refunded or failed. |
Returns data and pagination meta. Guest orders can be retrieved using a known app reference or WordPress order ID through the trusted backend.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v2/orders?customer_id=123&page=1&per_page=20' \
-H 'X-Order-Bridge-Key: <SERVER_ONLY_KEY>'GET/api/v2/orders/:idRead current order details and statusTrusted backend only⌄
| Field | Where | Details |
|---|---|---|
| id | Required path | Positive WooCommerce order ID. |
Returns customer addresses, payment reference, current status and items with selected supplier metadata. Internal order keys and unrelated plugin metadata are excluded. The trusted backend must verify customer ownership.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v2/orders/123' \
-H 'X-Order-Bridge-Key: <SERVER_ONLY_KEY>'GET/api/v2/orders/by-reference/:external_order_idCheck delivery of an app orderTrusted backend only⌄
| Field | Where | Details |
|---|---|---|
| external_order_id | Required path | App reference previously submitted to the bridge. |
Returns external_order_id, delivery_state and the current linked WordPress order. If delivery is uncertain and no WordPress ID is recorded, order is null and reconciliation is required. Returns 404 for an unknown reference.
curl -sS 'https://api.shoponbetterlifeapp.com/api/v2/orders/by-reference/app-order-1001' \
-H 'X-Order-Bridge-Key: <SERVER_ONLY_KEY>'Catalog administration
Administrative sync tools. These routes should be restricted to your server or trusted operators.
GET/api/admin/sync/statusInspect catalog synchronizationServer / admin⌄
No request fields required.
Returns persistent WooCommerce sync state from MySQL. Use from server/admin tools.
curl -sS 'https://api.shoponbetterlifeapp.com/api/admin/sync/status'POST/api/admin/sync/woocommerceTrigger a catalog syncServer / admin⌄
| Field | Where | Details |
|---|---|---|
| max_pages | Optional JSON | Positive integer page limit; omitted runs a full sync. |
Runs the sync inside the HTTP request. For large catalogs, use node scripts/sync-woocommerce.js through CLI/cron. Restrict these admin routes at the proxy/network layer; they currently share optional API_KEY authentication with catalog routes.
curl -sS 'https://api.shoponbetterlifeapp.com/api/admin/sync/woocommerce' \
-X POST -H 'Content-Type: application/json' \
--data '{
"max_pages": 2
}'Existing app URLs remain available
Use the same method and request shape unless the alias notes otherwise.
| Current endpoint | Alias |
|---|---|
| /api/v2/products | /api/v1/shop/products |
| /api/v2/products/search | /api/v1/shop/search |
| /api/v2/products/:id | /api/v1/shop/products/:id |
| /api/v2/products/:id/variations | /api/v1/shop/products/:id/variations |
| /api/v2/products/latest | /api/v1/shop/products/latest |
| /api/v2/products/featured | /api/v1/shop/products/featured |
| /api/v2/categories | /api/v1/shop/categories |
| /api/v1/hiobuy/* | /api/v1/china/* (same methods and bodies) |
GET China routes accept platform/size/lang as aliases for channel/page_size/language. Their payloads now contain Hiobuy data. Old supplier IDs must be refreshed through Hiobuy.
Response shapes and errors
Inspect HTTP status, success, code and upstream_code where present.
Catalog response
{
"success": true,
"cached": false,
"data": {
"channel": "1688",
"items": [],
"total": 0,
"page": 1,
"page_size": 20
}
}Hiobuy fields are nested inside data. Native WooCommerce lists return a data array and a separate meta object. Some v2 selection routes omit cached. Hiobuy selling prices are returned in NGN at ₦220/CNY plus 70% markup by default. Use selling_price.amount/currency or price.display_amount/display_currency. The supplier originals remain in CNY. Edit CNY_NGN_RATE and HIOBUY_MARKUP_PERCENT in .env, then restart the API.
Order submission response
{
"success": true,
"data": {
"duplicate": false,
"order_id": 123,
"status": "processing",
"total": "25000.00",
"currency": "NGN"
}
}WooCommerce controls the resulting status. Order retrieval returns current WordPress information; an identical completed submission retry returns the saved delivery result.
Supplier authentication error
{
"success": false,
"error": "Hiobuy request failed (401)",
"code": "UPSTREAM_ERROR",
"upstream_code": "CHANNEL_NOT_AUTHORIZED",
"request_id": "req_example"
}INVALID_API_KEY identifies a rejected key. CHANNEL_NOT_AUTHORIZED identifies missing marketplace authorization. Preserve request_id when contacting provider support.
| HTTP | Code | Action / meaning |
|---|---|---|
| 400 | INVALID_REQUEST | Check required fields, marketplace, pagination or image input. |
| 401 | Unauthorized | Missing/wrong bridge key, or optional BetterLife API key when configured. |
| 404 | CATEGORY_NOT_FOUND / ORDER_NOT_FOUND / PRODUCT_NOT_FOUND | Resource is unavailable. Local product 404 responses may omit a code. |
| 409 | ORDER_CONFLICT / PAYMENT_ALREADY_USED / ORDER_BUSY | Reused reference with changed details, reused wallet transaction, or submission in progress. |
| 409 | PAYMENT_TOTAL_MISMATCH / PAYMENT_CONFLICT | WordPress total/currency differs from payment, or payment reference conflicts. Review the payment and order. |
| 409 | ORDER_REQUIRES_REVIEW | Unknown delivery outcome or cancelled/refunded/failed order. Reconcile before retrying. |
| 429 | UPSTREAM_ERROR | Supplier rejected the request due to rate/quota limits. Inspect upstream_code. |
| 502 | UPSTREAM_ERROR / INVALID_UPSTREAM_RESPONSE | Supplier/WordPress rejected a request or returned invalid data. |
| 502 | PAYMENT_NOT_RECORDED | WooCommerce has not confirmed the payment; review or retry the unchanged submission. |
| 502 / 504 | UPSTREAM_UNAVAILABLE | Connection failure or timeout. Avoid blindly repeating uncertain order creation. |
| 503 | NOT_CONFIGURED | Required supplier, WordPress or order-bridge credentials are missing. |
Connect each call to the right layer
Discovery belongs in the app. Confirmed payments and private order access belong in your trusted backend.
Frontend: render Hiobuy search cards
const API_BASE = 'https://api.shoponbetterlifeapp.com';
async function searchChinaProducts(keyword) {
const query = new URLSearchParams({
keyword, platform: '1688', size: '20', lang: 'en'
});
const response = await fetch(`${API_BASE}/api/v1/china/products/search?${query}`);
const result = await response.json();
if (!response.ok || !result.success) throw new Error(result.error || 'Search failed');
return (result.data.items || []).map(product => ({
id: product.id,
name: product.title?.translated || product.title?.original || '',
image: product.image,
supplierUrl: product.source_url,
price: product.selling_price?.amount,
currency: product.selling_price?.currency,
supplierAmount: product.price?.original_amount,
supplierCurrency: product.price?.original_currency
}));
}Display price and currency to customers. Supplier values remain available for purchasing. Load product detail to select data.product.variants; each variant has its own selling_price. The trusted wallet backend must calculate final totals from the selected SKU, quantity, shipping and tax.
Backend: deliver the confirmed order
// Trusted backend only, after validating the user and wallet debit.
// confirmedOrder contains the documented order payload and final selling totals.
const response = await fetch(`${process.env.BETTERLIFE_API_URL}/api/v2/orders`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Order-Bridge-Key': process.env.ORDER_BRIDGE_KEY
},
body: JSON.stringify(confirmedOrder)
});
const result = await response.json();
if (!response.ok || !result.success) {
// Retain the debit + order reference and handle retry/reconciliation.
throw new Error(result.code || result.error);
}
const wordpressOrderId = result.data.order_id;BETTERLIFE_API_URL is a setting in your calling backend. Keep the bridge secret there and on the API server. The backend must enforce customer ownership for every order read.
Deploy and verify through SSH
Back up the live files and database, then preserve your production .env during updates.
- Upload the endpoint bundle into
/www/wwwroot/api.shoponbetterlifeapp.com/. - Import
database/migrations/001_order_submissions.sqlinto the existing API database once, if not already done. Do not reimport the catalog schema. - Keep valid WooCommerce credentials, a Hiobuy test key and a server-only order bridge key.
- Run the checks and restart the systemd service.
cd /www/wwwroot/api.shoponbetterlifeapp.com/
node --test tests/*.test.js
systemctl restart betterlife-api.serviceWait until Node is listening, then run:
node scripts/test-api.jsThe smoke check reads health, categories and supplier data. Its empty order payload verifies authentication/validation without creating an order or deducting wallet money. It does not verify WordPress write permission or actual checkout delivery.
For a real order test, use a test WooCommerce store and the documented POST order payload, then inspect WooCommerce → Orders. Retry the same payload and confirm that the order ID stays the same.