Skip to content

Products API

List Products

GET /api/products

Query Parameters:

ParameterTypeDescription
pagenumberPage number (default: 1)
per_pagenumberItems per page (default: 20)
searchstringSearch by name or slug
statusstringFilter by status: active, draft, archived

Response:

json
{
  "items": [
    {
      "id": "prd_xxx",
      "name": "My Plugin",
      "slug": "my-plugin",
      "description": "A great plugin",
      "productType": "plugin",
      "status": "active",
      "isPremium": true,
      "createdAt": "2025-01-01T00:00:00.000Z",
      "latestVersion": "1.2.0",
      "plansCount": 3
    }
  ],
  "pagination": {
    "page": 1,
    "perPage": 20,
    "total": 5,
    "totalPages": 1
  }
}

Get Product

GET /api/products/:id

Create Product

POST /api/products

Body:

json
{
  "name": "My Plugin",
  "slug": "my-plugin",
  "description": "A great plugin",
  "productType": "plugin",
  "isPremium": true,
  "requiresLicense": true,
  "managesReleases": true,
  "licensePrefix": "MYPLUGIN",
  "logoUrl": "https://example.com/logo.png",
  "bannerUrl": "https://example.com/banner.png",
  "icon": "🔌",
  "color": "#6b7280",
  "readmeUrl": "https://example.com/readme"
}

Only name and productType are required. Slug is auto-generated if not provided.

Update Product

PUT /api/products/:id

Accepts partial body — only include fields you want to update.

Delete Product

DELETE /api/products/:id

Soft-deletes the product (sets deletedAt).


Releases

List Releases

GET /api/products/:id/releases

Upload Release File

POST /api/products/:id/releases/upload

Content-Type: multipart/form-data

FieldTypeDescription
fileFileZIP file
versionstringVersion number

Response:

json
{
  "filePath": "my-plugin/1.0.0/my-plugin-1.0.0.zip",
  "fileName": "my-plugin-1.0.0.zip",
  "fileSize": 12345
}

Create Release

POST /api/products/:id/releases
json
{
  "version": "1.0.0",
  "releaseNotes": "Initial release",
  "filePath": "my-plugin/1.0.0/my-plugin-1.0.0.zip",
  "fileName": "my-plugin-1.0.0.zip",
  "fileSize": 12345,
  "status": "published"
}

Update Release

PUT /api/products/:id/releases/:releaseId

Delete Release

DELETE /api/products/:id/releases/:releaseId

Plans

List Plans

GET /api/products/:id/plans

Create Plan

POST /api/products/:id/plans
json
{
  "name": "Pro",
  "slug": "pro",
  "billingCycle": "yearly",
  "price": 49.99,
  "currency": "USD",
  "siteLimit": 5,
  "shortDescription": "For professional developers"
}

Update Plan

PUT /api/products/:id/plans/:planId

Delete Plan

DELETE /api/products/:id/plans/:planId