Products API
Endpoints to fetch product metadata, versions, and download files.
Get Product by Slug
GET
/api/products/[slug]Returns full product metadata.
Response
json
{
"id": "prod_abc123",
"name": "CoolPlugin",
"slug": "coolplugin",
"short_description": "A very cool plugin",
"description_html": "<p>...</p>",
"price_cents": 999,
"is_free": false,
"game": "minecraft",
"category": "economy",
"status": "live",
"seller_name": "devuser",
"seller_display_name": "Dev User",
"seller_avatar_url": "https://...",
"latest_version": {
"id": "ver_xyz",
"version_tag": "1.2.0",
"channel": "stable"
},
"tags": ["economy", "shop"],
"rating_avg": 4.7,
"rating_count": 23,
"stats": { "download_count": 1420 }
}Returns
404 if the product is not found or not in live status.List Versions
GET
/api/products/[slug]/versionsReturns all non-yanked versions of a product. Beta versions are filtered out unless the caller is the seller or admin.
Response — array of versions
json
[
{
"id": "ver_xyz",
"product_id": "prod_abc123",
"version_tag": "1.2.0",
"channel": "stable",
"release_notes_html": "<p>Fixed bug with XYZ.</p>",
"file_size": 524288,
"download_count": 840,
"yanked": false,
"created_at": "2025-03-15T10:00:00Z"
}
]Download a Version
GET
/api/products/[slug]/download/[versionId]Redirects to a time-limited signed download URL. Requires the caller to own the product.
Returns 302 Found with a Location header pointing to the S3 presigned URL. The URL expires in 60 seconds. Use this URL to download the file immediately — do not cache it.
Returns 403 Forbidden if the caller does not own the product.
Reviews
GET
/api/products/[slug]/reviewsPaginated list of buyer reviews.
Query Parameters
pagenumberPage number (default: 1)limitnumberResults per page (default: 10, max: 50)sortstring'newest' | 'highest' | 'lowest' | 'helpful'POST
/api/products/[slug]/reviewsPost a review. Requires authentication and ownership of the product.
Request Body
ratingnumberrequired1–5 integerbodystringrequiredReview text (min 10 chars)