Litekart API Documentation
Litekart provides a comprehensive set of RESTful APIs that allow you to integrate with the platform programmatically. Our APIs follow REST principles and return JSON responses.
Overview
Our API endpoints are organized into several categories to make integration easier:
Core API Categories
- Order Management API - Manage orders, carts, payments, and shipments
- Product Management API - Manage products, categories, brands, and inventory
- User Management API - Manage customers, vendors, and user roles
- Settings API - Configure store settings, currencies, taxes, and more
- Notification API - Handle email and SMS notifications
- Webhook API - Receive real-time updates via webhooks
Getting Started
To begin using the Litekart APIs:
Obtain API Credentials
- Log into your Litekart admin panel
- Navigate to Settings > API Keys
- Generate a new API key
Authentication
- Include the API key in the Authorization header
- Format:
Authorization: Bearer YOUR_API_KEY
Make API Calls
- Use HTTPS for all API requests
- Base URL:
https://your-store-domain.com/api/ - All responses are in JSON format
Authentication Example
bash
curl -X GET "https://your-store.com/api/products" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Rate Limiting
- API requests are limited to prevent abuse
- Default limits: 1000 requests per hour per API key
- Check response headers for current usage:
X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset
Error Handling
All API errors follow a consistent format:
json
{
"error": {
"code": "INVALID_REQUEST",
"message": "The request parameters are invalid",
"details": {
"field": "email",
"issue": "Email format is invalid"
}
}
}Common HTTP Status Codes
200- Success201- Created400- Bad Request401- Unauthorized403- Forbidden404- Not Found429- Too Many Requests500- Internal Server Error
SDKs and Libraries
While you can make direct HTTP requests to our APIs, we also provide official SDKs:
- JavaScript/TypeScript SDK - For Node.js and browser applications
- PHP SDK - For PHP-based applications
- Python SDK - For Python applications
Webhooks
Set up webhooks to receive real-time notifications about events in your store:
- Order created/updated
- Payment completed
- Inventory changes
- Customer registrations
API Reference
For detailed endpoint documentation, visit our Interactive API Reference.
Support
Need help with API integration?
- Check our Developer Guides
- Visit our Community Forum
- Contact Developer Support