API Reference
Complete REST API, MCP tools, and webhook documentation for zalink.ai
Base URL
https://api.zalink.aiAuthentication
All API requests require authentication. Include your API key as a Bearer token in the Authorization header. For OAuth flows, redirect users to the platform authorization URL.
Bearer Token
Authorization: Bearer YOUR_API_KEYOAuth 2.0 Flow
- 1.Redirect to /oauth/connect/:platform with state param
- 2.User authorizes on the platform
- 3.Callback received at /oauth/callback/:platform
- 4.Tokens stored and encrypted server-side
Code Examples
curl -X GET "https://api.zalink.ai/api/stores/STORE_ID/products?limit=10" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
REST Endpoints
Store
/api/stores/:idGet store details and connection status
/api/stores/:id/settingsUpdate store settings (business, shipping, tax, AI)
Products
/api/stores/:id/productsList products with pagination and filters
/api/stores/:id/products/:productIdGet a single product by ID
Orders
/api/stores/:id/ordersList orders with date range and status filters
/api/stores/:id/orders/:orderIdGet order details including line items
Customers
/api/stores/:id/customersList customers with search and pagination
/api/stores/:id/customers/:customerIdGet customer profile and order history
Cart
/api/stores/:id/cartCreate a new cart with items
/api/stores/:id/cart/:cartIdUpdate cart items or apply coupons
/api/stores/:id/cart/:cartIdDelete a cart
Analytics
/api/stores/:id/analytics/realtimeReal-time visitors, active carts, and revenue
/api/stores/:id/analytics/dailyDaily aggregated sales and traffic metrics
/api/stores/:id/analytics/productsTop products by views, sales, and revenue
/api/stores/:id/analytics/customersCustomer acquisition and retention data
/api/stores/:id/analytics/aiAI interaction metrics and conversion rates
Promotions
/api/stores/:id/promotionsList all promotions
/api/stores/:id/promotionsCreate a new promotion or coupon
/api/stores/:id/promotions/:promoIdUpdate an existing promotion
/api/stores/:id/promotions/:promoIdDelete a promotion
MCP Tools
Model Context Protocol tools available for AI assistants like Claude.
Public API (ACP)
Agentic Commerce Protocol endpoints for ChatGPT and other AI agents.
/acp/stores/:idStore info and capabilities
/acp/stores/:id/products/searchSearch products with filters
/acp/stores/:id/cartCreate cart for checkout
/acp/stores/:id/checkoutGenerate checkout URL
Webhook Events
Events dispatched to your registered webhook URL.
Error Codes
| Code | Name | Description |
|---|---|---|
| 400 | Bad Request | Invalid parameters or request body |
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | Insufficient permissions for this resource |
| 404 | Not Found | Resource does not exist |
| 429 | Too Many Requests | Rate limit exceeded, retry after cooldown |
| 500 | Server Error | Internal error, contact support if persistent |
Rate Limits
Limits are enforced per API key. Headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.
| Endpoint | Limit |
|---|---|
| Dashboard API | 100 req/min |
| OAuth Endpoints | 20 req/min |
| MCP Endpoints | 100 req/min |
| ACP Endpoints | 100 req/min |
| Webhook Handlers | 200 req/min |