Skip to content

Tutorial

A fast guided onboarding path for API customers. If you already know you need the first-order flow, jump straight to the docs start-here section and reuse the same steps there.

Shortest path: check the API is up, seed a demo catalog, create your first order.
Check the API is up Call GET /health — no key needed — then bring your oc_live_... key.
Seed a demo catalog Run POST /v1/onboarding/demo-data, then resolve sample_customer_id and sample_order_item.sku_id.
Create your first order Call POST /v1/orders with an Idempotency-Key so an agent retry returns the same order instead of a duplicate.

Step 1 — check the API is up

terminal
# GET /health
curl -sS https://api.ordercore.ai/health

A 200 confirms the API is reachable. This call needs no API key.

Step 2 — seed a demo catalog

terminal
export API_KEY="oc_live_..."
# POST /v1/onboarding/demo-data
SEED_JSON="$(curl -X POST 'https://api.ordercore.ai/v1/onboarding/demo-data' \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}')"

CUSTOMER_ID="$(printf '%s' "$SEED_JSON" | jq -r '.sample_customer_id // empty')"
SKU_ID="$(printf '%s' "$SEED_JSON" | jq -r '.sample_order_item.sku_id // empty')"

test -n "$CUSTOMER_ID" || { echo "No sample_customer_id returned by onboarding"; exit 1; }
test -n "$SKU_ID" || { echo "No sample_order_item.sku_id returned by onboarding"; exit 1; }

This removes SKU guessing and keeps the first order deterministic.

Step 3 — create your first order (idempotent)

terminal
# POST /v1/orders
curl -X POST "https://api.ordercore.ai/v1/orders" \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: first-order-001" \
  -d "{\"customer_id\":\"$CUSTOMER_ID\",\"items\":[{\"sku_id\":\"$SKU_ID\",\"quantity\":1}]}"

After this flow you will have a real order in the system, a working API call, and a clear go/no-go decision.

Optional — order lifecycle: move the new order from pending to confirmed with POST /v1/orders/{orderID}/confirm. Repeating the call is safe.

Built for real systems: idempotent order creation, retry-safe APIs, webhook-driven integrations.

No store, no UI, no checkout flow needed. Just API.

First order works? Take it to production.

Once the idempotent order call succeeds, you are ready for the assisted pilot. Outbound checkout.completed webhooks are configured separately — see the webhooks guide.

Start 3-Day Trial

Video walkthroughs