API Reference
Hajatek API
Build powerful integrations with Hajatek. Manage your store, products, orders, and customers programmatically.
Getting Started
Base URL
https://api.hajatek.com/v1Authentication
Use your API key from the dashboard. Send it as a Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEYRate Limiting
Request limits depend on your plan:
Starter
100 requests/min
Pro
500 requests/min
Business
Unlimited
Response Format
All responses return JSON with Content-Type: application/json header.
Core Endpoints
GET
/stores/{store_id}Get store information
GET
/productsList products
Query Params:
page, limit, category, searchPOST
/productsCreate a new product
PUT
/products/{id}Update a product
DELETE
/products/{id}Delete a product
GET
/ordersList orders
Query Params:
status, page, limitGET
/orders/{id}Get order details
PUT
/orders/{id}/statusUpdate order status
GET
/customersList customers
GET
/analytics/summaryGet store analytics
Webhooks
Receive real-time notifications when events occur in your store. Register a URL in your dashboard to receive automatic POST requests.
Available Events
order.createdWhen a new order is createdorder.updatedWhen an order is updatedpayment.completedWhen a payment is completedproduct.createdWhen a new product is createdinventory.lowWhen inventory is running lowWebhook Payload Example
{
"id": "evt_1234567890",
"type": "order.created",
"created_at": "2026-03-15T12:00:00Z",
"data": {
"order_id": "ord_abc123",
"store_id": "str_xyz789",
"total": 299.99,
"currency": "SAR",
"status": "pending",
"items": [
{
"product_id": "prod_001",
"name": "Premium Widget",
"quantity": 2,
"price": 149.99
}
]
}
}Signature Verification
Every webhook request includes an X-Hajatek-Signature header containing an HMAC-SHA256 signature. Verify the signature using your webhook secret key to ensure the request is authentic.
X-Hajatek-Signature: sha256=a1b2c3d4e5f6...Code Examples
cURL
curl -X GET "https://api.hajatek.com/v1/products?page=1&limit=10" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"JavaScript / Node.js
const response = await fetch(
"https://api.hajatek.com/v1/products?page=1&limit=10",
{
method: "GET",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
}
);
const data = await response.json();
console.log(data.products);Python
import requests
response = requests.get(
"https://api.hajatek.com/v1/products",
params={"page": 1, "limit": 10},
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
)
data = response.json()
print(data["products"])AI Agent Integration
Connect your store to AI agents like Claude and ChatGPT via the MCP protocol.