Build with Dtail.
Read your catalogue and receive signed events. Server-to-server only; keep API keys and webhook secrets out of browsers.
Authentication
Create a key in Settings → Developers. The secret is shown once and stored as a hash. Send it as a Bearer token:
curl https://beta.dtailhq.com/api/v1/products \ -H "Authorization: Bearer dtk_..."
API keys are scoped to one workspace. Revoke a key from the same page; requests fail immediately after revocation.
Products API
GET /api/v1/products returns up to 100 active products with their active variants.
{
"data": [{
"id": "cm...",
"name": "Cooking Oil 1L",
"brand": "Golden Drop",
"variants": [{
"sku": "OIL-001",
"sellingPrice": "48.0000",
"trackInventory": true
}]
}],
"meta": { "count": 1, "limit": 100, "business": "your-shop" }
}
Decimal values are strings to preserve precision. This endpoint is read-only today; write endpoints are next.
Webhooks
Add an HTTPS endpoint in Settings → Developers and choose events. Dtail POSTs JSON with these headers:
X-Dtail-Event: order.created X-Dtail-Timestamp: 1795946400 X-Dtail-Signature: sha256=<hex>
Available events: order.created, order.confirmed, order.fulfilled, sale.completed, invoice.issued, storefront.order.created, storefront.order.confirmed.
Return any 2xx response to acknowledge. Treat delivery as at-least-once and make your handler idempotent using the event payload's order or sale ID.
Verify signatures
The signature is an HMAC-SHA256 of timestamp + "." + rawBody using your endpoint secret. Reject timestamps older than five minutes to prevent replay.
const expected = createHmac("sha256", secret)
.update(`${timestamp}.${rawBody}`)
.digest("hex");
// compare with X-Dtail-Signature after "sha256="
Use a constant-time comparison. If a delivery fails, the endpoint's last error is shown in Developers settings.
Rate limits
The products endpoint allows 60 requests per minute per key. Exceeding it returns 429 with a Retry-After header.
Errors
401— missing, invalid or revoked API key.429— rate limit exceeded.5xx— retry with backoff; do not retry4xx.
Webhook setup help: sales@dtailhq.com.
Need a higher limit?
Tell us what you are building and we will look at the integration.
Contact sales