For the complete documentation index, see llms.txt. This page is also available as Markdown.

Orders

Order management and purchases

List user orders

get
Authorizations
X-API-KeystringRequired

API key for authentication. Get your key from the dashboard.

Query parameters
pageintegerOptionalDefault: 1
per_pageintegerOptionalDefault: 20
statusstring · enumOptionalPossible values:
Responses
200

List of orders

application/json
successbooleanOptionalExample: true
get/orders
GET /api/v2/orders HTTP/1.1
Host: bulkmail.shop
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "success": true,
  "data": [
    {
      "id": 1,
      "order_number": "ORD-20240101-001",
      "product_name": "text",
      "quantity": 1,
      "unit_price": 1,
      "total_amount": 1,
      "status": "pending",
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 20,
    "total": 100,
    "total_pages": 5
  }
}

Create new order (purchase)

post

Purchase products using wallet balance. Stock is delivered immediately upon successful purchase.

Error Codes:

  • INSUFFICIENT_BALANCE - Not enough balance

  • INSUFFICIENT_STOCK - Not enough stock available

Authorizations
X-API-KeystringRequired

API key for authentication. Get your key from the dashboard.

Body
product_idintegerRequired
quantityinteger · min: 1Required
Responses
201

Order created

application/json
successbooleanOptionalExample: true
messagestringOptionalExample: Order placed successfully
post/orders
POST /api/v2/orders HTTP/1.1
Host: bulkmail.shop
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 29

{
  "product_id": 1,
  "quantity": 1
}
{
  "success": true,
  "message": "Order placed successfully",
  "data": {
    "id": 1,
    "order_number": "text",
    "quantity": 1,
    "total_amount": 1,
    "status": "text",
    "stock_items": [
      "text"
    ]
  }
}

Get order details

get
Authorizations
X-API-KeystringRequired

API key for authentication. Get your key from the dashboard.

Path parameters
idintegerRequired
Responses
200

Order details with stock items

application/json
successbooleanOptionalExample: true
get/orders/{id}
GET /api/v2/orders/{id} HTTP/1.1
Host: bulkmail.shop
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "success": true,
  "data": {
    "id": 1,
    "order_number": "ORD-20240101-001",
    "product_name": "text",
    "quantity": 1,
    "unit_price": 1,
    "total_amount": 1,
    "status": "pending",
    "created_at": "2026-01-01T00:00:00.000Z",
    "stock_items": [
      "text"
    ]
  }
}

Cancel order

post

Only pending orders can be cancelled. Refund will be credited to wallet.

Authorizations
X-API-KeystringRequired

API key for authentication. Get your key from the dashboard.

Path parameters
idintegerRequired
Responses
200

Order cancelled

application/json
successbooleanOptionalExample: true
messagestringOptionalExample: Order cancelled successfully
post/orders/{id}/cancel
POST /api/v2/orders/{id}/cancel HTTP/1.1
Host: bulkmail.shop
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "success": true,
  "message": "Order cancelled successfully",
  "data": {
    "refunded_amount": 1
  }
}

Export order stock

get
Authorizations
X-API-KeystringRequired

API key for authentication. Get your key from the dashboard.

Path parameters
idintegerRequired
Query parameters
formatstring · enumOptionalDefault: txtPossible values:
Responses
200

Exported data

stringOptional
get/orders/{id}/export
GET /api/v2/orders/{id}/export HTTP/1.1
Host: bulkmail.shop
X-API-Key: YOUR_API_KEY
Accept: */*
text

Last updated