Products API
List Products
GET /api/productsQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
per_page | number | Items per page (default: 20) |
search | string | Search by name or slug |
status | string | Filter 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/:idCreate Product
POST /api/productsBody:
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/:idAccepts partial body — only include fields you want to update.
Delete Product
DELETE /api/products/:idSoft-deletes the product (sets deletedAt).
Releases
List Releases
GET /api/products/:id/releasesUpload Release File
POST /api/products/:id/releases/uploadContent-Type: multipart/form-data
| Field | Type | Description |
|---|---|---|
file | File | ZIP file |
version | string | Version 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/releasesjson
{
"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/:releaseIdDelete Release
DELETE /api/products/:id/releases/:releaseIdPlans
List Plans
GET /api/products/:id/plansCreate Plan
POST /api/products/:id/plansjson
{
"name": "Pro",
"slug": "pro",
"billingCycle": "yearly",
"price": 49.99,
"currency": "USD",
"siteLimit": 5,
"shortDescription": "For professional developers"
}Update Plan
PUT /api/products/:id/plans/:planIdDelete Plan
DELETE /api/products/:id/plans/:planId