API Reference

Complete reference for all Mycelium Marketplace REST API endpoints.

Base URL

All API endpoints are relative to your deployment base path: /marketplace/demo/api/

Authentication

Most API endpoints require authentication. The marketplace uses JWT tokens set via cookie after login.

Endpoints marked with Auth require a valid session. Log in via POST /marketplace/demo/login with email and password form fields.

Health

GET /api/health Application health check

Authentication

GET /api/auth/status Get current authentication status Auth

Products

GET /api/products List all products (marketplace listings)
GET /api/products/{id} Get product details by ID
GET /api/products/search Search products with filters
GET /api/products/categories Get product categories
GET /api/products/featured Get featured products

Cart

GET /api/cart Get current cart contents Auth
POST /api/cart/add Add item to cart Auth
PUT /api/cart/item/{id} Update cart item quantity Auth
DELETE /api/cart/item/{id} Remove item from cart Auth
DELETE /api/cart Clear entire cart Auth

Orders

POST /api/orders Place a new order Auth
GET /api/orders List user orders Auth
GET /api/orders/{id} Get order details Auth

Wallet & Credits

GET /api/wallet/balance Get wallet balance Auth
GET /api/wallet/info Get full wallet info (balance, currency, settings) Auth
GET /api/wallet/transactions Get transaction history Auth
POST /api/wallet/buy-credits Purchase credits Auth
POST /api/wallet/sell-credits Sell credits Auth
POST /api/wallet/transfer-credits Transfer credits to another user Auth
POST /api/wallet/instant-purchase One-click purchase with wallet balance Auth
POST /api/wallet/quick-topup Quick top-up with preset amount Auth
GET /api/wallet/check-affordability Check if user can afford a purchase Auth
GET /api/wallet/topup-amounts Get available quick top-up amounts Auth
POST /api/wallet/auto-topup/configure Configure automatic top-up settings Auth
GET /api/wallet/auto-topup/status Get auto top-up configuration Auth
POST /api/wallet/auto-topup/trigger Manually trigger auto top-up Auth
GET /api/wallet/last-payment-method Get last used payment method Auth
GET /api/navbar/dropdown-data Get navbar wallet summary for dropdown Auth

Currency

GET /api/currencies Get supported currencies
GET /api/currencies/rates Get current exchange rates
POST /api/currencies/convert Convert between currencies
GET /api/currencies/widget Get currency widget data
GET /api/user/currency Get user currency preference Auth
POST /api/user/currency Set user currency preference Auth

Messaging

GET /api/messages/threads List message threads Auth
POST /api/messages/threads Create a new thread Auth
GET /api/messages/threads/{thread_id}/messages Get messages in a thread Auth
POST /api/messages/threads/{thread_id}/messages Send message to a thread Auth
PUT /api/messages/threads/{thread_id}/read Mark thread as read Auth
POST /api/messages Send a direct message Auth

Liquidity Pools

GET /api/pools List available pools Auth
GET /api/pools/{pool_id} Get pool details Auth
POST /api/pools/exchange Exchange tokens via pool Auth
GET /api/pools/analytics Get pool analytics data Auth

Rentals

POST /api/products/{id}/rent Rent a compute product Auth
POST /api/products/{id}/rent-node Rent a specific node product Auth
POST /api/products/{id}/purchase Purchase a product outright Auth
DELETE /api/rentals/{id}/cancel Cancel an active rental Auth

Dashboard - User

GET /api/dashboard/user-data Get user profile data Auth
GET /api/dashboard/user-dashboard-data Get full dashboard overview data Auth
POST /api/dashboard/user/activities Add a user activity entry Auth
GET /api/dashboard/user/preferences Get user preferences Auth
PUT /api/dashboard/user/preferences Update user preferences Auth
GET /api/dashboard/user/service-bookings Get user's service bookings Auth
GET /api/dashboard/slice-rentals List user's slice rentals Auth
POST /api/dashboard/slice-rentals/{id}/manage Manage a slice rental deployment Auth
DELETE /api/dashboard/slice-rentals/{id} Cancel a slice rental Auth

Dashboard - Resource Provider

GET /api/dashboard/resource_provider-data Get resource provider dashboard data Auth
POST /api/dashboard/resource_provider-nodes Add a node to the farm Auth
POST /api/dashboard/resource_provider-nodes-enhanced Add a node with extended configuration Auth
GET /api/dashboard/resource_provider-nodes/{id} Get node details Auth
PUT /api/dashboard/resource_provider-nodes/{id} Update node configuration Auth
PUT /api/dashboard/resource_provider-nodes/{id}/status Update node status (online/offline) Auth
PUT /api/dashboard/resource_provider-nodes/{id}/configuration Update node hardware configuration Auth
DELETE /api/dashboard/resource_provider-nodes/{id} Remove a node from the farm Auth
POST /api/dashboard/grid-nodes/validate Validate grid node IDs before adding Auth
POST /api/dashboard/grid-nodes/add Add validated grid nodes to farm Auth
POST /api/dashboard/validate-grid-nodes-automatic Auto-validate grid nodes Auth

Dashboard - Slices & Node Groups

Slice Products

