API Endpoints Reference

Complete reference of all available API endpoints organized by resource type.

Frequently Asked Questions

What API endpoints are available for products?

Use GET /api/v1/user/products to get a list of products with query parameters: page (page number, default: 1), per_page (items per page, default: 20), category (filter by category), search (search term), status (filter by status: active, draft). Use GET /api/v1/user/products/:id to get a single product by ID.

How do I create an order using the API?

Use POST /api/v1/user/orders with request body containing items array (with product_id, quantity, price), shipping_address object (with name, address, city, zip), and payment_method (wallet, credit_card, paypal, etc.). The API returns order details including order ID and status.

What API endpoints are available for user authentication?

Use POST /api/v1/user/auth/signup for user registration (includes email, password, name, etc.). Use POST /api/v1/user/auth/login for user login (returns JWT token for authenticated requests). Use GET /api/v1/user/account/profile to get user profile information (requires authentication token).

How do I download files using the API?

Use GET /api/v1/user/files to get a list of available files. Use GET /api/v1/user/download-file?file_id=:id to download a specific file. Some files may require authentication and an active download package. The API returns download links or file data depending on file type.

What HTTP status codes does the API return?

Success codes: 200 (OK), 201 (Created), 204 (No Content). Error codes: 400 (Bad Request), 401 (Unauthorized - invalid API key or token), 404 (Not Found), 429 (Rate Limited - too many requests), 500 (Server Error). Always check the response status before processing data.

Products Endpoints

Get Products

GET /api/v1/user/products

Query Parameters:

  • page - Page number (default: 1)
  • per_page - Items per page (default: 20)
  • category - Filter by category
  • search - Search term
  • status - Filter by status (active, draft)

Get Single Product

GET /api/v1/user/products/:id

Orders Endpoints

Create Order

POST /api/v1/user/orders

Request Body:

{
  "items": [
    {
      "product_id": 123,
      "quantity": 2,
      "price": 99.99
    }
  ],
  "shipping_address": {
    "name": "John Doe",
    "address": "123 Main St",
    "city": "New York",
    "zip": "10001"
  },
  "payment_method": "wallet"
}

Get Orders

GET /api/v1/user/account/orders

Get Order Details

GET /api/v1/user/account/orders/:orderId

User & Authentication Endpoints

User Registration

POST /api/v1/user/auth/signup

Request body includes: email, password, name, etc.

User Login

POST /api/v1/user/auth/login

Returns JWT token for authenticated requests.

Get User Profile

GET /api/v1/user/account/profile

Files & Downloads Endpoints

Get Files

GET /api/v1/user/files

Download File

GET /api/v1/user/download-file?file_id=:id

Cart Endpoints

Get Cart

GET /api/v1/user/cart

Add to Cart

POST /api/v1/user/cart

Response Codes

Success Codes

  • 200 - OK
  • 201 - Created
  • 204 - No Content

Error Codes

  • 400 - Bad Request
  • 401 - Unauthorized
  • 404 - Not Found
  • 429 - Rate Limited
  • 500 - Server Error

Related Guides