WooCommerce plugin
A ready-made .zip with the buyer's key and schedule already inside.
- Imports products, images and buyer prices
- Signed real-time stock webhooks
- Routes each product to the right distributor
DeimOS Connect
Each retailer has a hashed key, an assortment, and six routes. This page is the contract in sentences. The machine file is OpenAPI 3.1.
Turnkey store connectors
Your buyers install one pre-configured package. Catalog, stock and prices sync on their own, and retail orders come back as clean purchase orders.
A ready-made .zip with the buyer's key and schedule already inside.
Connect with an Admin API token and one order webhook.
Auth
Authorization: Bearer carries a per-buyer secret. We store a hash. The tenant sees a prefix. Rotate writes a new row and revokes the old one. A revoked key, or a buyer that is not active, is 401.
The address ceiling is 300 requests a minute. The channel has its own limit on top. POST /v1/orders without an Idempotency-Key is 400 before the bearer is read.
GET /v1/productsAuthorization: Bearer dei_...
200
{
"products": [{
"sku": "AB-100",
"currency": "EUR",
"net_minor": 450,
"stock": 12,
"available": true
}],
"next_cursor": null
}HTTP
Every route is scoped to one buyer key. Copy a path straight into your client.
/v1/productsCatalog for this key, 50 at a time. The cursor is opaque. A bad cursor is 400.
products:read/v1/products/{sku}One product. 404 when it is outside the assortment.
products:read/v1/stockQuantity under the channel rule: count, available, threshold, or hide zero.
stock:read/v1/pricesNet price in minor units from the assigned price list.
prices:read/v1/ordersIdempotency-Key required. Unknown SKU is 400. The same key replays as 200. A new order is 201.
orders:write/v1/orders/{id}An order that belongs to this channel. Any other id is 404.
orders:readStatus
Seven codes, each with one meaning. Build your retry logic on these.
New order.
Same Idempotency-Key. The original order comes back.
Missing Idempotency-Key, a key longer than 256 characters, invalid JSON, unknown SKU, bad cursor, or a body over 100,000 bytes.
Missing, unknown, or revoked key, or a buyer that is not active.
SKU or order outside this channel.
That external id is already stored under a different Idempotency-Key.
Over 300 requests a minute from one IP, or over the channel limit.
Webhooks
The signature is HMAC-SHA256 of the timestamp, a dot, and the raw body. The header value starts with sha256=. Delivery id, event, and timestamp are on the request. Failures back off, then the endpoint disables. The tenant can replay.
There is no order.received. The shop already has the POST response. Status after that is the event that matters.
Click an event to copy its name.
Starter kit
cURL, Node.js, PHP, and a WooCommerce plugin that call the live Buyer API. Set the host and a key, then copy a snippet or download a zip. The examples call GET /v1/products with next_cursor, poll stock and prices, and verify X-Deimos-Signature.
Auth, catalog pages, stock and price polls, and a check of the webhook signature. Requires curl, jq, and openssl for the looped examples.
# GET /v1/products is a signed-in first page. A missing or revoked key is 401.
curl -sS \
-H 'Authorization: Bearer dei_replace_me' \
-H 'Accept: application/json' \
'https://deimosb2b.com/v1/products'
# There is no separate delta route. Page GET /v1/products with the opaque next_cursor.
# Incremental changes arrive as product.upserted, stock.changed, and price.changed webhooks.
BASE='https://deimosb2b.com'
AUTH='Authorization: Bearer dei_replace_me'
curl -sS -H "$AUTH" -H 'Accept: application/json' "$BASE/v1/products"
# When next_cursor is a string, request the next page:
# curl -sS -H "$AUTH" -H 'Accept: application/json' "$BASE/v1/products?cursor=CURSOR"
cursor=""
while :; do
if [ -n "$cursor" ]; then
url="$BASE/v1/products?cursor=$(printf '%s' "$cursor" | jq -sRr @uri)"
else
url="$BASE/v1/products"
fi
page=$(curl -sS -H "$AUTH" -H 'Accept: application/json' "$url")
printf '%s\n' "$page"
cursor=$(printf '%s' "$page" | jq -r '.next_cursor // empty')
[ -z "$cursor" ] && break
done
# GET /v1/stock returns sku, stock, available. GET /v1/prices returns sku, currency, net_minor, moq, and tiers.
# Money is integer minor units. Add ?sku=AB-100 to read one row. A SKU outside the assortment is 404.
BASE='https://deimosb2b.com'
AUTH='Authorization: Bearer dei_replace_me'
curl -sS -H "$AUTH" -H 'Accept: application/json' "$BASE/v1/stock"
curl -sS -H "$AUTH" -H 'Accept: application/json' "$BASE/v1/prices"
curl -sS -H "$AUTH" -H 'Accept: application/json' "$BASE/v1/stock?sku=AB-100"
curl -sS -H "$AUTH" -H 'Accept: application/json' "$BASE/v1/prices?sku=AB-100"
# Signature is HMAC-SHA256 of "{unix timestamp}.{raw body}".
# Header: X-Deimos-Signature: sha256=<hex>
# Also sent: X-Deimos-Event, X-Deimos-Id, X-Deimos-Timestamp, User-Agent: DeimOS-Webhooks
SECRET='whsec_replace_me'
TIMESTAMP=$DEIMOS_TIMESTAMP # value of X-Deimos-Timestamp
BODY_FILE='body.json'
SIGNATURE=$DEIMOS_SIGNATURE # value of X-Deimos-Signature
expected="sha256=$(printf '%s.' "$TIMESTAMP" | cat - "$BODY_FILE" | openssl dgst -sha256 -hmac "$SECRET" -hex | awk '{print $NF}')"
# Compare $expected to $SIGNATURE in a language with a constant-time equality check.
# Events: product.upserted, stock.changed, price.changed, assortment.changed,
# order.accepted, order.rejected, order.fulfilled, order.cancelled.
# There is no order.received event.
printf '%s\n' "$expected"
ERP
Accept writes the order as XML or as a semicolon CSV, and can POST that document to a URL you set. A status file can mark it fulfilled or cancelled. Later ERP maps read the same orders. They do not become a second database.
Pilot
Request a pilot and we review it by hand. Approved pilots get a 7-day workspace.