Overview
The catalog system manages in-game assets including clothing, models, and other items. Users can browse, purchase, and manage assets.Browse Catalog
Retrieve paginated catalog listings.Request
Page number for pagination
Response
Returns an array of catalog assets.Array of asset objects:
id: Asset IDname: Asset nameprice: Asset price in currency
Total number of pages
Site/src/routes/(main)/catalog/+page.server.ts:11-21
Search Catalog
Search for assets by name or other criteria.Request
Search query string
Page number (minimum 1)
Response
Returns JSON array of matching assets.Asset ID
Asset name
Asset price
Site/src/routes/(main)/catalog/search/+server.ts:6-13
Get Asset Details
Retrieve detailed information about a specific catalog asset.Request
Asset ID
URL-encoded asset name (for SEO-friendly URLs)
Valid session cookie
Response
Asset record ID
Asset name
URL-safe encoded name
Asset type ID:
- 8: Model
- 11: Clothing (Shirt)
- 12: Clothing (Pants)
- Other types as configured
Asset description
text: Description contentupdated: Last update timestamp
Asset creator information
Whether current user is the creator
Creation timestamp
Whether asset is available for purchase
Asset price in currency
Number of times sold
Whether current user owns this asset
Asset visibility status:
- “Visible”: Approved and public
- “Moderated”: Moderated/hidden
- Other states as configured
Array of comments on this asset
Current user’s currency balance
Transaction fee percentage
Errors
- 404 Not Found: Asset doesn’t exist
- 302 Redirect: Name mismatch (redirects to correct URL with slug)
- 500 Internal Server Error: Economy service connection failed
Site/src/routes/(main)/catalog/[id=asset]/[name]/+page.server.ts:57-82
Purchase Asset
Buy a catalog asset.Request
Asset ID to purchase
Asset name
Valid session cookie
Response
Returns empty response on success. Creates ownership relationship and processes payment.Implementation Details
- Validates asset exists and is for sale
- Checks user doesn’t already own the asset
- Verifies asset visibility is “Visible”
- Processes currency transaction (if price > 0)
- Creates
ownsAssetrelationship in database - Sends purchase notification to creator
Errors
- 404 Not Found: Asset doesn’t exist
- 400 Bad Request:
- “You already own this item”
- “This item hasn’t been approved yet” (visibility not “Visible”)
- “This item is not for sale”
- Insufficient funds (from economy service)
Site/src/routes/(main)/catalog/[id=asset]/[name]/+page.server.ts:163-217
Comment on Asset
Post a comment on a catalog asset.Request
Asset ID
Comment text (1-1000 characters)
Optional comment ID to reply to
Valid session cookie
Response
Returns empty response on success.Rate Limiting
Limited to 5 comments per IP address within the rate limit window.Implementation Details
- Validates comment content
- Filters comment through content filter
- Creates comment record
- Sends notification to asset creator (if different from commenter)
Validation Errors
“Comment must have content” - Empty or whitespace-only content
Errors
- 404 Not Found: Asset doesn’t exist
- 429 Too Many Requests: Rate limit exceeded
Site/src/routes/(main)/catalog/[id=asset]/[name]/+page.server.ts:123-162
Rerender Asset (Admin)
Request a re-render of an asset’s thumbnail. Requires administrator privileges.Request
Asset ID to rerender
Valid session cookie with permission level 5
Response
URL to updated icon with cache-busting parameter
Supported Asset Types
Only works for:- Type 8: Models
- Type 11: Clothing (Shirt)
- Type 12: Clothing (Pants)
Errors
- 403 Forbidden: Insufficient permissions
- 400 Bad Request:
- “Can’t rerender a moderated asset”
- “Can’t rerender this type of asset” (unsupported type)
- 404 Not Found: Asset doesn’t exist
- 500 Internal Server Error: “Failed to request render”
Site/src/routes/(main)/catalog/[id=asset]/[name]/+page.server.ts:94-121
Asset Management
Asset settings and management endpoints for asset creators.Get Asset Settings
Update Asset Settings
Various settings endpoints similar to place settings. Asset creators can update:- Name and description
- Pricing and sale status
- Visibility settings
- Asset file/data
Notes
Currency System
Asset purchases integrate with the Mercury economy service:- Transaction fee is applied to purchases
- Funds are transferred from buyer to creator
- Transaction history is logged
- Balance checks prevent overspending
Content Filtering
All user-submitted text (descriptions, comments) passes through a content filter before storage.Asset Types
Asset types determine rendering behavior and usage:- Models (8): 3D models that can be placed in games
- Clothing (11, 12): Wearable items for avatars
- Additional types may be configured per instance