Admin API Reference
Manage your store programmatically with our robust Admin REST API.
📋 Base URL
https://api.iws-commerce.com/v1
Authentication
Authenticate your requests by including your API key in the Authorization header.
Authorization: Bearer YOUR_API_KEY You can generate API keys from your dashboard under Settings → API Keys.
Products API
List All Products
Retrieve a paginated list of all products in your store.
GET
/products Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Items per page (default: 50, max: 250) |
status | string | Filter by status: active, draft, archived |
Example Request
curl -X GET "https://api.iws-commerce.com/v1/products?page=1&limit=10" \
-H "Authorization: Bearer YOUR_API_KEY" Example Response
{
"data": [
{
"id": "prod_123abc",
"title": "Organic Cotton T-Shirt",
"description": "Comfortable and sustainable",
"price": 2500,
"currency": "BDT",
"status": "active",
"inventory": {
"quantity": 150,
"sku": "TSHIRT-ORG-001"
},
"images": [
{
"url": "https://cdn.iws-commerce.com/products/tshirt-001.jpg",
"alt": "Organic Cotton T-Shirt"
}
],
"created_at": "2023-12-01T10:30:00Z",
"updated_at": "2023-12-05T14:20:00Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 245,
"pages": 25
}
} Create a Product
Add a new product to your store.
POST
/products Example Request
curl -X POST "https://api.iws-commerce.com/v1/products" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Eco-Friendly Water Bottle",
"description": "Reusable stainless steel water bottle",
"price": 2500,
"currency": "BDT",
"inventory": {
"quantity": 100,
"sku": "BOTTLE-ECO-001"
}
}' Orders API
List All Orders
Retrieve all orders from your store.
GET
/orders Example Response
{
"data": [
{
"id": "order_456def",
"order_number": "IWS-1001",
"customer": {
"id": "cust_789ghi",
"email": "customer@example.com",
"name": "John Doe"
},
"items": [
{
"product_id": "prod_123abc",
"title": "Organic Cotton T-Shirt",
"quantity": 2,
"price": 2500
}
],
"subtotal": 5000,
"tax": 500,
"shipping": 100,
"total": 5600,
"status": "processing",
"payment_status": "paid",
"created_at": "2023-12-07T09:15:00Z"
}
]
} Rate Limiting
Our API has rate limits to ensure stability. Limits are applied per API key.
X-RateLimit-Limit Total requests allowed per hour X-RateLimit-Remaining Requests remaining in current window X-RateLimit-Reset Time when the rate limit resets (Unix timestamp) Error Handling
The API uses standard HTTP status codes to indicate success or failure.
{
"error": {
"code": "invalid_request",
"message": "The 'price' field is required",
"details": {
"field": "price",
"type": "required"
}
}
} ⚠️ Security Warning
Never share your Admin API keys or include them in client-side code.