Internal testing

Shopify Order Status AI Agent

A lightweight REST endpoint that fetches a Shopify order through the Admin API and rewrites it as a single plain-English sentence. The endpoint is guarded by a per-tenant bearer API key (Authorization: Bearer <key>); mint one with mintApiKey and paste its SHA-256 hash (never the plaintext) into SHOPIFY_ORDER_STATUS_BOOTSTRAP_KEYS or the ApiKey table.

Shopify Order Status Tester
Hits /api/shopify/order-status/[orderId] with a per-tenant bearer API key and renders the LLM-generated status line.

Submit a real order id to see the LLM-generated status line.

curl equivalent

curl \
  -H "Authorization: Bearer $SHOPIFY_ORDER_STATUS_API_KEY" \
  http://localhost:3000/api/shopify/order-status/<orderId>

Without the header the route returns 401 (unauthorized); with no keys configured (env empty AND DB empty) it returns 503 (auth_not_configured) so a half-configured deploy does not accidentally expose customer order data. A successful response carries an x-tenant-id header so downstream tooling can verify scoping.