GET /api/dashboard/slice-products List slice products Auth
POST /api/dashboard/slice-products Create a new slice product Auth
DELETE /api/dashboard/slice-products/{id} Delete a slice product Auth
GET /api/dashboard/slice-details/{id} Get detailed slice information Auth
PUT /api/dashboard/slice-configuration/{id} Update slice configuration Auth
GET /api/dashboard/default-slice-formats Get default slice format templates Auth
GET /api/dashboard/default-slice-details/{id} Get details of a default slice format Auth
PUT /api/dashboard/default-slice-customization/{id} Save customized default slice Auth
POST /api/dashboard/resource_provider/slice-calculations/refresh Refresh slice calculations for nodes Auth
POST /api/dashboard/resource_provider/grid-sync Sync resource data with grid Auth
GET /api/dashboard/resource_provider/nodes/{id}/slices Get slices for a specific node Auth
GET /api/dashboard/resource_provider/slice-statistics Get aggregate slice statistics Auth
POST /api/dashboard/refresh-slice-calculations Refresh slice calculations Auth
POST /api/dashboard/sync-with-grid Sync with grid network Auth
GET /api/dashboard/node-slices/{id} Get slices for a node Auth

Node Groups

GET /api/dashboard/node-groups List node groups Auth
POST /api/dashboard/node-groups Create a node group Auth
GET /api/dashboard/node-groups/api Get node groups (API format) Auth
POST /api/dashboard/node-groups/custom Create a custom node group Auth
DELETE /api/dashboard/node-groups/{id} Delete a custom node group Auth
POST /api/dashboard/nodes/assign-group Assign a node to a group Auth

Dashboard - Staking

POST /api/dashboard/resource_provider-nodes/{id}/stake Stake tokens on a node Auth
PUT /api/dashboard/resource_provider-nodes/{id}/staking Update node staking configuration Auth
GET /api/dashboard/staking/statistics Get staking statistics Auth

Dashboard - App Provider

GET /api/dashboard/application-provider-data Get app provider dashboard data Auth
GET /api/dashboard/apps List user's apps Auth
POST /api/dashboard/apps Create a new app Auth
PUT /api/dashboard/apps/{id} Update an app Auth
DELETE /api/dashboard/apps/{id} Delete an app Auth
GET /api/dashboard/deployment/{id} Get deployment details Auth
GET /api/dashboard/products List provider products Auth
POST /api/dashboard/products Create a provider product Auth

Dashboard - Service Provider

GET /api/dashboard/service-provider-data Get service provider dashboard data Auth

Services

GET /api/dashboard/services List user's services Auth
POST /api/dashboard/services Create a new service listing Auth
PUT /api/dashboard/services/{id} Update a service Auth
DELETE /api/dashboard/services/{id} Delete a service Auth
GET /api/dashboard/services/{id}/details Get detailed service info Auth
GET /api/dashboard/services/{id}/analytics Get service analytics Auth
GET /api/dashboard/services/{id}/clients Get service client list Auth
PUT /api/dashboard/services/{id}/status Update service status Auth

Service Requests

GET /api/dashboard/service-requests List service requests Auth
PUT /api/dashboard/service-requests/{id} Update a service request Auth
PUT /api/dashboard/service-requests/{id}/progress Update request progress percentage Auth
GET /api/dashboard/service-requests/{id}/details Get request details Auth
GET /api/dashboard/service-requests/{id}/completed-details Get completed request summary Auth
GET /api/dashboard/service-requests/{id}/invoice Generate request invoice Auth
GET /api/dashboard/service-requests/{id}/report Get request report Auth

Availability & SLAs

GET /api/dashboard/availability Get provider availability Auth
PUT /api/dashboard/availability Update provider availability Auth
GET /api/dashboard/slas List SLA agreements Auth
POST /api/dashboard/slas Create a new SLA Auth
PUT /api/dashboard/slas/{id} Update an SLA Auth
DELETE /api/dashboard/slas/{id} Delete an SLA Auth
GET /api/dashboard/agreement/download Download service agreement Auth

Dashboard - Settings

POST /api/dashboard/settings/profile Update user profile Auth
POST /api/dashboard/settings/password Change password Auth
POST /api/dashboard/settings/notifications Update notification preferences Auth
POST /api/dashboard/settings/verify-password Verify current password Auth
POST /api/dashboard/settings/delete-account Delete user account Auth
GET /api/dashboard/settings/billing-history Get billing history Auth

Dashboard - SSH Keys

GET /api/dashboard/ssh-keys List SSH keys Auth
POST /api/dashboard/ssh-keys Add a new SSH key Auth
GET /api/dashboard/ssh-keys/{id} Get SSH key details Auth
PUT /api/dashboard/ssh-keys/{id} Update an SSH key Auth
DELETE /api/dashboard/ssh-keys/{id} Delete an SSH key Auth
POST /api/dashboard/ssh-keys/{id}/set-default Set an SSH key as default Auth

Response Format

All API responses are JSON. Successful responses follow this pattern:

{
  "success": true,
  "data": { ... }
}

Error responses:

{
  "success": false,
  "error": "Description of the error"
}