Jiffoo Docs

API Reference

Jiffoo Mall API documentation

API Reference

Detailed API Documentation

For comprehensive guides with code examples and detailed explanations, see our detailed API documentation:

  • Authentication API - User registration, login, JWT tokens, and session management
  • Products API - Browse marketplace, purchase products, and manage licenses
  • Cart API - Shopping cart management and checkout flow
  • Orders API - Order creation, tracking, and fulfillment
  • Payments API - Payment processing, webhooks, and refunds

Interactive Documentation

The complete API documentation is available via:

Base URL

https://api.yourdomain.com/api

Authentication

Most endpoints require JWT Bearer token:

Authorization: Bearer <jwt-token>

Quick Reference

Authentication

View detailed Authentication API documentation →

MethodEndpointDescription
POST/auth/registerUser registration
POST/auth/loginUser login
GET/auth/meGet current user
POST/auth/refreshRefresh token
POST/auth/logoutLogout

Products

View detailed Products API documentation →

MethodEndpointDescription
GET/productsList products
GET/products/:idGet product
POST/admin/productsCreate product
PUT/admin/products/:idUpdate product
DELETE/admin/products/:idDelete product

Cart

See OpenAPI Explorer for the complete and up-to-date list. View detailed Cart API documentation →

MethodEndpointDescription
GET/cartGet cart
POST/cart/addAdd to cart
PUT/cart/updateUpdate quantity
DELETE/cart/remove/:itemIdRemove item
DELETE/cart/clearClear cart

Orders

View detailed Orders API documentation →

MethodEndpointDescription
POST/ordersCreate order
GET/ordersList orders
GET/orders/:idGet order

Payments

View detailed Payments API documentation →

MethodEndpointDescription
GET/payments/available-methodsGet payment methods
POST/payments/create-sessionCreate payment session

Response Format

Success Response

{
  "success": true,
  "data": { "..." : "..." },
  "message": "optional"
}

Error Response

{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "Human readable error",
    "details": { "optional": "any JSON" }
  }
}

Error Codes

StatusDescription
400Bad Request
401Unauthorized
403Forbidden
404Not Found
429Rate Limited
500Server Error

Rate Limiting

API requests are rate limited:

  • Anonymous: 100 requests/minute
  • Authenticated: 1000 requests/minute
  • Admin: 5000 requests/minute

OpenAPI Specification

Download the OpenAPI spec:

  • JSON: /openapi.json

On this page