ZeroStock API

Programmatic access to the ZeroStock marketplace. Search products, create orders, manage your store inventory — all via REST API.

Base URL: https://your-domain.com/api/v1Rate Limit: 100 req/min

Authentication

All requests require the X-Api-Key header.

HEADERX-Api-Key: zs_your_api_key_hereAuth Header

Include this header in every request. Generate keys in Dashboard → API.

Products

Browse and search products in the marketplace.

GET/api/v1/productsList Products

Search products with filters.

Query Parameters:

searchcategoryIdminPricemaxPriceformatpagelimit

Example:

curl -H "X-Api-Key: zs_xxx" "https://your-domain.com/api/v1/products?search=telegram&minPrice=5&maxPrice=50&page=1&limit=20"
GET/api/v1/products/:idGet Product

Get product details (price, stock, description, guarantee).

Example:

curl -H "X-Api-Key: zs_xxx" "https://your-domain.com/api/v1/products/uuid-here"

Categories

Get the full category tree.

GET/api/v1/categoriesList Categories

Returns nested category tree (parent → children).

Example:

curl -H "X-Api-Key: zs_xxx" "https://your-domain.com/api/v1/categories"

Stores

View store information.

GET/api/v1/stores/:idGet Store

Store details with products list, rating, and tier.

Example:

curl -H "X-Api-Key: zs_xxx" "https://your-domain.com/api/v1/stores/uuid-here"

Orders (Buyer)

Create orders and check status.

POST/api/v1/ordersCreate Order

Purchase a product. Payment deducted from wallet balance.

Example:

curl -X POST -H "X-Api-Key: zs_xxx" -H "Content-Type: application/json" -d '{"productId":"uuid","quantity":1}' "https://your-domain.com/api/v1/orders"
GET/api/v1/orders/:idGet Order

Order status + decrypted goods (if completed).

Example:

curl -H "X-Api-Key: zs_xxx" "https://your-domain.com/api/v1/orders/uuid-here"
GET/api/v1/balanceGet Balance

Check wallet balance (available + held).

Example:

curl -H "X-Api-Key: zs_xxx" "https://your-domain.com/api/v1/balance"

Store Management (Seller)

Manage your store products, stock, and orders.

GET/api/v1/store/productsList My Products

All products in your store (with status).

Example:

curl -H "X-Api-Key: zs_xxx" "https://your-domain.com/api/v1/store/products"
POST/api/v1/store/productsCreate Product

Add a new product (goes to PENDING moderation).

Example:

curl -X POST -H "X-Api-Key: zs_xxx" -H "Content-Type: application/json" -d '{"storeId":"uuid","categoryId":1,"title":{"en":"Product Name"},"priceUsdt":10}' "https://your-domain.com/api/v1/store/products"
PUT/api/v1/store/products/:idUpdate Product

Update title, price, format, status.

Example:

curl -X PUT -H "X-Api-Key: zs_xxx" -H "Content-Type: application/json" -d '{"priceUsdt":15,"isActive":true}' "https://your-domain.com/api/v1/store/products/uuid"
POST/api/v1/store/products/:id/stockUpload Stock

Upload stock items (one per line). Items are encrypted on the server.

Example:

curl -X POST -H "X-Api-Key: zs_xxx" -H "Content-Type: application/json" -d '{"items":["account1:pass1","account2:pass2"]}' "https://your-domain.com/api/v1/store/products/uuid/stock"
GET/api/v1/store/products/:id/stock-countGet Stock Count

Check available stock for a product.

Example:

curl -H "X-Api-Key: zs_xxx" "https://your-domain.com/api/v1/store/products/uuid/stock-count"
GET/api/v1/store/statsStore Stats

Overview: balance, sales count, revenue, rating.

Example:

curl -H "X-Api-Key: zs_xxx" "https://your-domain.com/api/v1/store/stats"
GET/api/v1/store/ordersStore Orders

Paginated list of orders placed at your store.

Example:

curl -H "X-Api-Key: zs_xxx" "https://your-domain.com/api/v1/store/orders?page=1&limit=20"

Response Format

All responses are JSON. List endpoints return paginated results:

{
  "data": [...],
  "meta": {
    "total": 150,
    "page": 1,
    "limit": 20,
    "lastPage": 8
  }
}

Error Codes

401 — Unauthorized403 — Forbidden404 — Not Found400 — Bad Request429 — Rate Limited500 — Server Error