Skip to content

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:

  1. Obtain API Credentials

    • Log into your Litekart admin panel
    • Navigate to Settings > API Keys
    • Generate a new API key
  2. Authentication

    • Include the API key in the Authorization header
    • Format: Authorization: Bearer YOUR_API_KEY
  3. 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-Limit
    • X-RateLimit-Remaining
    • X-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 - Success
  • 201 - Created
  • 400 - Bad Request
  • 401 - Unauthorized
  • 403 - Forbidden
  • 404 - Not Found
  • 429 - Too Many Requests
  • 500 - 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?