Skip to main content

Introduction

Welcome to the Ecom e-commerce platform API documentation. This API allows you to build mobile and web applications that interact with the Ecom platform.

Base URL

All API requests should be made to:
https://your-domain.com/api/v2

API Version

The current API version is v2. All endpoints are prefixed with /api/v2.

Request Format

  • All requests should be made over HTTPS
  • Request body should be in JSON format or form-data
  • Set appropriate Content-Type header:
    • application/json for JSON requests
    • multipart/form-data for file uploads

Response Format

All API responses are returned in JSON format with the following structure:

Success Response

{
  "result": true,
  "message": "Success message",
  "data": {}
}

Error Response

{
  "result": false,
  "message": "Error message"
}

HTTP Status Codes

Status CodeDescription
200Success
401Unauthorized - Invalid or missing authentication
404Not Found - Resource doesn’t exist
422Validation Error
500Server Error

Pagination

Many list endpoints support pagination with the following parameters:
page
integer
default:"1"
Page number
per_page
integer
default:"10"
Items per page
Paginated responses include:
{
  "data": [],
  "current_page": 1,
  "last_page": 5,
  "per_page": 10,
  "total": 50
}

Rate Limiting

API requests are rate-limited to prevent abuse. If you exceed the rate limit, you’ll receive a 429 status code.

Language Support

The API supports multiple languages. Include the language preference in your requests:
Accept-Language
string
default:"en"
Language code (e.g., en, es, fr)

Error Handling

The API uses standard HTTP status codes and returns detailed error messages to help you debug issues.

Next Steps

Authentication

Learn how to authenticate with the API

Products

Browse and search products

Cart

Manage shopping cart

Orders

Create and manage orders

Build docs developers (and LLMs) love