{ "openapi": "3.0.0", "components": { "examples": {}, "headers": {}, "parameters": {}, "requestBodies": {}, "responses": {}, "schemas": { "VariantType": { "description": "Variant type definition with validation rules", "properties": { "variant_type_id": { "type": "string", "description": "Unique identifier for the variant type" }, "name": { "type": "string", "description": "Internal name (e.g., 'quality_tier', 'quality_value')" }, "display_name": { "type": "string", "description": "Display name for UI (e.g., 'Quality Tier', 'Quality Value')" }, "description": { "type": "string", "description": "Description of the variant type" }, "affects_pricing": { "type": "boolean", "description": "Whether this attribute affects pricing" }, "searchable": { "type": "boolean", "description": "Whether this attribute is searchable" }, "filterable": { "type": "boolean", "description": "Whether this attribute is filterable" }, "value_type": { "type": "string", "enum": [ "integer", "decimal", "string", "enum" ], "description": "Data type of the value ('integer', 'decimal', 'string', 'enum')" }, "min_value": { "type": "number", "format": "double", "description": "Minimum allowed value (for numeric types)" }, "max_value": { "type": "number", "format": "double", "description": "Maximum allowed value (for numeric types)" }, "allowed_values": { "items": { "type": "string" }, "type": "array", "description": "Allowed values (for enum types)" }, "display_order": { "type": "number", "format": "double", "description": "Display order for UI presentation" }, "icon": { "type": "string", "description": "Optional icon identifier" }, "created_at": { "type": "string", "description": "Creation timestamp" } }, "required": [ "variant_type_id", "name", "display_name", "affects_pricing", "searchable", "filterable", "value_type", "display_order", "created_at" ], "type": "object", "additionalProperties": false }, "GetVariantTypesResponse": { "description": "Response for GET /api/v2/variant-types endpoint", "properties": { "variant_types": { "items": { "$ref": "#/components/schemas/VariantType" }, "type": "array", "description": "Array of variant type definitions" }, "total": { "type": "number", "format": "double", "description": "Total count of variant types" } }, "required": [ "variant_types", "total" ], "type": "object", "additionalProperties": false }, "SupplierEntityInfo": { "description": "Minimal profile shape for either a user or contractor org", "properties": { "id": { "type": "string" }, "username": { "type": "string" }, "display_name": { "type": "string" }, "avatar": { "type": "string", "nullable": true }, "kind": { "type": "string", "enum": [ "user", "contractor" ], "description": "'user' | 'contractor'" }, "spectrum_id": { "type": "string", "description": "Contractor spectrum_id, only present when kind = 'contractor'" } }, "required": [ "id", "username", "display_name", "kind" ], "type": "object", "additionalProperties": false }, "SupplierTier": { "type": "string", "enum": [ "preferred", "approved", "restricted" ], "description": "Supplier Relationship Types\n\nTypes for the supplier roster feature — aggregators maintaining a list of\ntrusted/approved suppliers with tier, notes, and status tracking." }, "SupplierStatus": { "type": "string", "enum": [ "active", "suspended", "removed" ] }, "SupplierRelationship": { "properties": { "relationship_id": { "type": "string" }, "aggregator": { "$ref": "#/components/schemas/SupplierEntityInfo" }, "supplier": { "$ref": "#/components/schemas/SupplierEntityInfo" }, "tier": { "allOf": [ { "$ref": "#/components/schemas/SupplierTier" } ], "nullable": true }, "notes": { "type": "string", "nullable": true }, "status": { "$ref": "#/components/schemas/SupplierStatus" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "relationship_id", "aggregator", "supplier", "status", "created_at", "updated_at" ], "type": "object", "additionalProperties": false }, "GetSuppliersResponse": { "properties": { "suppliers": { "items": { "$ref": "#/components/schemas/SupplierRelationship" }, "type": "array" }, "total": { "type": "number", "format": "double" }, "page": { "type": "number", "format": "double" }, "page_size": { "type": "number", "format": "double" } }, "required": [ "suppliers", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "AddSupplierResponse": { "properties": { "relationship": { "$ref": "#/components/schemas/SupplierRelationship" } }, "required": [ "relationship" ], "type": "object", "additionalProperties": false }, "AddSupplierRequest": { "description": "Request to add a supplier to your roster", "properties": { "supplier_id": { "type": "string", "description": "UUID of user to add as supplier (mutually exclusive with supplier_contractor_id)" }, "supplier_contractor_id": { "type": "string", "description": "UUID of contractor org to add as supplier (mutually exclusive with supplier_id)" }, "tier": { "$ref": "#/components/schemas/SupplierTier" }, "notes": { "type": "string" } }, "type": "object", "additionalProperties": false }, "UpdateSupplierResponse": { "properties": { "relationship": { "$ref": "#/components/schemas/SupplierRelationship" } }, "required": [ "relationship" ], "type": "object", "additionalProperties": false }, "UpdateSupplierRequest": { "description": "Request to update an existing supplier relationship", "properties": { "tier": { "allOf": [ { "$ref": "#/components/schemas/SupplierTier" } ], "nullable": true }, "notes": { "type": "string", "nullable": true }, "status": { "$ref": "#/components/schemas/SupplierStatus" } }, "type": "object", "additionalProperties": false }, "VariantAttributes": { "description": "Flexible JSONB attributes for item variants\nSupports quality tiers, crafting source, and future extensibility", "properties": { "quality_tier": { "type": "number", "format": "double", "description": "Quality tier from 1 (lowest) to 5 (highest)" }, "quality_value": { "type": "number", "format": "double", "description": "Precise quality value from 0 to 1000" }, "crafted_source": { "type": "string", "enum": [ "crafted", "store", "looted", "unknown", "duped" ], "description": "How the item was obtained" }, "blueprint_tier": { "type": "number", "format": "double", "description": "Blueprint quality tier for craftable items (1-5)" } }, "type": "object", "additionalProperties": false }, "StockLotVariant": { "description": "Variant information for stock lot", "properties": { "variant_id": { "type": "string", "description": "Variant UUID" }, "attributes": { "$ref": "#/components/schemas/VariantAttributes", "description": "Variant attributes" }, "display_name": { "type": "string", "description": "Display name (e.g., \"Tier 5 (95.5%) - Crafted\")" }, "short_name": { "type": "string", "description": "Short name (e.g., \"T5 Crafted\")" } }, "required": [ "variant_id", "attributes", "display_name", "short_name" ], "type": "object", "additionalProperties": false }, "LocationInfo": { "description": "Location information", "properties": { "location_id": { "type": "string", "description": "Location UUID" }, "name": { "type": "string", "description": "Location name" }, "is_preset": { "type": "boolean", "description": "Whether this is a preset location (vs custom)" } }, "required": [ "location_id", "name", "is_preset" ], "type": "object", "additionalProperties": false }, "OwnerInfo": { "description": "Owner information", "properties": { "user_id": { "type": "string", "description": "User UUID" }, "username": { "type": "string", "description": "Username" }, "display_name": { "type": "string", "description": "Display name" }, "avatar_url": { "type": "string", "description": "Avatar URL" } }, "required": [ "user_id", "username" ], "type": "object", "additionalProperties": false }, "StockLotDetail": { "description": "Complete stock lot detail", "properties": { "lot_id": { "type": "string", "description": "Stock lot UUID" }, "item_id": { "type": "string", "description": "Item UUID this lot belongs to" }, "listing_id": { "type": "string", "description": "Listing UUID this lot belongs to" }, "listing_title": { "type": "string", "description": "Listing title" }, "game_item_name": { "type": "string", "nullable": true, "description": "Game item name" }, "listing_photo": { "type": "string", "nullable": true, "description": "First listing photo URL" }, "variant": { "$ref": "#/components/schemas/StockLotVariant", "description": "Variant information" }, "quantity_total": { "type": "number", "format": "double", "description": "Total quantity in this lot" }, "quantity_allocated": { "type": "number", "format": "double", "description": "Quantity currently allocated to active orders" }, "location": { "allOf": [ { "$ref": "#/components/schemas/LocationInfo" } ], "nullable": true, "description": "Location information (null if unspecified)" }, "owner": { "allOf": [ { "$ref": "#/components/schemas/OwnerInfo" } ], "nullable": true, "description": "Owner information (null if unassigned)" }, "listed": { "type": "boolean", "description": "Whether this lot is listed for sale" }, "notes": { "type": "string", "nullable": true, "description": "Optional notes about this lot" }, "crafted_by": { "type": "string", "description": "User who crafted this item (if applicable)" }, "crafted_at": { "type": "string", "description": "Timestamp when item was crafted (if applicable)" }, "created_at": { "type": "string", "description": "ISO 8601 timestamp when lot was created" }, "updated_at": { "type": "string", "description": "ISO 8601 timestamp when lot was last updated" } }, "required": [ "lot_id", "item_id", "listing_id", "listing_title", "game_item_name", "listing_photo", "variant", "quantity_total", "quantity_allocated", "location", "owner", "listed", "notes", "created_at", "updated_at" ], "type": "object", "additionalProperties": false }, "UpdateStockLotResponse": { "description": "Response for updating a stock lot", "properties": { "lot": { "$ref": "#/components/schemas/StockLotDetail", "description": "Updated stock lot" } }, "required": [ "lot" ], "type": "object", "additionalProperties": false }, "CreateStockLotRequest": { "description": "Request body for creating a stock lot", "properties": { "item_id": { "type": "string", "description": "Listing item UUID" }, "quantity": { "type": "number", "format": "double", "description": "Quantity (must be > 0)" }, "variant_attributes": { "$ref": "#/components/schemas/VariantAttributes", "description": "Variant attributes for this lot" }, "location_id": { "type": "string", "description": "Optional location UUID" }, "listed": { "type": "boolean", "description": "Whether to list for sale (default: true)" }, "notes": { "type": "string", "description": "Optional notes" } }, "required": [ "item_id", "quantity", "variant_attributes" ], "type": "object", "additionalProperties": false }, "GetStockLotsResponse": { "description": "Response for fetching stock lots", "properties": { "lots": { "items": { "$ref": "#/components/schemas/StockLotDetail" }, "type": "array", "description": "Array of stock lots" }, "total": { "type": "number", "format": "double", "description": "Total number of lots matching filters" }, "page": { "type": "number", "format": "double", "description": "Current page number" }, "page_size": { "type": "number", "format": "double", "description": "Number of results per page" } }, "required": [ "lots", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "UpdateStockLotRequest": { "description": "Request body for updating a stock lot", "properties": { "quantity_total": { "type": "number", "format": "double", "description": "New total quantity (optional)" }, "listed": { "type": "boolean", "description": "New listed status (optional)" }, "location_id": { "type": "string", "nullable": true, "description": "New location UUID (optional, null to clear)" }, "notes": { "type": "string", "nullable": true, "description": "New notes (optional, null to clear)" }, "variant_attributes": { "$ref": "#/components/schemas/VariantAttributes", "description": "New variant attributes (optional — changes the lot's variant via getOrCreateVariant)" } }, "type": "object", "additionalProperties": false }, "BulkUpdateResult": { "description": "Result of a single lot update in bulk operation", "properties": { "lot_id": { "type": "string", "description": "Stock lot UUID" }, "success": { "type": "boolean", "description": "Whether the update succeeded" }, "error": { "type": "string", "description": "Error message if update failed" } }, "required": [ "lot_id", "success" ], "type": "object", "additionalProperties": false }, "BulkUpdateStockLotsResponse": { "description": "Response for bulk stock lot updates", "properties": { "results": { "items": { "$ref": "#/components/schemas/BulkUpdateResult" }, "type": "array", "description": "Array of update results" }, "success_count": { "type": "number", "format": "double", "description": "Number of successful updates" }, "failure_count": { "type": "number", "format": "double", "description": "Number of failed updates" } }, "required": [ "results", "success_count", "failure_count" ], "type": "object", "additionalProperties": false }, "BulkLotUpdate": { "description": "Individual lot update in bulk operation", "properties": { "lot_id": { "type": "string", "description": "Stock lot UUID" }, "quantity_total": { "type": "number", "format": "double", "description": "New total quantity (optional)" }, "listed": { "type": "boolean", "description": "New listed status (optional)" }, "location_id": { "type": "string", "nullable": true, "description": "New location UUID (optional)" } }, "required": [ "lot_id" ], "type": "object", "additionalProperties": false }, "BulkUpdateStockLotsRequest": { "description": "Request body for bulk stock lot updates", "properties": { "updates": { "items": { "$ref": "#/components/schemas/BulkLotUpdate" }, "type": "array", "description": "Array of lot updates" } }, "required": [ "updates" ], "type": "object", "additionalProperties": false }, "ShopResponse": { "properties": { "shop_id": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "banner": { "type": "string", "nullable": true }, "logo": { "type": "string", "nullable": true }, "owner_user_id": { "type": "string", "nullable": true }, "is_org_owned": { "type": "boolean" }, "owner_contractor_spectrum_id": { "type": "string", "nullable": true, "description": "Spectrum ID of the owning contractor (for V1 APIs that need it)" }, "supported_languages": { "items": { "type": "string" }, "type": "array" }, "tags": { "items": { "type": "string" }, "type": "array" }, "accepts_custom_orders": { "type": "boolean" }, "market_order_template": { "type": "string" }, "default_pickup_method": { "type": "string", "nullable": true }, "status": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "banner_url": { "type": "string", "nullable": true }, "official_server_id": { "type": "string", "nullable": true, "description": "Discord server (guild) ID where order/offer threads are created for this shop" }, "discord_thread_channel_id": { "type": "string", "nullable": true, "description": "Discord channel ID under which order/offer threads are created for this shop" }, "badge_ids": { "items": { "type": "string" }, "type": "array", "description": "Seller reputation badges, computed server-side from shop metrics + owner data" }, "permissions": { "properties": { "manage_orders": { "type": "boolean" }, "manage_stock": { "type": "boolean" }, "manage_market": { "type": "boolean" }, "can_manage": { "type": "boolean" } }, "required": [ "manage_orders", "manage_stock", "manage_market", "can_manage" ], "type": "object", "description": "Granular permissions for the current user on this shop (only in /shops/mine)" }, "logo_url": { "type": "string", "nullable": true } }, "required": [ "shop_id", "slug", "name", "description", "banner", "logo", "owner_user_id", "is_org_owned", "owner_contractor_spectrum_id", "supported_languages", "tags", "accepts_custom_orders", "market_order_template", "default_pickup_method", "status", "created_at", "updated_at", "banner_url", "official_server_id", "discord_thread_channel_id", "badge_ids", "logo_url" ], "type": "object", "additionalProperties": false }, "CreateShopRequest": { "properties": { "name": { "type": "string" }, "slug": { "type": "string" }, "description": { "type": "string" }, "banner": { "type": "string" }, "logo": { "type": "string" }, "contractor_id": { "type": "string", "description": "If set, shop is owned by this org. User must have manage_market in the org." } }, "required": [ "name" ], "type": "object", "additionalProperties": false }, "QuickCreateShopRequest": { "properties": { "owner_type": { "type": "string", "enum": [ "user", "contractor" ] }, "contractor_id": { "type": "string", "description": "Required when owner_type is \"contractor\"" } }, "required": [ "owner_type" ], "type": "object", "additionalProperties": false }, "ShopOwnerInfo": { "properties": { "type": { "type": "string", "enum": [ "user", "contractor" ] }, "slug": { "type": "string", "description": "Username (for users) or spectrum_id (for orgs)" }, "name": { "type": "string" }, "avatar_url": { "type": "string", "nullable": true } }, "required": [ "type", "slug", "name", "avatar_url" ], "type": "object", "additionalProperties": false }, "ShopMetricsResponse": { "properties": { "total_orders": { "type": "number", "format": "double" }, "total_completed": { "type": "number", "format": "double" }, "avg_completion_hours": { "type": "number", "format": "double", "nullable": true }, "streak": { "type": "number", "format": "double" }, "response_rate": { "type": "number", "format": "double", "nullable": true } }, "required": [ "total_orders", "total_completed", "avg_completion_hours", "streak", "response_rate" ], "type": "object", "additionalProperties": false }, "ShopPublicResponse": { "properties": { "shop_id": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "banner_url": { "type": "string", "nullable": true }, "logo_url": { "type": "string", "nullable": true }, "supported_languages": { "items": { "type": "string" }, "type": "array" }, "tags": { "items": { "type": "string" }, "type": "array" }, "accepts_custom_orders": { "type": "boolean" }, "status": { "type": "string" }, "created_at": { "type": "string" }, "rating": { "type": "number", "format": "double", "nullable": true }, "rating_count": { "type": "number", "format": "double" }, "badge_ids": { "items": { "type": "string" }, "type": "array", "description": "Seller reputation badges, computed server-side from shop metrics + owner data" }, "owner": { "$ref": "#/components/schemas/ShopOwnerInfo", "description": "Owner information — link to user profile or org page (included in detail view)" }, "listing_count": { "type": "number", "format": "double", "description": "Number of active listings in this shop" }, "service_count": { "type": "number", "format": "double", "description": "Number of active services in this shop" }, "total_sales": { "type": "number", "format": "double", "description": "Total completed orders (included in detail view)" }, "metrics": { "$ref": "#/components/schemas/ShopMetricsResponse", "description": "Metrics for reputation/badges (included in detail view)" } }, "required": [ "shop_id", "slug", "name", "description", "banner_url", "logo_url", "supported_languages", "tags", "accepts_custom_orders", "status", "created_at", "rating", "rating_count", "badge_ids" ], "type": "object", "additionalProperties": false }, "UpdateShopRequest": { "properties": { "name": { "type": "string" }, "slug": { "type": "string" }, "description": { "type": "string" }, "banner": { "type": "string" }, "logo": { "type": "string" }, "supported_languages": { "items": { "type": "string" }, "type": "array" }, "market_order_template": { "type": "string" }, "default_pickup_method": { "type": "string", "nullable": true }, "tags": { "items": { "type": "string" }, "type": "array" }, "accepts_custom_orders": { "type": "boolean" }, "official_server_id": { "type": "string", "nullable": true, "description": "Discord server (guild) ID where order/offer threads are created for this shop" }, "discord_thread_channel_id": { "type": "string", "nullable": true, "description": "Discord channel ID under which order/offer threads are created for this shop" } }, "type": "object", "additionalProperties": false }, "ShopReviewResponse": { "properties": { "review_id": { "type": "string" }, "rating": { "type": "number", "format": "double" }, "comment": { "type": "string" }, "created_at": { "type": "string" }, "author": { "properties": { "avatar": { "type": "string", "nullable": true }, "display_name": { "type": "string" }, "username": { "type": "string" }, "user_id": { "type": "string" } }, "required": [ "avatar", "display_name", "username", "user_id" ], "type": "object" } }, "required": [ "review_id", "rating", "comment", "created_at", "author" ], "type": "object", "additionalProperties": false }, "ShopWebhookResponse": { "properties": { "webhook_id": { "type": "string" }, "name": { "type": "string" }, "webhook_url": { "type": "string" }, "shop_id": { "type": "string" } }, "required": [ "webhook_id", "name", "webhook_url", "shop_id" ], "type": "object", "additionalProperties": false }, "CreateShopWebhookRequest": { "properties": { "name": { "type": "string" }, "webhook_url": { "type": "string" }, "actions": { "items": { "type": "string" }, "type": "array" } }, "required": [ "name", "webhook_url", "actions" ], "type": "object", "additionalProperties": false }, "TransferShopRequest": { "properties": { "target_type": { "type": "string", "enum": [ "user", "contractor" ], "description": "Whether ownership transfers to a user account or an org." }, "target_id": { "type": "string", "description": "Identifier of the new owner.\n- When target_type is \"user\": the target user's user_id or username.\n- When target_type is \"contractor\": the target org's contractor_id (UUID) or spectrum_id." } }, "required": [ "target_type", "target_id" ], "type": "object", "additionalProperties": false }, "ShopBlocklistEntry": { "properties": { "id": { "type": "string" }, "user_id": { "type": "string" }, "username": { "type": "string" }, "display_name": { "type": "string" }, "avatar": { "type": "string", "nullable": true }, "reason": { "type": "string" }, "created_at": { "type": "string" } }, "required": [ "id", "user_id", "username", "display_name", "avatar", "reason", "created_at" ], "type": "object", "additionalProperties": false }, "BlockUserRequest": { "properties": { "username": { "type": "string" }, "reason": { "type": "string" } }, "required": [ "username" ], "type": "object", "additionalProperties": false }, "ShopCustomerEntry": { "properties": { "user_id": { "type": "string" }, "username": { "type": "string" }, "display_name": { "type": "string" }, "avatar": { "type": "string", "nullable": true }, "order_count": { "type": "number", "format": "double" }, "fulfilled_count": { "type": "number", "format": "double" }, "total_spent": { "type": "number", "format": "double" }, "last_order_at": { "type": "string", "nullable": true } }, "required": [ "user_id", "username", "display_name", "avatar", "order_count", "fulfilled_count", "total_spent", "last_order_at" ], "type": "object", "additionalProperties": false }, "ShopCustomersResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ShopCustomerEntry" }, "type": "array" }, "total": { "type": "number", "format": "double" }, "page": { "type": "number", "format": "double" }, "page_size": { "type": "number", "format": "double" } }, "required": [ "items", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "OrderSettingType": { "type": "string", "enum": [ "offer_message", "order_message", "require_availability", "stock_subtraction_timing", "min_order_size", "max_order_size", "min_order_value", "max_order_value", "allocation_mode" ] }, "ShopOrderSettingResponse": { "properties": { "id": { "type": "string" }, "entity_type": { "type": "string", "enum": [ "shop" ], "nullable": false }, "entity_id": { "type": "string" }, "setting_type": { "$ref": "#/components/schemas/OrderSettingType" }, "message_content": { "type": "string" }, "enabled": { "type": "boolean" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "id", "entity_type", "entity_id", "setting_type", "message_content", "enabled", "created_at", "updated_at" ], "type": "object", "additionalProperties": false }, "UpsertShopOrderSettingRequest": { "properties": { "message_content": { "type": "string" }, "enabled": { "type": "boolean" } }, "required": [ "message_content", "enabled" ], "type": "object", "additionalProperties": false }, "RequisitionLineItem": { "description": "Requisition Order Types\n\nTypes for supplier requisition orders — orders where line items are anchored\nto game items (not listings). Suppliers decide which listing to fulfil from.\n\nA requisition order has orders.kind = 'requisition' and its line items live in\nrequisition_items instead of market_orders / order_market_items_v2.", "properties": { "requisition_item_id": { "type": "string" }, "game_item_id": { "type": "string" }, "game_item_name": { "type": "string" }, "quantity": { "type": "number", "format": "double" }, "price_per_unit": { "type": "number", "format": "double" }, "fulfilled_quantity": { "type": "number", "format": "double" }, "quality_tier_min": { "type": "number", "format": "double", "nullable": true }, "quality_tier_max": { "type": "number", "format": "double", "nullable": true } }, "required": [ "requisition_item_id", "game_item_id", "game_item_name", "quantity", "price_per_unit", "fulfilled_quantity" ], "type": "object", "additionalProperties": false }, "CreateRequisitionResponse": { "properties": { "order_id": { "type": "string" }, "offer_session_id": { "type": "string" }, "status": { "type": "string" }, "items": { "items": { "$ref": "#/components/schemas/RequisitionLineItem" }, "type": "array" }, "created_at": { "type": "string" } }, "required": [ "order_id", "offer_session_id", "status", "items", "created_at" ], "type": "object", "additionalProperties": false }, "CreateRequisitionItem": { "properties": { "game_item_id": { "type": "string" }, "quantity": { "type": "number", "format": "double" }, "price_per_unit": { "type": "number", "format": "double" }, "quality_tier_min": { "type": "number", "format": "double" }, "quality_tier_max": { "type": "number", "format": "double" } }, "required": [ "game_item_id", "quantity", "price_per_unit" ], "type": "object", "additionalProperties": false }, "CreateRequisitionRequest": { "properties": { "target_supplier_id": { "type": "string", "description": "UUID of target supplier user (mutually exclusive with target_contractor_id)" }, "target_contractor_id": { "type": "string", "description": "UUID of target supplier contractor org" }, "title": { "type": "string" }, "description": { "type": "string" }, "items": { "items": { "$ref": "#/components/schemas/CreateRequisitionItem" }, "type": "array" }, "buy_order_id": { "type": "string", "description": "Link to an existing buy order that triggered this requisition (optional)" } }, "required": [ "title", "items" ], "type": "object", "additionalProperties": false }, "RequisitionDetail": { "properties": { "order_id": { "type": "string" }, "offer_session_id": { "type": "string", "nullable": true }, "status": { "type": "string" }, "kind": { "type": "string", "enum": [ "requisition" ], "nullable": false }, "title": { "type": "string" }, "description": { "type": "string" }, "buyer": { "properties": { "avatar": { "type": "string", "nullable": true }, "display_name": { "type": "string" }, "username": { "type": "string" }, "user_id": { "type": "string" } }, "required": [ "display_name", "username", "user_id" ], "type": "object" }, "supplier": { "properties": { "avatar": { "type": "string", "nullable": true }, "display_name": { "type": "string" }, "username": { "type": "string" }, "user_id": { "type": "string" } }, "required": [ "display_name", "username", "user_id" ], "type": "object", "nullable": true }, "supplier_contractor": { "properties": { "avatar": { "type": "string", "nullable": true }, "name": { "type": "string" }, "spectrum_id": { "type": "string" }, "contractor_id": { "type": "string" } }, "required": [ "name", "spectrum_id", "contractor_id" ], "type": "object", "nullable": true }, "items": { "items": { "$ref": "#/components/schemas/RequisitionLineItem" }, "type": "array" }, "total_price": { "type": "number", "format": "double" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "order_id", "status", "kind", "title", "description", "buyer", "supplier", "supplier_contractor", "items", "total_price", "created_at", "updated_at" ], "type": "object", "additionalProperties": false }, "GetRequisitionsResponse": { "properties": { "requisitions": { "items": { "$ref": "#/components/schemas/RequisitionDetail" }, "type": "array" }, "total": { "type": "number", "format": "double" }, "page": { "type": "number", "format": "double" }, "page_size": { "type": "number", "format": "double" } }, "required": [ "requisitions", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "OfferRequisitionItem": { "description": "Item-anchored line item inside an offer negotiation on a requisition", "properties": { "id": { "type": "string" }, "offer_id": { "type": "string" }, "game_item_id": { "type": "string" }, "game_item_name": { "type": "string" }, "quantity": { "type": "number", "format": "double" }, "price_per_unit": { "type": "number", "format": "double" }, "listing_id": { "type": "string", "nullable": true, "description": "Optional: listing the supplier plans to fulfil from" }, "listing_title": { "type": "string", "nullable": true } }, "required": [ "id", "offer_id", "game_item_id", "game_item_name", "quantity", "price_per_unit" ], "type": "object", "additionalProperties": false }, "OfferRequisitionItemInput": { "properties": { "game_item_id": { "type": "string" }, "quantity": { "type": "number", "format": "double" }, "price_per_unit": { "type": "number", "format": "double" }, "listing_id": { "type": "string" } }, "required": [ "game_item_id", "quantity", "price_per_unit" ], "type": "object", "additionalProperties": false }, "SetOfferRequisitionItemsRequest": { "description": "Request body for creating or updating offer_requisition_items on an offer", "properties": { "offer_id": { "type": "string" }, "items": { "items": { "$ref": "#/components/schemas/OfferRequisitionItemInput" }, "type": "array" } }, "required": [ "offer_id", "items" ], "type": "object", "additionalProperties": false }, "OrderVariantDetail": { "description": "Variant details for orders (separate from listings to avoid TSOA conflicts)", "properties": { "variant_id": { "type": "string", "description": "UUID of the variant" }, "attributes": { "$ref": "#/components/schemas/VariantAttributes", "description": "Variant attributes (quality_tier, quality_value, crafted_source, etc)" }, "display_name": { "type": "string", "description": "Human-readable display name (e.g., \"Tier 5 (95.5%) - Crafted\")" }, "short_name": { "type": "string", "description": "Short name for compact display (e.g., \"T5 Crafted\")" } }, "required": [ "variant_id", "attributes", "display_name", "short_name" ], "type": "object", "additionalProperties": false }, "OrderItemDetail": { "description": "Detailed information about an order item\nRequirement 25.9: Create order_market_items_v2 entries for each item", "properties": { "order_item_id": { "type": "string", "description": "UUID of the order item" }, "listing_id": { "type": "string", "description": "UUID of the listing" }, "item_id": { "type": "string", "description": "UUID of the listing item" }, "listing_title": { "type": "string", "description": "Listing title" }, "variant": { "$ref": "#/components/schemas/OrderVariantDetail", "description": "Variant details with quality attributes" }, "quantity": { "type": "number", "format": "double", "description": "Quantity purchased" }, "price_per_unit": { "type": "number", "format": "double", "description": "Price per unit at time of purchase (snapshot)" }, "subtotal": { "type": "number", "format": "double", "description": "Subtotal for this item (quantity * price_per_unit)" } }, "required": [ "order_item_id", "listing_id", "item_id", "listing_title", "variant", "quantity", "price_per_unit", "subtotal" ], "type": "object", "additionalProperties": false }, "CreateOrderResponse": { "description": "Response from creating an order\nRequirement 25.10: Return order_id and order details on success", "properties": { "order_id": { "type": "string", "description": "UUID of the created order" }, "buyer_id": { "type": "string", "description": "UUID of the buyer" }, "shop_id": { "type": "string", "description": "Shop ID of the seller" }, "total_price": { "type": "number", "format": "double", "description": "Total price in aUEC (atomic units)" }, "status": { "type": "string", "description": "Order status" }, "created_at": { "type": "string", "description": "ISO 8601 timestamp of order creation" }, "items": { "items": { "$ref": "#/components/schemas/OrderItemDetail" }, "type": "array", "description": "Array of order items with variant details" }, "allocation_result": { "properties": { "total_allocated": { "type": "number", "format": "double" }, "total_requested": { "type": "number", "format": "double" }, "has_partial_allocations": { "type": "boolean" } }, "required": [ "total_allocated", "total_requested", "has_partial_allocations" ], "type": "object", "description": "Stock allocation result summary" } }, "required": [ "order_id", "buyer_id", "shop_id", "total_price", "status", "created_at", "items" ], "type": "object", "additionalProperties": false }, "OrderItemInput": { "description": "Individual item in an order request", "properties": { "listing_id": { "type": "string", "description": "UUID of the listing" }, "variant_id": { "type": "string", "description": "UUID of the specific variant to purchase" }, "quantity": { "type": "number", "format": "double", "description": "Quantity to purchase (must be > 0)" } }, "required": [ "listing_id", "variant_id", "quantity" ], "type": "object", "additionalProperties": false }, "CreateOrderRequest": { "description": "Request to create an order with variant-specific items\nRequirement 25.2: Accept array of items with listing_id, variant_id, and quantity", "properties": { "items": { "items": { "$ref": "#/components/schemas/OrderItemInput" }, "type": "array", "description": "Array of items to purchase" } }, "required": [ "items" ], "type": "object", "additionalProperties": false }, "OrderMarketListingV1": { "description": "V1 market listing in an order", "properties": { "listing_id": { "type": "string" }, "quantity": { "type": "number", "format": "double" }, "title": { "type": "string" }, "price": { "type": "number", "format": "double" } }, "required": [ "listing_id", "quantity", "title", "price" ], "type": "object", "additionalProperties": false }, "OrderVariantItem": { "properties": { "order_item_id": { "type": "string" }, "variant_id": { "type": "string" }, "quantity": { "type": "number", "format": "double" }, "price_per_unit": { "type": "number", "format": "double" }, "attributes": { "$ref": "#/components/schemas/VariantAttributes" }, "display_name": { "type": "string" }, "short_name": { "type": "string" } }, "required": [ "order_item_id", "variant_id", "quantity", "price_per_unit", "attributes", "display_name", "short_name" ], "type": "object", "additionalProperties": false }, "OrderMarketListingV2": { "description": "V2 market listing in an order with variant data", "properties": { "listing_id": { "type": "string" }, "quantity": { "type": "number", "format": "double" }, "title": { "type": "string" }, "price": { "type": "number", "format": "double" }, "photo": { "type": "string", "description": "First photo URL" }, "v2_variants": { "items": { "$ref": "#/components/schemas/OrderVariantItem" }, "type": "array", "description": "V2 variant items for this listing" } }, "required": [ "listing_id", "quantity", "title", "price", "v2_variants" ], "type": "object", "additionalProperties": false }, "GetOrderDetailResponse": { "description": "Response from getting order details\nRequirement 26.1-26.12: Return order metadata with buyer/seller info and variant details", "properties": { "order_id": { "type": "string", "description": "UUID of the order" }, "buyer": { "properties": { "avatar": { "type": "string", "nullable": true }, "display_name": { "type": "string" }, "username": { "type": "string" }, "user_id": { "type": "string" } }, "required": [ "avatar", "display_name", "username", "user_id" ], "type": "object", "description": "Buyer information" }, "seller": { "properties": { "slug": { "type": "string" }, "name": { "type": "string" }, "shop_id": { "type": "string" } }, "required": [ "slug", "name", "shop_id" ], "type": "object", "description": "Seller shop information" }, "total_price": { "type": "number", "format": "double", "description": "Total price in aUEC (atomic units)" }, "status": { "type": "string", "description": "Order status" }, "kind": { "type": "string", "description": "Order kind (Delivery, Escort, etc.)" }, "title": { "type": "string", "description": "Order title" }, "description": { "type": "string", "description": "Order description" }, "payment_type": { "type": "string", "description": "Payment type" }, "offer_session_id": { "type": "string", "nullable": true, "description": "Offer session ID (if created from offer)" }, "created_at": { "type": "string", "description": "ISO 8601 timestamp of order creation" }, "updated_at": { "type": "string", "description": "ISO 8601 timestamp of last update" }, "market_listings": { "items": { "$ref": "#/components/schemas/OrderMarketListingV1" }, "type": "array", "description": "V1 market listings from market_orders" }, "market_listings_v2": { "items": { "$ref": "#/components/schemas/OrderMarketListingV2" }, "type": "array", "description": "V2 market listings with variant data from order_market_items_v2" }, "items": { "items": { "$ref": "#/components/schemas/OrderItemDetail" }, "type": "array", "description": "V2-only order items (from order_market_items_v2)" } }, "required": [ "order_id", "buyer", "seller", "total_price", "status", "kind", "title", "description", "payment_type", "created_at", "updated_at", "market_listings", "market_listings_v2", "items" ], "type": "object", "additionalProperties": false }, "OrderPreview": { "description": "Order preview item for list display", "properties": { "order_id": { "type": "string", "description": "UUID of the order" }, "title": { "type": "string", "description": "Order title (from first listing)" }, "total_price": { "type": "number", "format": "double", "description": "Total price in aUEC" }, "status": { "type": "string", "description": "Order status" }, "created_at": { "type": "string", "description": "ISO 8601 timestamp of order creation" }, "updated_at": { "type": "string", "description": "ISO 8601 timestamp of last update" }, "buyer_username": { "type": "string", "description": "Buyer username" }, "shop_name": { "type": "string", "description": "Shop name (seller)" }, "shop_slug": { "type": "string", "description": "Shop slug (for linking to /shops/:slug)" }, "item_count": { "type": "number", "format": "double", "description": "Number of items in order" }, "quality_tier_min": { "type": "number", "format": "double", "description": "Minimum quality tier across all items" }, "quality_tier_max": { "type": "number", "format": "double", "description": "Maximum quality tier across all items" }, "buyer_avatar": { "type": "string", "nullable": true, "description": "Buyer avatar URL" }, "shop_logo": { "type": "string", "nullable": true, "description": "Shop logo URL" } }, "required": [ "order_id", "title", "total_price", "status", "created_at", "updated_at", "buyer_username", "shop_name", "shop_slug", "item_count" ], "type": "object", "additionalProperties": false }, "GetOrdersResponse": { "description": "Response from getting orders list", "properties": { "orders": { "items": { "$ref": "#/components/schemas/OrderPreview" }, "type": "array", "description": "Array of order previews" }, "total": { "type": "number", "format": "double", "description": "Total number of orders matching filters" }, "page": { "type": "number", "format": "double", "description": "Current page number" }, "page_size": { "type": "number", "format": "double", "description": "Number of results per page" } }, "required": [ "orders", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "ListingOrderSummary": { "description": "Order summary for a specific listing", "properties": { "order_id": { "type": "string" }, "status": { "type": "string" }, "created_at": { "type": "string" }, "buyer_name": { "type": "string" }, "quantity": { "type": "number", "format": "double" }, "price_per_unit": { "type": "number", "format": "double" } }, "required": [ "order_id", "status", "created_at", "buyer_name", "quantity", "price_per_unit" ], "type": "object", "additionalProperties": false }, "ListingOfferSummary": { "description": "Offer summary for a specific listing", "properties": { "session_id": { "type": "string" }, "status": { "type": "string" }, "created_at": { "type": "string" }, "buyer_name": { "type": "string" }, "quantity": { "type": "number", "format": "double" }, "price_per_unit": { "type": "number", "format": "double" } }, "required": [ "session_id", "status", "created_at", "buyer_name", "quantity", "price_per_unit" ], "type": "object", "additionalProperties": false }, "OrdersByListingResponse": { "description": "Response for orders/offers by listing", "properties": { "orders": { "items": { "$ref": "#/components/schemas/ListingOrderSummary" }, "type": "array" }, "offers": { "items": { "$ref": "#/components/schemas/ListingOfferSummary" }, "type": "array" } }, "required": [ "orders", "offers" ], "type": "object", "additionalProperties": false }, "OnboardingStatusResponse": { "properties": { "completed": { "type": "boolean" }, "completedAt": { "type": "string", "nullable": true }, "steps": { "properties": { "dmRemindersEnabled": { "type": "boolean" }, "hasEmail": { "type": "boolean" }, "hasAvailability": { "type": "boolean" }, "hasDiscord": { "type": "boolean" } }, "required": [ "dmRemindersEnabled", "hasEmail", "hasAvailability", "hasDiscord" ], "type": "object" } }, "required": [ "completed", "completedAt", "steps" ], "type": "object", "additionalProperties": false }, "Rating": { "properties": { "avg_rating": { "type": "number", "format": "double" }, "rating_count": { "type": "number", "format": "double" }, "streak": { "type": "number", "format": "double" }, "total_rating": { "type": "number", "format": "double" }, "total_orders": { "type": "number", "format": "double" }, "response_rate": { "type": "number", "format": "double" }, "total_assignments": { "type": "number", "format": "double" } }, "required": [ "avg_rating", "rating_count", "streak", "total_rating" ], "type": "object", "additionalProperties": false }, "BadgeMetadata": { "properties": { "avg_rating": { "type": "number", "format": "double" }, "rating_count": { "type": "number", "format": "double" }, "rating_streak": { "type": "number", "format": "double" }, "total_orders": { "type": "number", "format": "double" }, "fulfilled_orders": { "type": "number", "format": "double" }, "total_assignments": { "type": "number", "format": "double" }, "response_rate": { "type": "number", "format": "double" }, "total_rating": { "type": "number", "format": "double" }, "orders_last_30_days": { "type": "number", "format": "double" }, "orders_last_90_days": { "type": "number", "format": "double" }, "avg_completion_time_hours": { "type": "number", "format": "double", "nullable": true }, "account_age_months": { "type": "number", "format": "double" }, "account_created_at": { "type": "string", "nullable": true }, "donor_duration_months": { "type": "number", "format": "double", "nullable": true }, "calculated_at": { "type": "string" } }, "required": [ "avg_rating", "rating_count", "rating_streak", "total_orders", "fulfilled_orders", "total_assignments", "response_rate", "total_rating", "orders_last_30_days", "orders_last_90_days", "avg_completion_time_hours", "account_age_months", "account_created_at", "donor_duration_months", "calculated_at" ], "type": "object", "additionalProperties": false }, "BadgeData": { "properties": { "badge_ids": { "items": { "type": "string" }, "type": "array" }, "metadata": { "$ref": "#/components/schemas/BadgeMetadata" } }, "required": [ "badge_ids" ], "type": "object", "additionalProperties": false }, "MinimalUser": { "properties": { "username": { "type": "string" }, "avatar": { "type": "string" }, "display_name": { "type": "string" }, "rating": { "$ref": "#/components/schemas/Rating" }, "badges": { "allOf": [ { "$ref": "#/components/schemas/BadgeData" } ], "nullable": true }, "last_seen": { "type": "string", "format": "date-time" }, "in_game": { "type": "boolean" } }, "required": [ "username", "avatar", "display_name", "rating" ], "type": "object", "additionalProperties": false }, "MinimalContractor": { "properties": { "spectrum_id": { "type": "string" }, "name": { "type": "string" }, "avatar": { "type": "string" }, "rating": { "$ref": "#/components/schemas/Rating" }, "badges": { "allOf": [ { "$ref": "#/components/schemas/BadgeData" } ], "nullable": true }, "last_seen": { "type": "string", "format": "date-time" }, "members_online": { "type": "number", "format": "double" } }, "required": [ "spectrum_id", "name", "avatar", "rating" ], "type": "object", "additionalProperties": false }, "OfferMarketListingV1": { "properties": { "listing_id": { "type": "string" }, "quantity": { "type": "number", "format": "double" }, "title": { "type": "string" }, "price": { "type": "number", "format": "double" } }, "required": [ "listing_id", "quantity", "title", "price" ], "type": "object", "additionalProperties": false }, "OfferVariantItem": { "properties": { "variant_id": { "type": "string" }, "quantity": { "type": "number", "format": "double" }, "price_per_unit": { "type": "number", "format": "double" }, "attributes": { "$ref": "#/components/schemas/VariantAttributes" }, "display_name": { "type": "string" }, "short_name": { "type": "string" } }, "required": [ "variant_id", "quantity", "price_per_unit", "attributes", "display_name", "short_name" ], "type": "object", "additionalProperties": false }, "OfferMarketListingV2": { "properties": { "listing_id": { "type": "string" }, "quantity": { "type": "number", "format": "double" }, "title": { "type": "string" }, "price": { "type": "number", "format": "double" }, "photo": { "type": "string", "description": "First photo URL" }, "v2_variants": { "items": { "$ref": "#/components/schemas/OfferVariantItem" }, "type": "array", "description": "V2 variant items for this listing" } }, "required": [ "listing_id", "quantity", "title", "price", "v2_variants" ], "type": "object", "additionalProperties": false }, "OfferV2": { "properties": { "offer_id": { "type": "string" }, "kind": { "type": "string" }, "cost": { "type": "number", "format": "double" }, "title": { "type": "string" }, "description": { "type": "string" }, "payment_type": { "type": "string" }, "status": { "type": "string" }, "created_at": { "type": "string" }, "collateral": { "type": "number", "format": "double" }, "actor_username": { "type": "string", "description": "Username of the user who created this offer" }, "market_listings": { "items": { "$ref": "#/components/schemas/OfferMarketListingV1" }, "type": "array", "description": "V1 market listings from offer_market_items (empty when V2 data exists)" }, "market_listings_v2": { "items": { "$ref": "#/components/schemas/OfferMarketListingV2" }, "type": "array", "description": "V2 market listings with variant data from offer_market_items_v2" }, "service": { "properties": { "title": { "type": "string" }, "service_id": { "type": "string" } }, "required": [ "title", "service_id" ], "type": "object", "nullable": true } }, "required": [ "offer_id", "kind", "cost", "title", "description", "payment_type", "status", "created_at", "actor_username", "market_listings", "market_listings_v2" ], "type": "object", "additionalProperties": false }, "DBAvailabilityEntry": { "properties": { "contractor_id": { "type": "string", "nullable": true }, "user_id": { "type": "string" }, "start": { "type": "number", "format": "double" }, "finish": { "type": "number", "format": "double" } }, "required": [ "contractor_id", "user_id", "start", "finish" ], "type": "object", "additionalProperties": false }, "OfferAvailability": { "properties": { "customer": { "items": { "$ref": "#/components/schemas/DBAvailabilityEntry" }, "type": "array", "nullable": true }, "assigned": { "items": { "$ref": "#/components/schemas/DBAvailabilityEntry" }, "type": "array", "nullable": true } }, "required": [ "customer", "assigned" ], "type": "object", "additionalProperties": false }, "OfferSessionV2": { "description": "V2 serialization of an offer session with variant-enriched market listings", "properties": { "session_id": { "type": "string" }, "status": { "type": "string" }, "created_at": { "type": "string" }, "order_id": { "type": "string" }, "contract_id": { "type": "string", "nullable": true }, "discord_thread_id": { "type": "string", "nullable": true }, "discord_server_id": { "type": "string", "nullable": true }, "discord_invite": { "type": "string", "nullable": true }, "customer": { "$ref": "#/components/schemas/MinimalUser" }, "assigned_to": { "allOf": [ { "$ref": "#/components/schemas/MinimalUser" } ], "nullable": true }, "contractor": { "allOf": [ { "$ref": "#/components/schemas/MinimalContractor" } ], "nullable": true }, "shop_slug": { "type": "string", "nullable": true, "description": "Shop slug for the seller — use to filter listings in counteroffers" }, "offers": { "items": { "$ref": "#/components/schemas/OfferV2" }, "type": "array" }, "availability": { "allOf": [ { "$ref": "#/components/schemas/OfferAvailability" } ], "nullable": true } }, "required": [ "session_id", "status", "created_at", "customer", "assigned_to", "contractor", "offers" ], "type": "object", "additionalProperties": false }, "SearchOffersV2Response": { "properties": { "offers": { "items": { "$ref": "#/components/schemas/OfferSessionV2" }, "type": "array" }, "total": { "type": "number", "format": "double" }, "page": { "type": "number", "format": "double" }, "page_size": { "type": "number", "format": "double" } }, "required": [ "offers", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "GetOfferSessionV2Response": { "properties": { "session_id": { "type": "string" }, "status": { "type": "string" }, "created_at": { "type": "string" }, "order_id": { "type": "string" }, "contract_id": { "type": "string", "nullable": true }, "discord_thread_id": { "type": "string", "nullable": true }, "discord_server_id": { "type": "string", "nullable": true }, "discord_invite": { "type": "string", "nullable": true }, "customer": { "$ref": "#/components/schemas/MinimalUser" }, "assigned_to": { "allOf": [ { "$ref": "#/components/schemas/MinimalUser" } ], "nullable": true }, "contractor": { "allOf": [ { "$ref": "#/components/schemas/MinimalContractor" } ], "nullable": true }, "shop_slug": { "type": "string", "nullable": true, "description": "Shop slug for the seller — use to filter listings in counteroffers" }, "offers": { "items": { "$ref": "#/components/schemas/OfferV2" }, "type": "array" }, "availability": { "allOf": [ { "$ref": "#/components/schemas/OfferAvailability" } ], "nullable": true } }, "required": [ "session_id", "status", "created_at", "customer", "assigned_to", "contractor", "offers" ], "type": "object", "additionalProperties": false }, "CreateListingResponse": { "description": "Response for creating a listing", "properties": { "listing_id": { "type": "string" }, "shop_id": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "status": { "type": "string", "enum": [ "active", "inactive", "sold", "expired", "cancelled" ] }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "listing_id", "shop_id", "title", "description", "status", "created_at", "updated_at" ], "type": "object", "additionalProperties": false }, "StockLotInput": { "description": "Input for creating a stock lot with variant attributes", "properties": { "quantity": { "type": "number", "format": "double", "description": "Quantity of items in this lot (must be > 0)" }, "variant_attributes": { "$ref": "#/components/schemas/VariantAttributes", "description": "Variant attributes for this lot" }, "location_id": { "type": "string", "description": "Optional location ID where items are stored" }, "price": { "type": "number", "format": "double", "description": "Price for this variant (required if pricing_mode is 'per_variant')" } }, "required": [ "quantity", "variant_attributes" ], "type": "object", "additionalProperties": false }, "BulkDiscountTier": { "description": "A single bulk discount tier: buy at least min_quantity to get discount_percent off", "properties": { "min_quantity": { "type": "number", "format": "double", "description": "Minimum quantity to qualify for this discount" }, "discount_percent": { "type": "number", "format": "double", "description": "Discount percentage (0-100)" } }, "required": [ "min_quantity", "discount_percent" ], "type": "object", "additionalProperties": false }, "CreateListingRequest": { "description": "Request body for creating a new listing", "properties": { "title": { "type": "string", "description": "Listing title (max 500 chars)" }, "description": { "type": "string", "description": "Listing description (markdown supported)" }, "game_item_id": { "type": "string", "description": "Game item UUID being sold" }, "pricing_mode": { "type": "string", "enum": [ "unified", "per_variant" ], "description": "Pricing strategy: unified price for all variants or per-variant pricing" }, "base_price": { "type": "number", "format": "double", "description": "Base price for all variants (required if pricing_mode is 'unified')" }, "lots": { "items": { "$ref": "#/components/schemas/StockLotInput" }, "type": "array", "description": "Array of stock lots with variant attributes" }, "photo_resource_ids": { "items": { "type": "string" }, "type": "array", "description": "Optional array of image resource UUIDs to attach as photos" }, "external_photo_urls": { "items": { "type": "string" }, "type": "array", "description": "Optional array of external image URLs to link as photos (validated against domain allowlist)" }, "pickup_method": { "type": "string", "enum": [ "delivery", "pickup", "any" ], "description": "Pickup method: how the buyer receives the item" }, "quantity_unit": { "type": "string", "enum": [ "unit", "scu" ], "description": "Quantity unit: 'unit' for discrete items, 'scu' for cargo measured in cSCU" }, "min_order_quantity": { "type": "number", "format": "double", "description": "Minimum quantity per order for this listing" }, "max_order_quantity": { "type": "number", "format": "double", "description": "Maximum quantity per order for this listing" }, "min_order_value": { "type": "number", "format": "double", "description": "Minimum order value (aUEC) for this listing" }, "max_order_value": { "type": "number", "format": "double", "description": "Maximum order value (aUEC) for this listing" }, "bulk_discount_tiers": { "items": { "$ref": "#/components/schemas/BulkDiscountTier" }, "type": "array", "description": "Optional bulk discount tiers sorted by min_quantity ascending" }, "shop_id": { "type": "string", "description": "Shop ID to create the listing under. Required — use GET /shops/mine to list available shops, or POST /shops/quick to create one." }, "sale_type": { "type": "string", "enum": [ "fixed", "auction", "negotiable" ], "description": "Sale type: fixed price, auction, or negotiable" }, "auction_details": { "properties": { "reserve_price": { "type": "number", "format": "double", "description": "Optional reserve price — auction won't sell below this" }, "buyout_price": { "type": "number", "format": "double", "description": "Optional buyout price in aUEC" }, "min_bid_increment": { "type": "number", "format": "double", "description": "Minimum bid increment in aUEC" }, "end_time": { "type": "string", "description": "When the auction ends (ISO 8601)" } }, "required": [ "min_bid_increment", "end_time" ], "type": "object", "description": "Auction details — required when sale_type is 'auction'" }, "status": { "type": "string", "enum": [ "active", "inactive" ], "description": "Initial listing status (default: 'active'). Use 'inactive' for draft/prep." }, "visibility": { "type": "string", "enum": [ "public", "private" ], "description": "Listing visibility (default: 'public'). Use 'private' for org-internal listings (contractor only)." } }, "required": [ "title", "description", "game_item_id", "pricing_mode", "lots", "shop_id" ], "type": "object", "additionalProperties": false }, "ListingSearchResult": { "description": "Individual listing result in search response", "properties": { "listing_id": { "type": "string", "description": "Listing UUID" }, "title": { "type": "string", "description": "Listing title" }, "shop_id": { "type": "string", "description": "Shop ID this listing belongs to" }, "shop_name": { "type": "string", "description": "Shop name" }, "shop_slug": { "type": "string", "description": "Shop slug — use for profile links: /shops/:slug" }, "shop_logo": { "type": "string", "description": "Shop logo URL" }, "shop_rating": { "type": "number", "format": "double", "description": "Shop rating (0-5)" }, "shop_rating_count": { "type": "number", "format": "double", "description": "Shop rating count" }, "shop_badge_ids": { "items": { "type": "string" }, "type": "array", "description": "Shop seller reputation badges, computed server-side" }, "shop_languages": { "items": { "type": "string" }, "type": "array", "description": "Shop supported languages (ISO 639-1 codes)" }, "price_min": { "type": "number", "format": "double", "description": "Minimum price across all variants" }, "price_max": { "type": "number", "format": "double", "description": "Maximum price across all variants" }, "quantity_available": { "type": "number", "format": "double", "description": "Total quantity available across all variants" }, "quality_tier_min": { "type": "number", "format": "double", "description": "Minimum quality tier available (1-5)" }, "quality_tier_max": { "type": "number", "format": "double", "description": "Maximum quality tier available (1-5)" }, "quality_value_min": { "type": "number", "format": "double", "description": "Minimum quality value available (0-1000)" }, "quality_value_max": { "type": "number", "format": "double", "description": "Maximum quality value available (0-1000)" }, "variant_count": { "type": "number", "format": "double", "description": "Number of unique variants in this listing" }, "created_at": { "type": "string", "description": "ISO 8601 timestamp when listing was created" }, "updated_at": { "type": "string", "description": "ISO 8601 timestamp when listing was last updated" }, "game_item_id": { "type": "string", "description": "Game item catalog UUID — used by clients to fetch item-level aggregate\ndata (e.g. buy orders for this item) from a search result." }, "game_item_name": { "type": "string", "description": "Game item name" }, "game_item_type": { "type": "string", "description": "Game item type/category" }, "photo": { "type": "string", "description": "First photo URL (null if no photos)" }, "pickup_method": { "type": "string", "enum": [ "delivery", "pickup", "any", null ], "nullable": true, "description": "Pickup method: delivery, pickup, any, or null (not specified)" }, "quantity_unit": { "type": "string", "enum": [ "unit", "scu" ], "description": "Quantity unit: 'unit' or 'scu'" }, "has_bulk_discount": { "type": "boolean", "description": "Whether this listing has bulk discount tiers defined" }, "visibility": { "type": "string", "enum": [ "public", "private", "unlisted" ], "description": "Listing visibility: public, private (org-only), or unlisted" } }, "required": [ "listing_id", "title", "shop_id", "shop_name", "shop_slug", "shop_rating", "shop_rating_count", "shop_badge_ids", "shop_languages", "price_min", "price_max", "quantity_available", "variant_count", "created_at", "updated_at", "game_item_id", "game_item_name", "game_item_type", "quantity_unit" ], "type": "object", "additionalProperties": false }, "SearchListingsResponse": { "description": "Response for listing search with pagination", "properties": { "listings": { "items": { "$ref": "#/components/schemas/ListingSearchResult" }, "type": "array", "description": "Array of listing results" }, "total": { "type": "number", "format": "double", "description": "Total number of listings matching filters" }, "page": { "type": "number", "format": "double", "description": "Current page number" }, "page_size": { "type": "number", "format": "double", "description": "Number of results per page" } }, "required": [ "listings", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "MyListingItem": { "description": "Individual listing item in my listings response", "properties": { "listing_id": { "type": "string", "description": "Listing UUID" }, "title": { "type": "string", "description": "Listing title" }, "status": { "type": "string", "description": "Current status" }, "created_at": { "type": "string", "description": "ISO 8601 timestamp when listing was created" }, "updated_at": { "type": "string", "description": "ISO 8601 timestamp when listing was last updated" }, "variant_count": { "type": "number", "format": "double", "description": "Number of unique variants" }, "quantity_available": { "type": "number", "format": "double", "description": "Total quantity available across all variants" }, "price_min": { "type": "number", "format": "double", "description": "Minimum price across all variants" }, "price_max": { "type": "number", "format": "double", "description": "Maximum price across all variants" }, "quality_tier_min": { "type": "number", "format": "double", "description": "Minimum quality tier available (1-5)" }, "quality_tier_max": { "type": "number", "format": "double", "description": "Maximum quality tier available (1-5)" }, "photo": { "type": "string", "description": "Primary photo URL" }, "expires_at": { "type": "string", "description": "ISO 8601 timestamp when listing expires (null if no expiry)" }, "visibility": { "type": "string", "enum": [ "public", "private" ], "description": "Listing visibility: public or private (org-only)" } }, "required": [ "listing_id", "title", "status", "created_at", "updated_at", "variant_count", "quantity_available", "price_min", "price_max" ], "type": "object", "additionalProperties": false }, "GetMyListingsResponse": { "description": "Response for my listings with pagination", "properties": { "listings": { "items": { "$ref": "#/components/schemas/MyListingItem" }, "type": "array", "description": "Array of user's listings" }, "total": { "type": "number", "format": "double", "description": "Total number of listings matching filters" }, "page": { "type": "number", "format": "double", "description": "Current page number" }, "page_size": { "type": "number", "format": "double", "description": "Number of results per page" } }, "required": [ "listings", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "InventoryMaterial": { "description": "Aggregated inventory material", "properties": { "game_item_id": { "type": "string" }, "game_item_name": { "type": "string" }, "game_item_type": { "type": "string" }, "game_item_icon": { "type": "string" }, "total_quantity": { "type": "number", "format": "double" }, "avg_quality_value": { "type": "number", "format": "double" }, "max_quality_value": { "type": "number", "format": "double" } }, "required": [ "game_item_id", "game_item_name", "total_quantity" ], "type": "object", "additionalProperties": false }, "InventorySummaryResponse": { "properties": { "materials": { "items": { "$ref": "#/components/schemas/InventoryMaterial" }, "type": "array" } }, "required": [ "materials" ], "type": "object", "additionalProperties": false }, "ListingDetail": { "description": "Core listing metadata", "properties": { "listing_id": { "type": "string", "description": "Listing UUID" }, "shop_id": { "type": "string", "description": "Shop ID this listing belongs to" }, "title": { "type": "string", "description": "Listing title" }, "description": { "type": "string", "description": "Listing description (markdown)" }, "status": { "type": "string", "enum": [ "active", "inactive", "sold", "expired", "cancelled" ], "description": "Current listing status" }, "visibility": { "type": "string", "enum": [ "public", "private", "unlisted" ], "description": "Visibility setting" }, "sale_type": { "type": "string", "enum": [ "fixed", "auction", "negotiable" ], "description": "Sale type" }, "listing_type": { "type": "string", "enum": [ "single", "bundle", "bulk" ], "description": "Listing type" }, "created_at": { "type": "string", "description": "ISO 8601 timestamp when listing was created" }, "updated_at": { "type": "string", "description": "ISO 8601 timestamp when listing was last updated" }, "expires_at": { "type": "string", "description": "Optional ISO 8601 timestamp when listing expires" }, "photos": { "items": { "type": "string" }, "type": "array", "description": "Array of photo URLs" }, "pickup_method": { "type": "string", "enum": [ "delivery", "pickup", "any", null ], "nullable": true, "description": "Pickup method: delivery, pickup, any, or null (not specified)" }, "quantity_unit": { "type": "string", "enum": [ "unit", "scu" ], "description": "Quantity unit: 'unit' or 'scu'" }, "min_order_quantity": { "type": "number", "format": "double", "nullable": true, "description": "Per-listing order limits (null = no limit)" }, "max_order_quantity": { "type": "number", "format": "double", "nullable": true }, "min_order_value": { "type": "number", "format": "double", "nullable": true }, "max_order_value": { "type": "number", "format": "double", "nullable": true }, "view_count": { "type": "number", "format": "double", "description": "Number of views this listing has received" }, "in_carts": { "type": "number", "format": "double", "description": "Number of users who have this listing in their cart" } }, "required": [ "listing_id", "shop_id", "title", "description", "status", "visibility", "sale_type", "listing_type", "created_at", "updated_at", "quantity_unit" ], "type": "object", "additionalProperties": false }, "SellerInfo": { "description": "Shop information for a listing's seller", "properties": { "shop_id": { "type": "string", "description": "Shop ID" }, "name": { "type": "string", "description": "Shop name" }, "slug": { "type": "string", "description": "Shop slug — use for profile links: /shops/:slug" }, "rating": { "type": "number", "format": "double", "description": "Shop rating (0-5)" }, "logo_url": { "type": "string", "description": "Shop logo URL" }, "languages": { "items": { "type": "string" }, "type": "array", "description": "Shop supported languages (ISO 639-1 codes)" } }, "required": [ "shop_id", "name", "slug", "rating", "languages" ], "type": "object", "additionalProperties": false }, "GameItemInfo": { "description": "Game item information", "properties": { "id": { "type": "string", "description": "Game item UUID" }, "name": { "type": "string", "description": "Item name" }, "type": { "type": "string", "description": "Item type/category" }, "image_url": { "type": "string", "description": "Optional item image URL" } }, "required": [ "id", "name", "type" ], "type": "object", "additionalProperties": false }, "VariantDetail": { "description": "Variant detail with attributes, quantity, and price", "properties": { "variant_id": { "type": "string", "description": "Variant UUID" }, "attributes": { "$ref": "#/components/schemas/VariantAttributes", "description": "Variant attributes (quality tier, crafted source, etc)" }, "display_name": { "type": "string", "description": "Human-readable display name (e.g., \"Tier 5 (95.5%) - Crafted\")" }, "short_name": { "type": "string", "description": "Short name for compact display (e.g., \"T5 Crafted\")" }, "quantity": { "type": "number", "format": "double", "description": "Total quantity available for this variant" }, "price": { "type": "number", "format": "double", "description": "Price for this variant" }, "locations": { "items": { "type": "string" }, "type": "array", "description": "Location names where this variant is stored" } }, "required": [ "variant_id", "attributes", "display_name", "short_name", "quantity", "price", "locations" ], "type": "object", "additionalProperties": false }, "ListingItemDetail": { "description": "Item detail with game item info and variants", "properties": { "item_id": { "type": "string", "description": "Item UUID" }, "game_item": { "$ref": "#/components/schemas/GameItemInfo", "description": "Game item information" }, "pricing_mode": { "type": "string", "enum": [ "unified", "per_variant" ], "description": "Pricing strategy for this item" }, "base_price": { "type": "number", "format": "double", "description": "Base price (used when pricing_mode is 'unified')" }, "variants": { "items": { "$ref": "#/components/schemas/VariantDetail" }, "type": "array", "description": "Array of variants with quantities and prices" }, "bulk_discount_tiers": { "items": { "$ref": "#/components/schemas/BulkDiscountTier" }, "type": "array", "nullable": true, "description": "Bulk discount tiers (null if none defined)" } }, "required": [ "item_id", "game_item", "pricing_mode", "variants" ], "type": "object", "additionalProperties": false }, "GetListingDetailResponse": { "description": "Complete listing detail response with all related data", "properties": { "listing": { "$ref": "#/components/schemas/ListingDetail", "description": "Core listing metadata" }, "seller": { "$ref": "#/components/schemas/SellerInfo", "description": "Seller information" }, "items": { "items": { "$ref": "#/components/schemas/ListingItemDetail" }, "type": "array", "description": "Array of items being sold with variant breakdown" } }, "required": [ "listing", "seller", "items" ], "type": "object", "additionalProperties": false }, "VariantPriceUpdate": { "description": "Update for a specific variant's price", "properties": { "variant_id": { "type": "string", "description": "Variant UUID" }, "price": { "type": "number", "format": "double", "description": "New price for this variant" } }, "required": [ "variant_id", "price" ], "type": "object", "additionalProperties": false }, "LotUpdate": { "description": "Update for a specific stock lot", "properties": { "lot_id": { "type": "string", "description": "Stock lot UUID" }, "quantity_total": { "type": "number", "format": "double", "description": "New total quantity (optional)" }, "listed": { "type": "boolean", "description": "New listed status (optional)" }, "location_id": { "type": "string", "description": "New location ID (optional)" } }, "required": [ "lot_id" ], "type": "object", "additionalProperties": false }, "UpdateListingRequest": { "description": "Request body for updating an existing listing", "properties": { "title": { "type": "string", "description": "New title (optional)" }, "status": { "type": "string", "enum": [ "active", "inactive", "sold", "expired", "cancelled" ], "description": "New status (optional) — active, inactive, sold, expired, cancelled" }, "description": { "type": "string", "description": "New description (optional)" }, "base_price": { "type": "number", "format": "double", "description": "New base price for unified pricing mode (optional)" }, "variant_prices": { "items": { "$ref": "#/components/schemas/VariantPriceUpdate" }, "type": "array", "description": "Array of variant price updates for per_variant pricing mode (optional)" }, "lot_updates": { "items": { "$ref": "#/components/schemas/LotUpdate" }, "type": "array", "description": "Array of stock lot updates (optional)" }, "pickup_method": { "type": "string", "enum": [ "delivery", "pickup", "any", null ], "nullable": true, "description": "Pickup method: how the buyer receives the item" }, "photos": { "items": { "type": "string" }, "type": "array", "description": "Replace listing photos with these URLs (handles removals)" }, "quantity_unit": { "type": "string", "enum": [ "unit", "scu" ], "description": "Quantity unit" }, "min_order_quantity": { "type": "number", "format": "double", "nullable": true, "description": "Per-listing order limits (null to remove)" }, "max_order_quantity": { "type": "number", "format": "double", "nullable": true }, "min_order_value": { "type": "number", "format": "double", "nullable": true }, "max_order_value": { "type": "number", "format": "double", "nullable": true }, "bulk_discount_tiers": { "items": { "$ref": "#/components/schemas/BulkDiscountTier" }, "type": "array", "description": "Updated bulk discount tiers (pass [] to remove, omit to keep unchanged)" }, "photo_resource_ids": { "items": { "type": "string" }, "type": "array", "description": "New photo resource IDs to append (from two-phase upload)" }, "external_photo_urls": { "items": { "type": "string" }, "type": "array", "description": "New external image URLs to link as photos (validated against domain allowlist, appended after resource IDs)" }, "visibility": { "type": "string", "enum": [ "public", "private" ], "description": "Listing visibility (null to keep unchanged). Only contractor listings can be 'private'." } }, "type": "object", "additionalProperties": false }, "InventoryLotDetail": { "properties": { "lot_id": { "type": "string" }, "owner_id": { "type": "string" }, "game_item_id": { "type": "string", "nullable": true }, "game_item_name": { "type": "string", "nullable": true }, "game_item_image": { "type": "string", "nullable": true }, "variant_id": { "type": "string", "nullable": true }, "variant_display_name": { "type": "string", "nullable": true }, "listing_id": { "type": "string", "nullable": true }, "listing_title": { "type": "string", "nullable": true }, "listing_photo": { "type": "string", "nullable": true }, "quantity_total": { "type": "number", "format": "double" }, "location_id": { "type": "string", "nullable": true }, "location_name": { "type": "string", "nullable": true }, "listed": { "type": "boolean" }, "notes": { "type": "string", "nullable": true }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "lot_id", "owner_id", "game_item_id", "game_item_name", "game_item_image", "variant_id", "variant_display_name", "listing_id", "listing_title", "listing_photo", "quantity_total", "location_id", "location_name", "listed", "notes", "created_at", "updated_at" ], "type": "object", "additionalProperties": false }, "InventoryResponse": { "properties": { "lots": { "items": { "$ref": "#/components/schemas/InventoryLotDetail" }, "type": "array" }, "total": { "type": "number", "format": "double" }, "page": { "type": "number", "format": "double" }, "page_size": { "type": "number", "format": "double" } }, "required": [ "lots", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "CreateInventoryLotRequest": { "properties": { "game_item_id": { "type": "string", "nullable": true }, "variant_id": { "type": "string", "nullable": true }, "quantity": { "type": "number", "format": "double" }, "location_id": { "type": "string", "nullable": true }, "notes": { "type": "string", "nullable": true } }, "required": [ "quantity" ], "type": "object", "additionalProperties": false }, "LinkToListingRequest": { "properties": { "listing_id": { "type": "string" } }, "required": [ "listing_id" ], "type": "object", "additionalProperties": false }, "ScmdbIngestResponse": { "properties": { "ok": { "type": "boolean" } }, "required": [ "ok" ], "type": "object", "additionalProperties": false }, "ScmdbStatusResponse": { "properties": { "is_connected": { "type": "boolean" }, "ingest_url": { "type": "string", "nullable": true }, "last_event_at": { "type": "string", "nullable": true }, "created_at": { "type": "string", "nullable": true } }, "required": [ "is_connected", "ingest_url", "last_event_at", "created_at" ], "type": "object", "additionalProperties": false }, "ScmdbConnectResponse": { "properties": { "ingest_url": { "type": "string" } }, "required": [ "ingest_url" ], "type": "object", "additionalProperties": false }, "ImportSource": { "type": "string", "enum": [ "cstone-items", "uex-items", "uex-attributes", "shop-inventories" ] }, "JobStatus": { "type": "string", "enum": [ "running", "completed", "failed" ] }, "Record_string.unknown_": { "properties": {}, "additionalProperties": {}, "type": "object", "description": "Construct a type with a set of properties K of type T" }, "ImportJob": { "properties": { "id": { "type": "string" }, "source": { "$ref": "#/components/schemas/ImportSource" }, "status": { "$ref": "#/components/schemas/JobStatus" }, "startedAt": { "type": "string" }, "completedAt": { "type": "string", "nullable": true }, "result": { "allOf": [ { "$ref": "#/components/schemas/Record_string.unknown_" } ], "nullable": true, "description": "Free-form summary emitted by the import runner. Each source returns a\ndifferent shape, so this is only logged and serialised — never indexed." }, "error": { "type": "string", "nullable": true } }, "required": [ "id", "source", "status", "startedAt", "completedAt", "result", "error" ], "type": "object", "additionalProperties": false }, "ImageUploadResponse": { "description": "Response for a single image upload", "properties": { "resource_id": { "type": "string" }, "url": { "type": "string" } }, "required": [ "resource_id", "url" ], "type": "object", "additionalProperties": false }, "HealthResponse": { "properties": { "status": { "type": "string" }, "version": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "status", "version", "timestamp" ], "type": "object", "additionalProperties": false }, "GameItemSearchResult": { "description": "Search result for a game item", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" } }, "required": [ "id", "name", "type" ], "type": "object", "additionalProperties": false }, "GameItemCategory": { "description": "Category entry", "properties": { "category": { "type": "string" }, "game_item_categories": { "type": "string" }, "subcategory": { "type": "string" } }, "required": [ "category", "game_item_categories" ], "type": "object", "additionalProperties": false }, "GameItemMetadata": { "description": "Game item metadata", "properties": { "id": { "type": "string", "description": "Game item UUID" }, "name": { "type": "string", "description": "Game item name" }, "type": { "type": "string", "description": "Game item type" }, "image_url": { "type": "string", "description": "Game item image URL" } }, "required": [ "id", "name", "type" ], "type": "object", "additionalProperties": false }, "GameItemQualityDistribution": { "description": "Quality tier distribution data for a game item", "properties": { "quality_tier": { "type": "number", "format": "double", "description": "Quality tier (1-5)" }, "quantity_available": { "type": "number", "format": "double", "description": "Total quantity available for this tier across all listings" }, "price_min": { "type": "number", "format": "double", "description": "Minimum price for this tier" }, "price_max": { "type": "number", "format": "double", "description": "Maximum price for this tier" }, "price_avg": { "type": "number", "format": "double", "description": "Average price for this tier" }, "shop_count": { "type": "number", "format": "double", "description": "Number of unique shops offering this tier" }, "listing_count": { "type": "number", "format": "double", "description": "Number of listings offering this tier" } }, "required": [ "quality_tier", "quantity_available", "price_min", "price_max", "price_avg", "shop_count", "listing_count" ], "type": "object", "additionalProperties": false }, "GameItemListingResult": { "description": "Per-variant listing result for game item listings endpoint.\n\nEach row represents a single (listing × quality variant) — a cart-ready\ncomparable. A listing that offers multiple quality tiers produces one row\nper variant.", "properties": { "listing_id": { "type": "string", "description": "Listing UUID" }, "variant_id": { "type": "string", "description": "Variant UUID (the item_variants.variant_id for this row)" }, "title": { "type": "string", "description": "Listing title" }, "shop_id": { "type": "string", "description": "Shop ID" }, "shop_name": { "type": "string", "description": "Shop name" }, "shop_rating": { "type": "number", "format": "double", "description": "Shop rating (0-5)" }, "shop_rating_count": { "type": "number", "format": "double", "description": "Number of ratings the shop has — used to weight \"top rated\" so a 5★/1-review\nshop doesn't outrank a 4.9★/300-review one." }, "shop_badge_ids": { "items": { "type": "string" }, "type": "array", "description": "Shop seller reputation badges, computed server-side (mirrors search DTO)" }, "shop_slug": { "type": "string", "description": "Shop slug — use for profile links: /shops/:slug" }, "price": { "type": "number", "format": "double", "description": "Price for this variant" }, "quantity_available": { "type": "number", "format": "double", "description": "Quantity available for this variant (summed across its lots)" }, "quality_tier": { "type": "number", "format": "double", "description": "Quality tier for this variant (1-5), if defined" }, "quality_value": { "type": "number", "format": "double", "description": "Numeric quality value for this variant, if defined" }, "variant_display_name": { "type": "string", "description": "Variant display name (from item_variants.display_name)" }, "variant_short_name": { "type": "string", "description": "Variant short name (from item_variants.short_name)" }, "created_at": { "type": "string", "description": "Listing created timestamp" } }, "required": [ "listing_id", "variant_id", "title", "shop_id", "shop_name", "shop_rating", "shop_rating_count", "shop_badge_ids", "shop_slug", "price", "quantity_available", "created_at" ], "type": "object", "additionalProperties": false }, "GetGameItemListingsResponse": { "description": "Response for game item listings endpoint", "properties": { "game_item": { "$ref": "#/components/schemas/GameItemMetadata", "description": "Game item metadata" }, "quality_distribution": { "items": { "$ref": "#/components/schemas/GameItemQualityDistribution" }, "type": "array", "description": "Quality distribution across all listings" }, "listings": { "items": { "$ref": "#/components/schemas/GameItemListingResult" }, "type": "array", "description": "Per-variant listing rows for this game item (one row per listing × variant)" }, "total": { "type": "number", "format": "double", "description": "Total number of variant rows (for pagination)" }, "page": { "type": "number", "format": "double", "description": "Current page number" }, "page_size": { "type": "number", "format": "double", "description": "Page size" } }, "required": [ "game_item", "quality_distribution", "listings", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "GameItemAggregate": { "description": "A single game item aggregate — one row per game item with totals across all sellers", "properties": { "game_item_id": { "type": "string", "description": "Game item UUID" }, "name": { "type": "string", "description": "Game item name" }, "type": { "type": "string", "description": "Game item type/category" }, "image_url": { "type": "string", "description": "Game item image URL" }, "min_price": { "type": "number", "format": "double", "description": "Minimum price across all listings for this item" }, "max_price": { "type": "number", "format": "double", "description": "Maximum price across all listings for this item" }, "total_quantity": { "type": "number", "format": "double", "description": "Total quantity available across all sellers" }, "listing_count": { "type": "number", "format": "double", "description": "Number of active listings" }, "shop_count": { "type": "number", "format": "double", "description": "Number of unique sellers" }, "quality_tier_min": { "type": "number", "format": "double", "description": "Minimum quality tier available" }, "quality_tier_max": { "type": "number", "format": "double", "description": "Maximum quality tier available" } }, "required": [ "game_item_id", "name", "type", "min_price", "max_price", "total_quantity", "listing_count", "shop_count" ], "type": "object", "additionalProperties": false }, "SearchGameItemAggregatesResponse": { "description": "Response for game item aggregate search", "properties": { "items": { "items": { "$ref": "#/components/schemas/GameItemAggregate" }, "type": "array", "description": "Array of game item aggregates" }, "total": { "type": "number", "format": "double", "description": "Total number of game items with active listings" }, "page": { "type": "number", "format": "double", "description": "Current page" }, "page_size": { "type": "number", "format": "double", "description": "Page size" } }, "required": [ "items", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "Wishlist": { "description": "Complete wishlist data", "properties": { "wishlist_id": { "type": "string" }, "user_id": { "type": "string" }, "wishlist_name": { "type": "string" }, "wishlist_description": { "type": "string" }, "is_public": { "type": "boolean" }, "share_token": { "type": "string" }, "organization_id": { "type": "string" }, "is_collaborative": { "type": "boolean" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "wishlist_id", "user_id", "wishlist_name", "is_public", "is_collaborative", "created_at", "updated_at" ], "type": "object", "additionalProperties": false }, "ListWishlistsResponse": { "description": "Response for list wishlists endpoint", "properties": { "wishlists": { "items": { "allOf": [ { "$ref": "#/components/schemas/Wishlist" }, { "properties": { "progress_percentage": { "type": "number", "format": "double" }, "completed_items": { "type": "number", "format": "double" }, "item_count": { "type": "number", "format": "double" } }, "required": [ "progress_percentage", "completed_items", "item_count" ], "type": "object" } ] }, "type": "array" } }, "required": [ "wishlists" ], "type": "object", "additionalProperties": false }, "CreateWishlistRequest": { "description": "Request to create a new wishlist", "properties": { "wishlist_name": { "type": "string", "description": "Wishlist name" }, "wishlist_description": { "type": "string", "description": "Optional description" }, "is_public": { "type": "boolean", "description": "Is wishlist public" }, "organization_id": { "type": "string", "description": "Optional organization ID for org wishlists" }, "is_collaborative": { "type": "boolean", "description": "Is collaborative (multiple users can edit)" } }, "required": [ "wishlist_name", "is_public", "is_collaborative" ], "type": "object", "additionalProperties": false }, "AcquisitionMode": { "type": "string", "enum": [ "buy", "craft" ], "description": "How the user intends to acquire this item\n- \"buy\": Purchase the finished item from the market\n- \"craft\": Craft the item — ingredients will be added to the shopping list" }, "WishlistItemWithDetails": { "description": "Wishlist item with enriched data", "properties": { "item_id": { "type": "string" }, "wishlist_id": { "type": "string" }, "game_item_id": { "type": "string" }, "desired_quantity": { "type": "number", "format": "double" }, "desired_quality_tier": { "type": "number", "format": "double" }, "blueprint_id": { "type": "string" }, "acquisition_mode": { "$ref": "#/components/schemas/AcquisitionMode" }, "priority": { "type": "number", "format": "double" }, "notes": { "type": "string" }, "is_acquired": { "type": "boolean" }, "acquired_quantity": { "type": "number", "format": "double" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "game_item_name": { "type": "string" }, "game_item_icon": { "type": "string" }, "game_item_type": { "type": "string" }, "blueprint_name": { "type": "string" }, "estimated_cost": { "type": "number", "format": "double" }, "crafting_available": { "type": "boolean" } }, "required": [ "item_id", "wishlist_id", "game_item_id", "desired_quantity", "acquisition_mode", "priority", "is_acquired", "acquired_quantity", "created_at", "updated_at", "game_item_name", "game_item_type", "crafting_available" ], "type": "object", "additionalProperties": false }, "GetWishlistResponse": { "description": "Response for get wishlist detail endpoint", "properties": { "wishlist": { "$ref": "#/components/schemas/Wishlist" }, "items": { "items": { "$ref": "#/components/schemas/WishlistItemWithDetails" }, "type": "array" }, "statistics": { "properties": { "total_estimated_cost": { "type": "number", "format": "double" }, "progress_percentage": { "type": "number", "format": "double" }, "completed_items": { "type": "number", "format": "double" }, "total_items": { "type": "number", "format": "double" } }, "required": [ "total_estimated_cost", "progress_percentage", "completed_items", "total_items" ], "type": "object" } }, "required": [ "wishlist", "items", "statistics" ], "type": "object", "additionalProperties": false }, "UpdateWishlistRequest": { "description": "Request to update a wishlist", "properties": { "wishlist_name": { "type": "string", "description": "Updated wishlist name" }, "wishlist_description": { "type": "string", "description": "Updated description" }, "is_public": { "type": "boolean", "description": "Updated public status" }, "is_collaborative": { "type": "boolean", "description": "Updated collaborative status" } }, "type": "object", "additionalProperties": false }, "AddWishlistItemRequest": { "description": "Request to add an item to a wishlist", "properties": { "game_item_id": { "type": "string", "description": "Game item ID" }, "desired_quantity": { "type": "number", "format": "double", "description": "Desired quantity" }, "desired_quality_tier": { "type": "number", "format": "double", "description": "Desired quality tier (1-5)" }, "blueprint_id": { "type": "string", "description": "Optional blueprint ID if item is craftable" }, "acquisition_mode": { "$ref": "#/components/schemas/AcquisitionMode", "description": "How to acquire: \"buy\" from market or \"craft\" from ingredients (default: \"buy\")" }, "priority": { "type": "number", "format": "double", "description": "Priority level (1-5, higher is more important)" }, "notes": { "type": "string", "description": "Optional notes" } }, "required": [ "game_item_id", "desired_quantity", "priority" ], "type": "object", "additionalProperties": false }, "UpdateWishlistItemRequest": { "description": "Request to update a wishlist item", "properties": { "desired_quantity": { "type": "number", "format": "double", "description": "Updated desired quantity" }, "desired_quality_tier": { "type": "number", "format": "double", "description": "Updated desired quality tier" }, "priority": { "type": "number", "format": "double", "description": "Updated priority" }, "notes": { "type": "string", "description": "Updated notes" }, "acquisition_mode": { "$ref": "#/components/schemas/AcquisitionMode", "description": "Updated acquisition mode" }, "is_acquired": { "type": "boolean", "description": "Updated acquired status" }, "acquired_quantity": { "type": "number", "format": "double", "description": "Updated acquired quantity" } }, "type": "object", "additionalProperties": false }, "ShoppingListMaterial": { "description": "Shopping list material requirement", "properties": { "game_item_id": { "type": "string", "description": "Game item ID" }, "game_item_name": { "type": "string", "description": "Game item name" }, "game_item_icon": { "type": "string", "description": "Game item icon" }, "total_quantity_needed": { "type": "number", "format": "double", "description": "Total quantity needed across all wishlist items" }, "desired_quality_tier": { "type": "number", "format": "double", "description": "Desired quality tier" }, "user_inventory_quantity": { "type": "number", "format": "double", "description": "User inventory quantity" }, "quantity_to_acquire": { "type": "number", "format": "double", "description": "Quantity still needed" }, "estimated_unit_price": { "type": "number", "format": "double", "description": "Estimated unit price" }, "estimated_total_cost": { "type": "number", "format": "double", "description": "Estimated total cost" }, "acquisition_methods": { "items": { "type": "string" }, "type": "array", "description": "Acquisition methods (mining, purchase, salvage, etc.)" }, "used_by_items": { "items": { "properties": { "quantity_for_this_item": { "type": "number", "format": "double" }, "item_name": { "type": "string" }, "wishlist_item_id": { "type": "string" } }, "required": [ "quantity_for_this_item", "item_name", "wishlist_item_id" ], "type": "object" }, "type": "array", "description": "Which wishlist items use this material" } }, "required": [ "game_item_id", "game_item_name", "total_quantity_needed", "user_inventory_quantity", "quantity_to_acquire", "acquisition_methods", "used_by_items" ], "type": "object", "additionalProperties": false }, "ShoppingListResponse": { "description": "Response for shopping list generation endpoint", "properties": { "wishlist_id": { "type": "string" }, "wishlist_name": { "type": "string" }, "materials_needed": { "items": { "$ref": "#/components/schemas/ShoppingListMaterial" }, "type": "array" }, "total_estimated_cost": { "type": "number", "format": "double" }, "materials_fully_stocked": { "type": "number", "format": "double" }, "materials_partially_stocked": { "type": "number", "format": "double" }, "materials_not_stocked": { "type": "number", "format": "double" } }, "required": [ "wishlist_id", "wishlist_name", "materials_needed", "total_estimated_cost", "materials_fully_stocked", "materials_partially_stocked", "materials_not_stocked" ], "type": "object", "additionalProperties": false }, "WikiItemSearchResult": { "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" }, "sub_type": { "type": "string" }, "size": { "type": "string" }, "grade": { "type": "string" }, "manufacturer": { "type": "string" }, "image_url": { "type": "string" }, "thumbnail_path": { "type": "string" }, "display_type": { "type": "string" } }, "required": [ "id", "name" ], "type": "object", "additionalProperties": false }, "SearchWikiItemsResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/WikiItemSearchResult" }, "type": "array" }, "total": { "type": "number", "format": "double" }, "page": { "type": "number", "format": "double" }, "page_size": { "type": "number", "format": "double" } }, "required": [ "items", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "Record_string.string_": { "properties": {}, "additionalProperties": { "type": "string" }, "type": "object", "description": "Construct a type with a set of properties K of type T" }, "BlueprintReference": { "properties": { "blueprint_id": { "type": "string" }, "blueprint_name": { "type": "string" }, "rarity": { "type": "string" }, "tier": { "type": "number", "format": "double" }, "crafting_time_seconds": { "type": "number", "format": "double" } }, "required": [ "blueprint_id", "blueprint_name" ], "type": "object", "additionalProperties": false }, "MissionRewardReference": { "properties": { "mission_id": { "type": "string" }, "mission_name": { "type": "string" }, "star_system": { "type": "string" }, "drop_probability": { "type": "number", "format": "double" }, "blueprint_id": { "type": "string" }, "blueprint_name": { "type": "string" } }, "required": [ "mission_id", "mission_name", "drop_probability", "blueprint_id", "blueprint_name" ], "type": "object", "additionalProperties": false }, "MarketStats": { "properties": { "listing_count": { "type": "number", "format": "double" }, "min_price": { "type": "number", "format": "double" }, "max_price": { "type": "number", "format": "double" }, "total_quantity": { "type": "number", "format": "double" } }, "required": [ "listing_count", "total_quantity" ], "type": "object", "additionalProperties": false }, "WikiItemDetail": { "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" }, "sub_type": { "type": "string" }, "size": { "type": "string" }, "grade": { "type": "string" }, "manufacturer": { "type": "string" }, "image_url": { "type": "string" }, "thumbnail_path": { "type": "string" }, "display_type": { "type": "string" }, "p4k_id": { "type": "string" }, "p4k_file": { "type": "string" }, "name_key": { "type": "string" }, "attributes": { "$ref": "#/components/schemas/Record_string.string_", "description": "Key/value attributes from game_item_attributes (values are stored as text)" }, "craftable_from": { "items": { "$ref": "#/components/schemas/BlueprintReference" }, "type": "array" }, "rewarded_by": { "items": { "$ref": "#/components/schemas/MissionRewardReference" }, "type": "array" }, "market_stats": { "$ref": "#/components/schemas/MarketStats" } }, "required": [ "id", "name", "attributes", "craftable_from", "rewarded_by", "market_stats" ], "type": "object", "additionalProperties": false }, "WikiShipSearchResult": { "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "ship_code": { "type": "string" }, "manufacturer": { "type": "string" }, "focus": { "type": "string" }, "size": { "type": "string" }, "image_url": { "type": "string" }, "crew_size": { "type": "number", "format": "double" }, "career": { "type": "string" }, "role": { "type": "string" }, "length_m": { "type": "number", "format": "double" }, "width_m": { "type": "number", "format": "double" }, "height_m": { "type": "number", "format": "double" } }, "required": [ "id", "name" ], "type": "object", "additionalProperties": false }, "WikiShipDetail": { "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "ship_code": { "type": "string" }, "manufacturer": { "type": "string" }, "focus": { "type": "string" }, "size": { "type": "string" }, "description": { "type": "string" }, "movement_class": { "type": "string" }, "image_url": { "type": "string" }, "default_loadout": { "type": "string", "description": "Raw `default_loadout` attribute value from game_item_attributes (stored as text)" }, "attributes": { "$ref": "#/components/schemas/Record_string.string_", "description": "Key/value attributes from game_item_attributes (values are stored as text)" }, "crew_size": { "type": "number", "format": "double" }, "career": { "type": "string" }, "role": { "type": "string" }, "length_m": { "type": "number", "format": "double" }, "width_m": { "type": "number", "format": "double" }, "height_m": { "type": "number", "format": "double" } }, "required": [ "id", "name", "attributes" ], "type": "object", "additionalProperties": false }, "WikiCommoditySearchResult": { "properties": { "resource_id": { "type": "string" }, "game_item_id": { "type": "string" }, "name": { "type": "string" }, "resource_category": { "type": "string" }, "resource_subcategory": { "type": "string" }, "can_be_mined": { "type": "boolean" }, "can_be_purchased": { "type": "boolean" }, "can_be_salvaged": { "type": "boolean" }, "can_be_looted": { "type": "boolean" }, "image_url": { "type": "string" } }, "required": [ "resource_id", "game_item_id", "name", "resource_category", "can_be_mined", "can_be_purchased", "can_be_salvaged", "can_be_looted" ], "type": "object", "additionalProperties": false }, "WikiLocationNode": { "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" }, "navIcon": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "parentId": { "type": "string", "nullable": true }, "jurisdiction": { "type": "string", "nullable": true }, "respawnType": { "type": "string", "nullable": true }, "size": { "type": "number", "format": "double", "nullable": true }, "qtArrivalRadius": { "type": "number", "format": "double", "nullable": true }, "qtObstructionRadius": { "type": "number", "format": "double", "nullable": true }, "amenities": { "items": { "type": "string" }, "type": "array" }, "children": { "items": { "$ref": "#/components/schemas/WikiLocationNode" }, "type": "array" } }, "required": [ "id", "name", "type", "navIcon", "description", "parentId", "jurisdiction", "respawnType", "size", "qtArrivalRadius", "qtObstructionRadius", "amenities", "children" ], "type": "object", "additionalProperties": false }, "WikiManufacturerSearchResult": { "properties": { "manufacturer": { "type": "string" }, "display_name": { "type": "string", "nullable": true }, "item_count": { "type": "number", "format": "double" } }, "required": [ "manufacturer", "display_name", "item_count" ], "type": "object", "additionalProperties": false }, "ManufacturerItem": { "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" }, "size": { "type": "string" }, "grade": { "type": "string" }, "image_url": { "type": "string" } }, "required": [ "id", "name" ], "type": "object", "additionalProperties": false }, "WikiManufacturerDetail": { "properties": { "manufacturer": { "type": "string" }, "display_name": { "type": "string", "nullable": true }, "description": { "type": "string" }, "item_count": { "type": "number", "format": "double" }, "items": { "items": { "$ref": "#/components/schemas/ManufacturerItem" }, "type": "array" } }, "required": [ "manufacturer", "display_name", "item_count", "items" ], "type": "object", "additionalProperties": false }, "GameVersion": { "description": "Game version data", "properties": { "version_id": { "type": "string", "description": "Version UUID" }, "version_type": { "type": "string", "enum": [ "LIVE", "PTU", "EPTU" ], "description": "Version type (LIVE, PTU, EPTU)" }, "version_number": { "type": "string", "description": "Version number (e.g., \"4.7.0\")" }, "build_number": { "type": "string", "description": "Build number (e.g., \"11592622\")" }, "release_date": { "type": "string", "description": "Release date" }, "is_active": { "type": "boolean", "description": "Is this version currently active" }, "last_data_update": { "type": "string", "description": "Last data update timestamp" }, "created_at": { "type": "string", "description": "Created timestamp" }, "updated_at": { "type": "string", "description": "Updated timestamp" } }, "required": [ "version_id", "version_type", "version_number", "is_active", "created_at", "updated_at" ], "type": "object", "additionalProperties": false }, "ActiveVersionsResponse": { "description": "Active versions response", "properties": { "LIVE": { "$ref": "#/components/schemas/GameVersion", "description": "Active LIVE version" }, "PTU": { "$ref": "#/components/schemas/GameVersion", "description": "Active PTU version" }, "EPTU": { "$ref": "#/components/schemas/GameVersion", "description": "Active EPTU version" } }, "type": "object", "additionalProperties": false }, "SelectVersionResponse": { "description": "Select version response", "properties": { "success": { "type": "boolean", "description": "Success status" }, "version": { "$ref": "#/components/schemas/GameVersion", "description": "Selected version" } }, "required": [ "success" ], "type": "object", "additionalProperties": false }, "SelectVersionRequest": { "description": "Select version request body", "properties": { "version_id": { "type": "string", "description": "Version ID to select" } }, "required": [ "version_id" ], "type": "object", "additionalProperties": false }, "QualityBand": { "description": "A quality band defining how raw quality maps to a discrete value", "properties": { "start": { "type": "number", "format": "double", "description": "Start of the raw quality range (0-1000)" }, "end": { "type": "number", "format": "double", "description": "End of the raw quality range (0-1000)" }, "mappedValue": { "type": "number", "format": "double", "description": "The quality value items in this band are snapped to" } }, "required": [ "start", "end", "mappedValue" ], "type": "object", "additionalProperties": false }, "ResourceSearchResult": { "description": "Resource search result item", "properties": { "resource_id": { "type": "string", "description": "Resource UUID" }, "game_item_id": { "type": "string", "description": "Game item ID" }, "resource_name": { "type": "string", "description": "Resource name" }, "resource_icon": { "type": "string", "description": "Resource icon URL" }, "resource_category": { "type": "string", "description": "Resource category" }, "resource_subcategory": { "type": "string", "description": "Resource subcategory" }, "max_stack_size": { "type": "number", "format": "double", "description": "Maximum stack size" }, "base_value": { "type": "number", "format": "double", "description": "Base value in UEC" }, "can_be_mined": { "type": "boolean", "description": "Can be mined" }, "can_be_purchased": { "type": "boolean", "description": "Can be purchased" }, "can_be_salvaged": { "type": "boolean", "description": "Can be salvaged" }, "can_be_looted": { "type": "boolean", "description": "Can be looted" }, "blueprint_count": { "type": "number", "format": "double", "description": "Number of blueprints that require this resource" }, "quality_bands": { "items": { "$ref": "#/components/schemas/QualityBand" }, "type": "array", "description": "Quality quantization bands — defines discrete quality tiers for this resource" } }, "required": [ "resource_id", "game_item_id", "resource_name", "resource_category", "can_be_mined", "can_be_purchased", "can_be_salvaged", "can_be_looted", "blueprint_count" ], "type": "object", "additionalProperties": false }, "SearchResourcesResponse": { "description": "Response for resource search endpoint", "properties": { "resources": { "items": { "$ref": "#/components/schemas/ResourceSearchResult" }, "type": "array", "description": "Resource search results" }, "total": { "type": "number", "format": "double", "description": "Total number of resources matching filters" }, "page": { "type": "number", "format": "double", "description": "Current page number" }, "page_size": { "type": "number", "format": "double", "description": "Page size" } }, "required": [ "resources", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "ResourceCategory": { "description": "Resource category with count", "properties": { "category": { "type": "string", "description": "Category name" }, "subcategory": { "type": "string", "description": "Subcategory name" }, "count": { "type": "number", "format": "double", "description": "Number of resources in this category" } }, "required": [ "category", "count" ], "type": "object", "additionalProperties": false }, "MiningLocation": { "description": "Mining location information", "properties": { "star_system": { "type": "string", "description": "Star system" }, "planet_moon": { "type": "string", "description": "Planet or moon" }, "location_detail": { "type": "string", "description": "Location detail" }, "abundance": { "type": "string", "description": "Abundance level" } }, "type": "object", "additionalProperties": false }, "PurchaseLocation": { "description": "Purchase location information", "properties": { "star_system": { "type": "string", "description": "Star system" }, "planet_moon": { "type": "string", "description": "Planet or moon" }, "station": { "type": "string", "description": "Station or outpost" }, "average_price": { "type": "number", "format": "double", "description": "Average price" } }, "type": "object", "additionalProperties": false }, "Resource": { "description": "Complete resource data", "properties": { "resource_id": { "type": "string" }, "version_id": { "type": "string" }, "game_item_id": { "type": "string" }, "resource_name": { "type": "string" }, "resource_icon": { "type": "string" }, "resource_category": { "type": "string" }, "resource_subcategory": { "type": "string" }, "max_stack_size": { "type": "number", "format": "double" }, "base_value": { "type": "number", "format": "double" }, "can_be_mined": { "type": "boolean" }, "can_be_purchased": { "type": "boolean" }, "can_be_salvaged": { "type": "boolean" }, "can_be_looted": { "type": "boolean" }, "mining_locations": { "items": { "$ref": "#/components/schemas/MiningLocation" }, "type": "array" }, "purchase_locations": { "items": { "$ref": "#/components/schemas/PurchaseLocation" }, "type": "array" }, "quality_bands": { "items": { "$ref": "#/components/schemas/QualityBand" }, "type": "array", "description": "Quality quantization bands — defines discrete quality tiers for this resource" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "resource_id", "version_id", "game_item_id", "resource_name", "resource_category", "can_be_mined", "can_be_purchased", "can_be_salvaged", "can_be_looted", "created_at", "updated_at" ], "type": "object", "additionalProperties": false }, "BlueprintRequiringResource": { "description": "Blueprint that requires this resource", "properties": { "blueprint_id": { "type": "string", "description": "Blueprint UUID" }, "blueprint_name": { "type": "string", "description": "Blueprint name" }, "output_item_name": { "type": "string", "description": "Output item name" }, "output_item_icon": { "type": "string", "description": "Output item icon" }, "quantity_required": { "type": "number", "format": "double", "description": "Quantity required" }, "min_quality_tier": { "type": "number", "format": "double", "description": "Minimum quality tier" }, "recommended_quality_tier": { "type": "number", "format": "double", "description": "Recommended quality tier" } }, "required": [ "blueprint_id", "blueprint_name", "output_item_name", "quantity_required" ], "type": "object", "additionalProperties": false }, "ResourceDetailResponse": { "description": "Response for resource detail endpoint", "properties": { "resource": { "$ref": "#/components/schemas/Resource", "description": "Complete resource data" }, "blueprints_requiring": { "items": { "$ref": "#/components/schemas/BlueprintRequiringResource" }, "type": "array", "description": "Blueprints that require this resource" }, "market_price": { "properties": { "last_updated": { "type": "string" }, "average_price": { "type": "number", "format": "double" }, "max_price": { "type": "number", "format": "double" }, "min_price": { "type": "number", "format": "double" } }, "type": "object", "description": "Market price data (if available)" } }, "required": [ "resource", "blueprints_requiring" ], "type": "object", "additionalProperties": false }, "HaulingOrder": { "description": "Hauling order", "properties": { "resource_name": { "type": "string" }, "min_scu": { "type": "number", "format": "double" }, "max_scu": { "type": "number", "format": "double" } }, "required": [ "resource_name", "min_scu", "max_scu" ], "type": "object", "additionalProperties": false }, "MissionSearchResult": { "description": "Mission search result item", "properties": { "mission_id": { "type": "string", "description": "Mission UUID" }, "mission_code": { "type": "string", "description": "Mission code (internal name for URL-friendly links)" }, "mission_name": { "type": "string", "description": "Mission name" }, "category": { "type": "string", "description": "Mission category" }, "career_type": { "type": "string", "description": "Career type" }, "legal_status": { "type": "string", "description": "Legal status" }, "difficulty_level": { "type": "number", "format": "double", "description": "Difficulty level (1-5)" }, "star_system": { "type": "string", "description": "Star system" }, "planet_moon": { "type": "string", "description": "Planet or moon" }, "faction": { "type": "string", "description": "Faction" }, "credit_reward_min": { "type": "number", "format": "double", "description": "Minimum credit reward" }, "credit_reward_max": { "type": "number", "format": "double", "description": "Maximum credit reward" }, "blueprint_reward_count": { "type": "number", "format": "double", "description": "Number of blueprint rewards" }, "blueprint_reward_names": { "items": { "type": "string" }, "type": "array", "description": "Names of blueprint reward output items" }, "community_difficulty_avg": { "type": "number", "format": "double", "description": "Average community difficulty rating" }, "community_satisfaction_avg": { "type": "number", "format": "double", "description": "Average community satisfaction rating" }, "is_chain_starter": { "type": "boolean", "description": "Is chain starter mission" }, "is_chain_mission": { "type": "boolean", "description": "Is part of a chain" }, "is_shareable": { "type": "boolean", "description": "Is shareable mission" }, "is_unique_mission": { "type": "boolean", "description": "Is unique (one-time) mission" }, "is_illegal": { "type": "boolean", "description": "Is illegal" }, "reputation_reward": { "type": "number", "format": "double", "description": "Reputation XP reward" }, "reward_scope": { "type": "string", "description": "Reputation scope (e.g., headhunter, salvage)" }, "mission_giver_org": { "type": "string", "description": "Mission giver organization" }, "associated_event": { "type": "string", "description": "Associated event name (e.g., \"Nyx Mission Pack\")" }, "ship_encounter_count": { "type": "number", "format": "double", "description": "Total ship encounter count" }, "hauling_orders": { "items": { "$ref": "#/components/schemas/HaulingOrder" }, "type": "array", "description": "Hauling order summaries for material badges" } }, "required": [ "mission_id", "mission_code", "mission_name", "category", "blueprint_reward_count", "is_chain_starter", "is_chain_mission", "is_shareable", "is_unique_mission", "ship_encounter_count" ], "type": "object", "additionalProperties": false }, "SearchMissionsResponse": { "description": "Response for mission search endpoint", "properties": { "missions": { "items": { "$ref": "#/components/schemas/MissionSearchResult" }, "type": "array", "description": "Mission search results" }, "total": { "type": "number", "format": "double", "description": "Total number of missions matching filters" }, "page": { "type": "number", "format": "double", "description": "Current page number" }, "page_size": { "type": "number", "format": "double", "description": "Page size" } }, "required": [ "missions", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "ItemReward": { "description": "Non-blueprint item reward", "properties": { "name": { "type": "string" }, "ref": { "type": "string" } }, "required": [ "name", "ref" ], "type": "object", "additionalProperties": false }, "Mission": { "description": "Complete mission data", "properties": { "mission_id": { "type": "string" }, "version_id": { "type": "string" }, "mission_code": { "type": "string" }, "mission_name": { "type": "string" }, "mission_description": { "type": "string" }, "category": { "type": "string" }, "mission_type": { "type": "string" }, "career_type": { "type": "string" }, "legal_status": { "type": "string", "enum": [ "LEGAL", "ILLEGAL", "UNKNOWN" ] }, "difficulty_level": { "type": "number", "format": "double" }, "star_system": { "type": "string" }, "planet_moon": { "type": "string" }, "location_detail": { "type": "string" }, "mission_giver_org": { "type": "string" }, "faction": { "type": "string" }, "credit_reward_min": { "type": "number", "format": "double" }, "credit_reward_max": { "type": "number", "format": "double" }, "reputation_reward": { "type": "number", "format": "double" }, "is_shareable": { "type": "boolean" }, "availability_type": { "type": "string" }, "associated_event": { "type": "string" }, "required_rank": { "type": "number", "format": "double" }, "required_reputation": { "type": "number", "format": "double" }, "is_chain_starter": { "type": "boolean" }, "is_chain_mission": { "type": "boolean" }, "is_unique_mission": { "type": "boolean" }, "prerequisite_missions": { "items": { "type": "string" }, "type": "array", "description": "Mission UUIDs that must be completed first" }, "estimated_uec_per_hour": { "type": "number", "format": "double" }, "estimated_rep_per_hour": { "type": "number", "format": "double" }, "rank_index": { "type": "number", "format": "double" }, "reward_scope": { "type": "string" }, "reputation_reward_faction": { "type": "string", "description": "Faction name for reputation reward" }, "min_standing": { "type": "string" }, "max_standing": { "type": "string", "description": "Standing requirement — max (e.g. \"Elite Contractor\")" }, "min_standing_display": { "type": "string", "description": "Friendly display name for min standing" }, "max_standing_display": { "type": "string", "description": "Friendly display name for max standing" }, "can_reaccept_after_failing": { "type": "boolean", "description": "Can re-accept after failing" }, "can_reaccept_after_abandoning": { "type": "boolean", "description": "Can re-accept after abandoning" }, "abandoned_cooldown_time": { "type": "number", "format": "double", "description": "Cooldown after abandoning (seconds)" }, "personal_cooldown_time": { "type": "number", "format": "double", "description": "Personal cooldown between accepts (seconds)" }, "deadline_seconds": { "type": "number", "format": "double", "description": "Mission deadline (seconds)" }, "available_in_prison": { "type": "boolean", "description": "Available in prison" }, "is_illegal": { "type": "boolean", "description": "Is illegal" }, "is_lawful": { "type": "boolean", "description": "Is lawful" }, "max_crimestat": { "type": "number", "format": "double", "description": "Max crimestat allowed" }, "difficulty_from_broker": { "type": "number", "format": "double", "description": "Difficulty from broker (raw)" }, "time_to_complete": { "type": "number", "format": "double", "description": "Time to complete the mission (seconds)" }, "accept_locations": { "items": { "type": "string" }, "type": "array", "description": "Accept locations (where the mission can be picked up)" }, "destinations": { "items": { "type": "string" }, "type": "array", "description": "Destinations (pickup/dropoff location names)" }, "item_rewards": { "items": { "$ref": "#/components/schemas/ItemReward" }, "type": "array", "description": "Non-blueprint item rewards" }, "token_substitutions": { "$ref": "#/components/schemas/Record_string.string_", "description": "Token substitutions for description placeholders" }, "community_difficulty_avg": { "type": "number", "format": "double" }, "community_difficulty_count": { "type": "number", "format": "double" }, "community_satisfaction_avg": { "type": "number", "format": "double" }, "community_satisfaction_count": { "type": "number", "format": "double" }, "data_source": { "type": "string" }, "is_verified": { "type": "boolean" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "mission_id", "version_id", "mission_code", "mission_name", "category", "is_shareable", "is_chain_starter", "is_chain_mission", "is_unique_mission", "community_difficulty_count", "community_satisfaction_count", "data_source", "is_verified", "created_at", "updated_at" ], "type": "object", "additionalProperties": false }, "ReputationRank": { "description": "Reputation rank threshold for a career scope", "properties": { "scope_code": { "type": "string" }, "scope_display_name": { "type": "string" }, "standing_code": { "type": "string" }, "standing_display_name": { "type": "string" }, "threshold": { "type": "number", "format": "double" }, "ceiling": { "type": "number", "format": "double" }, "rank_index": { "type": "number", "format": "double" } }, "required": [ "scope_code", "scope_display_name", "standing_code", "standing_display_name", "threshold", "ceiling", "rank_index" ], "type": "object", "additionalProperties": false }, "GameEvent": { "description": "Game event/scenario (e.g. Luminalia, Invictus)", "properties": { "event_id": { "type": "string" }, "event_code": { "type": "string" }, "event_name": { "type": "string" }, "mission_count": { "type": "number", "format": "double" } }, "required": [ "event_id", "event_code", "event_name", "mission_count" ], "type": "object", "additionalProperties": false }, "MissionBlueprintReward": { "description": "Blueprint reward in a mission reward pool", "properties": { "blueprint_id": { "type": "string", "description": "Blueprint UUID" }, "blueprint_code": { "type": "string", "description": "Blueprint code for URL-friendly links" }, "blueprint_name": { "type": "string", "description": "Blueprint name" }, "output_item_name": { "type": "string", "description": "Output item name" }, "output_item_icon": { "type": "string", "description": "Output item icon URL" }, "drop_probability": { "type": "number", "format": "double", "description": "Drop probability percentage (0-100)" }, "is_guaranteed": { "type": "boolean", "description": "Is guaranteed reward" }, "rarity": { "type": "string", "description": "Blueprint rarity" }, "tier": { "type": "number", "format": "double", "description": "Blueprint tier (1-5)" }, "user_owns": { "type": "boolean", "description": "Does user own this blueprint" } }, "required": [ "blueprint_id", "blueprint_code", "blueprint_name", "output_item_name", "drop_probability", "is_guaranteed" ], "type": "object", "additionalProperties": false }, "MissionRewardPool": { "description": "Mission reward pool", "properties": { "reward_pool_id": { "type": "number", "format": "double", "description": "Reward pool ID" }, "pool_name": { "type": "string", "description": "Pool name from game data (e.g. \"BP_MISSIONREWARD_CFP_Outpost_RegionC\")" }, "pool_chance": { "type": "number", "format": "double", "description": "Pool-level chance (0-1, e.g. 1.0 = 100%)" }, "reward_pool_size": { "type": "number", "format": "double", "description": "Total number of blueprints in pool" }, "selection_count": { "type": "number", "format": "double", "description": "Number of blueprints selected from pool" }, "blueprints": { "items": { "$ref": "#/components/schemas/MissionBlueprintReward" }, "type": "array", "description": "Blueprints in this reward pool" } }, "required": [ "reward_pool_id", "reward_pool_size", "selection_count", "blueprints" ], "type": "object", "additionalProperties": false }, "ShipWave": { "properties": { "name": { "type": "string" }, "min_ships": { "type": "number", "format": "double" }, "max_ships": { "type": "number", "format": "double" } }, "required": [ "name", "min_ships", "max_ships" ], "type": "object", "additionalProperties": false }, "ShipEncounter": { "description": "Ship encounter group (e.g. \"Mission Targets\", \"Reinforcements\")", "properties": { "role": { "type": "string" }, "alignment": { "type": "string", "enum": [ "hostile", "friendly", "neutral" ] }, "waves": { "items": { "$ref": "#/components/schemas/ShipWave" }, "type": "array" }, "ship_pool": { "items": { "type": "string" }, "type": "array" } }, "required": [ "role", "alignment", "waves" ], "type": "object", "additionalProperties": false }, "NpcEncounter": { "description": "NPC encounter", "properties": { "name": { "type": "string" }, "count": { "type": "number", "format": "double" } }, "required": [ "name", "count" ], "type": "object", "additionalProperties": false }, "EntitySpawn": { "description": "Entity spawn", "properties": { "name": { "type": "string" }, "count": { "type": "number", "format": "double" } }, "required": [ "name", "count" ], "type": "object", "additionalProperties": false }, "UserMissionRating": { "description": "User's mission rating", "properties": { "difficulty_rating": { "type": "number", "format": "double", "description": "Difficulty rating (1-5)" }, "satisfaction_rating": { "type": "number", "format": "double", "description": "Satisfaction rating (1-5)" }, "rating_comment": { "type": "string", "description": "Optional comment" } }, "required": [ "difficulty_rating", "satisfaction_rating" ], "type": "object", "additionalProperties": false }, "MissionDetailResponse": { "description": "Response for mission detail endpoint", "properties": { "mission": { "$ref": "#/components/schemas/Mission", "description": "Complete mission data" }, "blueprint_rewards": { "items": { "$ref": "#/components/schemas/MissionRewardPool" }, "type": "array", "description": "Blueprint reward pools" }, "prerequisite_missions": { "items": { "$ref": "#/components/schemas/Mission" }, "type": "array", "description": "Prerequisite missions (if any)" }, "ship_encounters": { "items": { "$ref": "#/components/schemas/ShipEncounter" }, "type": "array", "description": "Ship encounters (Combat tab)" }, "npc_encounters": { "items": { "$ref": "#/components/schemas/NpcEncounter" }, "type": "array", "description": "NPC encounters (Combat tab)" }, "hauling_orders": { "items": { "$ref": "#/components/schemas/HaulingOrder" }, "type": "array", "description": "Hauling orders" }, "entity_spawns": { "items": { "$ref": "#/components/schemas/EntitySpawn" }, "type": "array", "description": "Entity spawns" }, "user_completed": { "type": "boolean", "description": "Has user completed this mission" }, "user_rating": { "$ref": "#/components/schemas/UserMissionRating", "description": "User's rating for this mission" } }, "required": [ "mission", "blueprint_rewards" ], "type": "object", "additionalProperties": false }, "BlueprintDetail": { "description": "Blueprint detail for mission blueprints endpoint", "properties": { "blueprint_id": { "type": "string", "description": "Blueprint UUID" }, "blueprint_code": { "type": "string", "description": "Blueprint code" }, "blueprint_name": { "type": "string", "description": "Blueprint name" }, "blueprint_description": { "type": "string", "description": "Blueprint description" }, "output_game_item_id": { "type": "string", "description": "Output game item ID" }, "output_item_name": { "type": "string", "description": "Output item name" }, "output_item_type": { "type": "string", "description": "Output item type" }, "output_item_icon": { "type": "string", "description": "Output item icon URL" }, "output_quantity": { "type": "number", "format": "double", "description": "Output quantity" }, "item_category": { "type": "string", "description": "Item category" }, "item_subcategory": { "type": "string", "description": "Item subcategory" }, "rarity": { "type": "string", "description": "Rarity" }, "tier": { "type": "number", "format": "double", "description": "Tier (1-5)" }, "crafting_station_type": { "type": "string", "description": "Crafting station type" }, "crafting_time_seconds": { "type": "number", "format": "double", "description": "Crafting time in seconds" }, "required_skill_level": { "type": "number", "format": "double", "description": "Required skill level" }, "icon_url": { "type": "string", "description": "Icon URL" }, "ingredient_count": { "type": "number", "format": "double", "description": "Number of ingredients" }, "drop_probability": { "type": "number", "format": "double", "description": "Drop probability for this mission" }, "is_guaranteed": { "type": "boolean", "description": "Is guaranteed reward" } }, "required": [ "blueprint_id", "blueprint_code", "blueprint_name", "output_game_item_id", "output_item_name", "output_item_type", "output_quantity", "ingredient_count", "drop_probability", "is_guaranteed" ], "type": "object", "additionalProperties": false }, "OreTopLocation": { "description": "TypeScript interfaces for Game Data Mining API", "properties": { "name": { "type": "string" }, "system": { "type": "string" }, "probability": { "type": "number", "format": "double" } }, "required": [ "name", "system", "probability" ], "type": "object", "additionalProperties": false }, "OreSearchResult": { "properties": { "name": { "type": "string" }, "displayName": { "type": "string" }, "resourceName": { "type": "string", "nullable": true }, "gameItemId": { "type": "string", "nullable": true }, "instability": { "type": "number", "format": "double", "nullable": true }, "resistance": { "type": "number", "format": "double", "nullable": true }, "optimalWindowMidpoint": { "type": "number", "format": "double", "nullable": true }, "optimalWindowThinness": { "type": "number", "format": "double", "nullable": true }, "explosionMultiplier": { "type": "number", "format": "double", "nullable": true }, "clusterFactor": { "type": "number", "format": "double", "nullable": true }, "rarity": { "type": "string" }, "marketPrice": { "type": "number", "format": "double", "nullable": true }, "locationCount": { "type": "number", "format": "double" }, "topLocations": { "items": { "$ref": "#/components/schemas/OreTopLocation" }, "type": "array" } }, "required": [ "name", "displayName", "resourceName", "gameItemId", "instability", "resistance", "optimalWindowMidpoint", "optimalWindowThinness", "explosionMultiplier", "clusterFactor", "rarity", "marketPrice", "locationCount", "topLocations" ], "type": "object", "additionalProperties": false }, "SearchOresResponse": { "properties": { "ores": { "items": { "$ref": "#/components/schemas/OreSearchResult" }, "type": "array" }, "total": { "type": "number", "format": "double" }, "page": { "type": "number", "format": "double" }, "page_size": { "type": "number", "format": "double" } }, "required": [ "ores", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "OreLocation": { "properties": { "locationName": { "type": "string" }, "system": { "type": "string" }, "locationType": { "type": "string" }, "groupName": { "type": "string" }, "groupProbability": { "type": "number", "format": "double" }, "relativeProbability": { "type": "number", "format": "double" } }, "required": [ "locationName", "system", "locationType", "groupName", "groupProbability", "relativeProbability" ], "type": "object", "additionalProperties": false }, "OreQualityDistribution": { "properties": { "miningType": { "type": "string" }, "rarity": { "type": "string", "nullable": true }, "min": { "type": "number", "format": "double", "nullable": true }, "max": { "type": "number", "format": "double", "nullable": true }, "mean": { "type": "number", "format": "double", "nullable": true }, "stddev": { "type": "number", "format": "double", "nullable": true } }, "required": [ "miningType", "rarity", "min", "max", "mean", "stddev" ], "type": "object", "additionalProperties": false }, "OreDetailResponse": { "properties": { "name": { "type": "string" }, "displayName": { "type": "string" }, "resourceName": { "type": "string", "nullable": true }, "gameItemId": { "type": "string", "nullable": true }, "instability": { "type": "number", "format": "double", "nullable": true }, "resistance": { "type": "number", "format": "double", "nullable": true }, "optimalWindowMidpoint": { "type": "number", "format": "double", "nullable": true }, "optimalWindowMidpointRandomness": { "type": "number", "format": "double", "nullable": true }, "optimalWindowThinness": { "type": "number", "format": "double", "nullable": true }, "explosionMultiplier": { "type": "number", "format": "double", "nullable": true }, "clusterFactor": { "type": "number", "format": "double", "nullable": true }, "rarity": { "type": "string" }, "marketPrice": { "type": "number", "format": "double", "nullable": true }, "locations": { "items": { "$ref": "#/components/schemas/OreLocation" }, "type": "array" }, "qualityDistributions": { "items": { "$ref": "#/components/schemas/OreQualityDistribution" }, "type": "array" } }, "required": [ "name", "displayName", "resourceName", "gameItemId", "instability", "resistance", "optimalWindowMidpoint", "optimalWindowMidpointRandomness", "optimalWindowThinness", "explosionMultiplier", "clusterFactor", "rarity", "marketPrice", "locations", "qualityDistributions" ], "type": "object", "additionalProperties": false }, "LocationGroup": { "properties": { "groupName": { "type": "string" }, "groupProbability": { "type": "number", "format": "double" }, "oreCount": { "type": "number", "format": "double" }, "topOres": { "items": { "type": "string" }, "type": "array" } }, "required": [ "groupName", "groupProbability", "oreCount", "topOres" ], "type": "object", "additionalProperties": false }, "LocationSearchResult": { "properties": { "name": { "type": "string" }, "displayName": { "type": "string", "nullable": true }, "system": { "type": "string" }, "locationType": { "type": "string" }, "groups": { "items": { "$ref": "#/components/schemas/LocationGroup" }, "type": "array" }, "hasRefinery": { "type": "boolean" } }, "required": [ "name", "displayName", "system", "locationType", "groups", "hasRefinery" ], "type": "object", "additionalProperties": false }, "SearchLocationsResponse": { "properties": { "locations": { "items": { "$ref": "#/components/schemas/LocationSearchResult" }, "type": "array" }, "total": { "type": "number", "format": "double" }, "page": { "type": "number", "format": "double" }, "page_size": { "type": "number", "format": "double" } }, "required": [ "locations", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "LocationOre": { "properties": { "presetName": { "type": "string" }, "displayName": { "type": "string" }, "elementName": { "type": "string", "nullable": true }, "resourceName": { "type": "string", "nullable": true }, "rarity": { "type": "string" }, "relativeProbability": { "type": "number", "format": "double" }, "instability": { "type": "number", "format": "double", "nullable": true }, "resistance": { "type": "number", "format": "double", "nullable": true }, "optimalWindowMidpoint": { "type": "number", "format": "double", "nullable": true }, "optimalWindowThinness": { "type": "number", "format": "double", "nullable": true }, "explosionMultiplier": { "type": "number", "format": "double", "nullable": true }, "clusterFactor": { "type": "number", "format": "double", "nullable": true }, "marketPrice": { "type": "number", "format": "double", "nullable": true }, "estimatedValue": { "type": "number", "format": "double", "nullable": true } }, "required": [ "presetName", "displayName", "elementName", "resourceName", "rarity", "relativeProbability", "instability", "resistance", "optimalWindowMidpoint", "optimalWindowThinness", "explosionMultiplier", "clusterFactor", "marketPrice", "estimatedValue" ], "type": "object", "additionalProperties": false }, "LocationMiningGroup": { "properties": { "groupName": { "type": "string" }, "groupProbability": { "type": "number", "format": "double" }, "ores": { "items": { "$ref": "#/components/schemas/LocationOre" }, "type": "array" } }, "required": [ "groupName", "groupProbability", "ores" ], "type": "object", "additionalProperties": false }, "LocationDetailResponse": { "properties": { "name": { "type": "string" }, "displayName": { "type": "string", "nullable": true }, "system": { "type": "string" }, "locationType": { "type": "string" }, "groups": { "items": { "$ref": "#/components/schemas/LocationMiningGroup" }, "type": "array" }, "hasRefinery": { "type": "boolean" }, "amenities": { "items": { "type": "string" }, "type": "array" } }, "required": [ "name", "displayName", "system", "locationType", "groups", "hasRefinery", "amenities" ], "type": "object", "additionalProperties": false }, "RefiningMethod": { "properties": { "name": { "type": "string" }, "speed": { "type": "string" }, "quality": { "type": "string" } }, "required": [ "name", "speed", "quality" ], "type": "object", "additionalProperties": false }, "RefiningMethodsResponse": { "properties": { "methods": { "items": { "$ref": "#/components/schemas/RefiningMethod" }, "type": "array" } }, "required": [ "methods" ], "type": "object", "additionalProperties": false }, "Record_string.number_": { "properties": {}, "additionalProperties": { "type": "number", "format": "double" }, "type": "object", "description": "Construct a type with a set of properties K of type T" }, "QualityContribution": { "description": "Quality contribution breakdown for a single material", "properties": { "material_name": { "type": "string", "description": "Material name" }, "quality_tier": { "type": "number", "format": "double", "description": "Quality tier (1-5)" }, "quality_value": { "type": "number", "format": "double", "description": "Quality value (0-100)" }, "weight": { "type": "number", "format": "double", "description": "Weight in calculation" }, "contribution": { "type": "number", "format": "double", "description": "Contribution to final quality" } }, "required": [ "material_name", "quality_tier", "quality_value", "weight", "contribution" ], "type": "object", "additionalProperties": false }, "CalculateQualityResponse": { "description": "Response for quality calculation endpoint", "properties": { "output_quality_tier": { "type": "number", "format": "double", "description": "Output quality tier (1-5)" }, "output_quality_value": { "type": "number", "format": "double", "description": "Output quality value (0-100)" }, "output_quantity": { "type": "number", "format": "double", "description": "Output quantity" }, "calculation_breakdown": { "properties": { "quality_contributions": { "items": { "$ref": "#/components/schemas/QualityContribution" }, "type": "array", "description": "Quality contributions per material" }, "input_weights": { "$ref": "#/components/schemas/Record_string.number_", "description": "Input weights per material" }, "formula_used": { "type": "string", "description": "Formula type used (weighted_average, minimum, maximum)" } }, "required": [ "quality_contributions", "input_weights", "formula_used" ], "type": "object", "description": "Calculation breakdown" }, "estimated_cost": { "properties": { "total_cost": { "type": "number", "format": "double", "description": "Total cost" }, "crafting_station_fee": { "type": "number", "format": "double", "description": "Crafting station fee" }, "material_cost": { "type": "number", "format": "double", "description": "Total material cost" } }, "required": [ "total_cost", "material_cost" ], "type": "object", "description": "Estimated costs" }, "success_probability": { "type": "number", "format": "double", "description": "Success probability percentage (0-100)" }, "critical_success_chance": { "type": "number", "format": "double", "description": "Critical success chance percentage (0-100)" } }, "required": [ "output_quality_tier", "output_quality_value", "output_quantity", "calculation_breakdown", "estimated_cost", "success_probability", "critical_success_chance" ], "type": "object", "additionalProperties": false }, "CraftingInputMaterial": { "description": "Input material for crafting calculation", "properties": { "game_item_id": { "type": "string", "description": "Game item UUID" }, "quantity": { "type": "number", "format": "double", "description": "Quantity of material" }, "quality_tier": { "type": "number", "format": "double", "description": "Quality tier (1-5) — optional, derived from quality_value if not provided" }, "quality_value": { "type": "number", "format": "double", "description": "Precise quality value (0-1000)" } }, "required": [ "game_item_id", "quantity", "quality_value" ], "type": "object", "additionalProperties": false }, "CalculateQualityRequest": { "description": "Request for quality calculation endpoint", "properties": { "blueprint_id": { "type": "string", "description": "Blueprint UUID" }, "input_materials": { "items": { "$ref": "#/components/schemas/CraftingInputMaterial" }, "type": "array", "description": "Input materials with quality values" } }, "required": [ "blueprint_id", "input_materials" ], "type": "object", "additionalProperties": false }, "SimulationResult": { "description": "Single simulation result", "properties": { "material_configuration": { "items": { "$ref": "#/components/schemas/CraftingInputMaterial" }, "type": "array", "description": "Material configuration used" }, "output_quality_tier": { "type": "number", "format": "double", "description": "Output quality tier" }, "output_quality_value": { "type": "number", "format": "double", "description": "Output quality value" }, "estimated_cost": { "type": "number", "format": "double", "description": "Estimated total cost" } }, "required": [ "material_configuration", "output_quality_tier", "output_quality_value", "estimated_cost" ], "type": "object", "additionalProperties": false }, "SimulateCraftingResponse": { "description": "Response for crafting simulation endpoint", "properties": { "blueprint_id": { "type": "string", "description": "Blueprint UUID" }, "blueprint_name": { "type": "string", "description": "Blueprint name" }, "simulation_results": { "items": { "$ref": "#/components/schemas/SimulationResult" }, "type": "array", "description": "All simulation results" }, "best_result": { "$ref": "#/components/schemas/SimulationResult", "description": "Best result (highest quality)" }, "worst_result": { "$ref": "#/components/schemas/SimulationResult", "description": "Worst result (lowest quality)" }, "most_cost_effective": { "$ref": "#/components/schemas/SimulationResult", "description": "Most cost-effective result" } }, "required": [ "blueprint_id", "blueprint_name", "simulation_results", "best_result", "worst_result", "most_cost_effective" ], "type": "object", "additionalProperties": false }, "MaterialVariation": { "description": "Material variation for simulation", "properties": { "game_item_id": { "type": "string", "description": "Game item UUID" }, "quantity": { "type": "number", "format": "double", "description": "Quantity of material" }, "quality_tiers": { "items": { "type": "number", "format": "double" }, "type": "array", "description": "Quality tier options to test" } }, "required": [ "game_item_id", "quantity", "quality_tiers" ], "type": "object", "additionalProperties": false }, "SimulateCraftingRequest": { "description": "Request for crafting simulation endpoint", "properties": { "blueprint_id": { "type": "string", "description": "Blueprint UUID" }, "material_variations": { "items": { "$ref": "#/components/schemas/MaterialVariation" }, "type": "array", "description": "Material variations to test" } }, "required": [ "blueprint_id", "material_variations" ], "type": "object", "additionalProperties": false }, "RecordCraftingResponse": { "description": "Response for recording crafting session", "properties": { "success": { "type": "boolean", "description": "Success status" }, "session_id": { "type": "string", "description": "Crafting session UUID" } }, "required": [ "success", "session_id" ], "type": "object", "additionalProperties": false }, "RecordCraftingRequest": { "description": "Request to record a crafting session", "properties": { "blueprint_id": { "type": "string", "description": "Blueprint UUID" }, "input_materials": { "items": { "$ref": "#/components/schemas/CraftingInputMaterial" }, "type": "array", "description": "Input materials used" }, "output_quality_tier": { "type": "number", "format": "double", "description": "Output quality tier achieved" }, "output_quality_value": { "type": "number", "format": "double", "description": "Output quality value achieved" }, "output_quantity": { "type": "number", "format": "double", "description": "Output quantity produced" }, "was_critical_success": { "type": "boolean", "description": "Was critical success" }, "total_material_cost": { "type": "number", "format": "double", "description": "Total material cost" }, "crafting_station_fee": { "type": "number", "format": "double", "description": "Crafting station fee" } }, "required": [ "blueprint_id", "input_materials", "output_quality_tier", "output_quality_value", "output_quantity", "was_critical_success" ], "type": "object", "additionalProperties": false }, "CraftingSessionHistory": { "description": "Crafting session history item", "properties": { "session_id": { "type": "string", "description": "Session UUID" }, "blueprint_id": { "type": "string", "description": "Blueprint UUID" }, "blueprint_name": { "type": "string", "description": "Blueprint name" }, "output_item_name": { "type": "string", "description": "Output item name" }, "crafting_date": { "type": "string", "description": "Crafting date" }, "input_materials": { "items": { "$ref": "#/components/schemas/CraftingInputMaterial" }, "type": "array", "description": "Input materials used" }, "output_quality_tier": { "type": "number", "format": "double", "description": "Output quality tier" }, "output_quality_value": { "type": "number", "format": "double", "description": "Output quality value" }, "output_quantity": { "type": "number", "format": "double", "description": "Output quantity" }, "was_critical_success": { "type": "boolean", "description": "Was critical success" }, "total_material_cost": { "type": "number", "format": "double", "description": "Total material cost" }, "crafting_station_fee": { "type": "number", "format": "double", "description": "Crafting station fee" } }, "required": [ "session_id", "blueprint_id", "blueprint_name", "output_item_name", "crafting_date", "input_materials", "output_quality_tier", "output_quality_value", "output_quantity", "was_critical_success" ], "type": "object", "additionalProperties": false }, "GetCraftingHistoryResponse": { "description": "Response for crafting history endpoint", "properties": { "history": { "items": { "$ref": "#/components/schemas/CraftingSessionHistory" }, "type": "array", "description": "Crafting sessions" }, "total": { "type": "number", "format": "double", "description": "Total number of sessions" }, "page": { "type": "number", "format": "double", "description": "Current page" }, "page_size": { "type": "number", "format": "double", "description": "Page size" } }, "required": [ "history", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "MaterialAvailability": { "description": "Material availability information", "properties": { "game_item_id": { "type": "string", "description": "Game item UUID" }, "material_name": { "type": "string", "description": "Material name" }, "quantity_required": { "type": "number", "format": "double", "description": "Required quantity" }, "quantity_available": { "type": "number", "format": "double", "description": "Available quantity in stock" }, "is_sufficient": { "type": "boolean", "description": "Is sufficient" }, "quality_tier_min": { "type": "number", "format": "double", "description": "Quality tier range available" }, "quality_tier_max": { "type": "number", "format": "double" }, "stock_lot_ids": { "items": { "type": "string" }, "type": "array", "description": "Stock lot IDs containing this material" } }, "required": [ "game_item_id", "material_name", "quantity_required", "quantity_available", "is_sufficient", "stock_lot_ids" ], "type": "object", "additionalProperties": false }, "CraftableItem": { "description": "Craftable item based on owned blueprints and stock", "properties": { "blueprint_id": { "type": "string", "description": "Blueprint UUID" }, "blueprint_name": { "type": "string", "description": "Blueprint name" }, "output_item_name": { "type": "string", "description": "Output item name" }, "output_item_icon": { "type": "string", "description": "Output item icon" }, "item_category": { "type": "string", "description": "Item category" }, "rarity": { "type": "string", "description": "Rarity" }, "tier": { "type": "number", "format": "double", "description": "Tier" }, "crafting_time_seconds": { "type": "number", "format": "double", "description": "Crafting time in seconds" }, "can_craft": { "type": "boolean", "description": "Can craft with current stock" }, "max_craftable_quantity": { "type": "number", "format": "double", "description": "Maximum craftable quantity" }, "materials": { "items": { "$ref": "#/components/schemas/MaterialAvailability" }, "type": "array", "description": "Material availability details" }, "missing_materials_count": { "type": "number", "format": "double", "description": "Missing materials count" }, "estimated_cost_per_craft": { "type": "number", "format": "double", "description": "Estimated cost per craft" } }, "required": [ "blueprint_id", "blueprint_name", "output_item_name", "can_craft", "max_craftable_quantity", "materials", "missing_materials_count" ], "type": "object", "additionalProperties": false }, "GetCraftableItemsResponse": { "description": "Response for getting craftable items from stock", "properties": { "craftable_items": { "items": { "$ref": "#/components/schemas/CraftableItem" }, "type": "array", "description": "Craftable items" }, "total": { "type": "number", "format": "double", "description": "Total count" }, "page": { "type": "number", "format": "double", "description": "Current page" }, "page_size": { "type": "number", "format": "double", "description": "Page size" }, "summary": { "properties": { "items_missing_materials": { "type": "number", "format": "double", "description": "Items missing materials" }, "items_craftable_now": { "type": "number", "format": "double", "description": "Items that can be crafted now" }, "total_blueprints_owned": { "type": "number", "format": "double", "description": "Total blueprints owned" } }, "required": [ "items_missing_materials", "items_craftable_now", "total_blueprints_owned" ], "type": "object", "description": "Summary statistics" } }, "required": [ "craftable_items", "total", "page", "page_size", "summary" ], "type": "object", "additionalProperties": false }, "BlueprintStatistics": { "description": "Statistics for a specific blueprint", "properties": { "blueprint_id": { "type": "string", "description": "Blueprint UUID" }, "blueprint_name": { "type": "string", "description": "Blueprint name" }, "total_crafts": { "type": "number", "format": "double", "description": "Total crafts" }, "average_quality": { "type": "number", "format": "double", "description": "Average output quality" }, "success_rate": { "type": "number", "format": "double", "description": "Success rate percentage" }, "critical_successes": { "type": "number", "format": "double", "description": "Critical success count" }, "total_materials_cost": { "type": "number", "format": "double", "description": "Total materials spent" } }, "required": [ "blueprint_id", "blueprint_name", "total_crafts", "average_quality", "success_rate", "critical_successes", "total_materials_cost" ], "type": "object", "additionalProperties": false }, "GetCraftingStatisticsResponse": { "description": "Response for crafting statistics endpoint", "properties": { "total_sessions": { "type": "number", "format": "double", "description": "Total crafting sessions" }, "unique_blueprints_crafted": { "type": "number", "format": "double", "description": "Total unique blueprints crafted" }, "average_output_quality": { "type": "number", "format": "double", "description": "Average output quality across all crafts" }, "total_critical_successes": { "type": "number", "format": "double", "description": "Total critical successes" }, "critical_success_rate": { "type": "number", "format": "double", "description": "Critical success rate percentage" }, "total_materials_cost": { "type": "number", "format": "double", "description": "Total materials cost" }, "blueprint_statistics": { "items": { "$ref": "#/components/schemas/BlueprintStatistics" }, "type": "array", "description": "Statistics per blueprint" } }, "required": [ "total_sessions", "unique_blueprints_crafted", "average_output_quality", "total_critical_successes", "critical_success_rate", "total_materials_cost", "blueprint_statistics" ], "type": "object", "additionalProperties": false }, "BlueprintSearchResult": { "description": "Blueprint search result item", "properties": { "blueprint_id": { "type": "string", "description": "Blueprint UUID" }, "blueprint_code": { "type": "string", "description": "Blueprint code (internal name for URL-friendly links)" }, "blueprint_name": { "type": "string", "description": "Blueprint name" }, "output_item_name": { "type": "string", "description": "Output item name" }, "output_item_icon": { "type": "string", "description": "Output item icon URL" }, "item_category": { "type": "string", "description": "Item category" }, "item_subcategory": { "type": "string", "description": "Item subcategory" }, "manufacturer": { "type": "string", "description": "Manufacturer name" }, "source": { "type": "string", "description": "Blueprint source (default, mission_reward)" }, "rarity": { "type": "string", "description": "Rarity" }, "tier": { "type": "number", "format": "double", "description": "Tier (1-5)" }, "ingredient_count": { "type": "number", "format": "double", "description": "Number of ingredients" }, "ingredients": { "items": { "properties": { "quantity_required": { "type": "number", "format": "double" }, "icon_url": { "type": "string" }, "sub_type": { "type": "string" }, "name": { "type": "string" } }, "required": [ "quantity_required", "name" ], "type": "object" }, "type": "array", "description": "Ingredient summaries" }, "mission_count": { "type": "number", "format": "double", "description": "Number of missions that reward this blueprint" }, "crafting_time_seconds": { "type": "number", "format": "double", "description": "Crafting time in seconds" }, "modifier_properties": { "items": { "type": "string" }, "type": "array", "description": "Distinct modifier property names (e.g. [\"damagemitigation\", \"mintemp\"])" }, "user_owns": { "type": "boolean", "description": "Does user own this blueprint" } }, "required": [ "blueprint_id", "blueprint_code", "blueprint_name", "output_item_name", "ingredient_count", "ingredients", "mission_count" ], "type": "object", "additionalProperties": false }, "SearchBlueprintsResponse": { "description": "Response for blueprint search endpoint", "properties": { "blueprints": { "items": { "$ref": "#/components/schemas/BlueprintSearchResult" }, "type": "array", "description": "Blueprint search results" }, "total": { "type": "number", "format": "double", "description": "Total number of blueprints matching filters" }, "page": { "type": "number", "format": "double", "description": "Current page number" }, "page_size": { "type": "number", "format": "double", "description": "Page size" } }, "required": [ "blueprints", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "BlueprintCategory": { "description": "Blueprint category with count", "properties": { "category": { "type": "string", "description": "Category name" }, "subcategory": { "type": "string", "description": "Subcategory name" }, "count": { "type": "number", "format": "double", "description": "Number of blueprints in this category" } }, "required": [ "category", "count" ], "type": "object", "additionalProperties": false }, "Blueprint": { "description": "Complete blueprint data", "properties": { "blueprint_id": { "type": "string" }, "version_id": { "type": "string" }, "blueprint_code": { "type": "string" }, "blueprint_name": { "type": "string" }, "blueprint_description": { "type": "string" }, "output_game_item_id": { "type": "string" }, "output_quantity": { "type": "number", "format": "double" }, "item_category": { "type": "string" }, "item_subcategory": { "type": "string" }, "rarity": { "type": "string" }, "tier": { "type": "number", "format": "double" }, "crafting_station_type": { "type": "string" }, "crafting_time_seconds": { "type": "number", "format": "double" }, "required_skill_level": { "type": "number", "format": "double" }, "icon_url": { "type": "string" }, "is_active": { "type": "boolean" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "blueprint_id", "version_id", "blueprint_code", "blueprint_name", "output_game_item_id", "output_quantity", "is_active", "created_at", "updated_at" ], "type": "object", "additionalProperties": false }, "GameItem": { "description": "Game item reference", "properties": { "game_item_id": { "type": "string", "description": "Game item UUID" }, "name": { "type": "string", "description": "Item name" }, "type": { "type": "string", "description": "Item type" }, "sub_type": { "type": "string", "description": "Item sub-type (e.g., mineral, metal, gas for commodities)" }, "icon_url": { "type": "string", "description": "Icon URL" } }, "required": [ "game_item_id", "name", "type" ], "type": "object", "additionalProperties": false }, "BlueprintIngredient": { "description": "Blueprint ingredient with market data", "properties": { "ingredient_id": { "type": "string", "description": "Ingredient UUID" }, "game_item": { "$ref": "#/components/schemas/GameItem", "description": "Game item reference" }, "quantity_required": { "type": "number", "format": "double", "description": "Required quantity" }, "min_quality_tier": { "type": "number", "format": "double", "description": "Minimum quality tier (1-5)" }, "recommended_quality_tier": { "type": "number", "format": "double", "description": "Recommended quality tier (1-5)" }, "is_alternative": { "type": "boolean", "description": "Is alternative ingredient" }, "alternative_group": { "type": "number", "format": "double", "description": "Alternative group ID" }, "slot_name": { "type": "string", "description": "Slot name for linking to slot modifiers" }, "slot_display_name": { "type": "string", "description": "Slot display name" }, "market_price_min": { "type": "number", "format": "double", "description": "Minimum market price" }, "market_price_max": { "type": "number", "format": "double", "description": "Maximum market price" }, "user_inventory_quantity": { "type": "number", "format": "double", "description": "User inventory quantity" } }, "required": [ "ingredient_id", "game_item", "quantity_required", "is_alternative" ], "type": "object", "additionalProperties": false }, "MissionRewardingBlueprint": { "description": "Mission that rewards this blueprint", "properties": { "mission_id": { "type": "string", "description": "Mission UUID" }, "mission_name": { "type": "string", "description": "Mission name" }, "drop_probability": { "type": "number", "format": "double", "description": "Drop probability percentage (0-100)" }, "star_system": { "type": "string", "description": "Star system" } }, "required": [ "mission_id", "mission_name", "drop_probability" ], "type": "object", "additionalProperties": false }, "SlotModifier": { "description": "Quality modifier curve for a blueprint ingredient slot", "properties": { "slot_name": { "type": "string" }, "slot_display_name": { "type": "string" }, "property": { "type": "string", "description": "Property affected (e.g., \"damagemitigation\", \"mintemp\", \"maxtemp\")" }, "start_quality": { "type": "number", "format": "double" }, "end_quality": { "type": "number", "format": "double" }, "modifier_at_start": { "type": "number", "format": "double", "description": "Modifier value at start_quality (e.g., 0.9 = ×0.9 for linear, or -2 for additive)" }, "modifier_at_end": { "type": "number", "format": "double", "description": "Modifier value at end_quality (e.g., 1.1 = ×1.1 for linear, or +2 for additive)" }, "modifier_type": { "type": "string", "enum": [ "linear", "additive" ], "description": "\"linear\" = multiplicative (×0.8–×1.2), \"additive\" = flat integer (+/- value)" } }, "required": [ "slot_name", "slot_display_name", "property", "start_quality", "end_quality", "modifier_at_start", "modifier_at_end", "modifier_type" ], "type": "object", "additionalProperties": false }, "CraftedPropertyDef": { "description": "Crafted property display metadata (how to show a modifier's value to users)", "properties": { "property_key": { "type": "string", "description": "Property key matching slot_modifiers[].property (e.g. \"damagemitigation\")" }, "display_name": { "type": "string", "nullable": true, "description": "Localized display name (e.g. \"Damage Mitigation\")" }, "display_mode": { "type": "string", "enum": [ "raw", "percent", "negated_percent", "scale", "percent_of_base" ], "description": "How to transform the raw modifier value for display" }, "scale_factor": { "type": "number", "format": "double", "nullable": true, "description": "Scale factor (only set when display_mode is \"scale\")" }, "unit_label": { "type": "string", "nullable": true, "description": "Localized unit label (e.g. \"%\", \"C\")" } }, "required": [ "property_key", "display_name", "display_mode", "scale_factor", "unit_label" ], "type": "object", "additionalProperties": false }, "UserBlueprintAcquisition": { "description": "User acquisition data", "properties": { "acquisition_date": { "type": "string", "description": "Acquisition date" }, "acquisition_method": { "type": "string", "description": "Acquisition method" }, "acquisition_location": { "type": "string", "description": "Acquisition location" }, "acquisition_notes": { "type": "string", "description": "Acquisition notes" } }, "required": [ "acquisition_date" ], "type": "object", "additionalProperties": false }, "BlueprintDetailResponse": { "description": "Response for blueprint detail endpoint", "properties": { "blueprint": { "$ref": "#/components/schemas/Blueprint", "description": "Complete blueprint data" }, "output_item": { "$ref": "#/components/schemas/GameItem", "description": "Output item reference" }, "ingredients": { "items": { "$ref": "#/components/schemas/BlueprintIngredient" }, "type": "array", "description": "Ingredients required" }, "missions_rewarding": { "items": { "$ref": "#/components/schemas/MissionRewardingBlueprint" }, "type": "array", "description": "Missions that reward this blueprint" }, "crafting_recipe": { "properties": { "max_output_quality_tier": { "type": "number", "format": "double" }, "min_output_quality_tier": { "type": "number", "format": "double" }, "quality_calculation_type": { "type": "string" } }, "required": [ "max_output_quality_tier", "min_output_quality_tier", "quality_calculation_type" ], "type": "object", "description": "Crafting recipe (if available)" }, "slot_modifiers": { "items": { "$ref": "#/components/schemas/SlotModifier" }, "type": "array", "description": "Per-slot quality modifiers (how ingredient quality affects output stats)" }, "item_attributes": { "$ref": "#/components/schemas/Record_string.string_", "description": "Output item base attributes (damage resistance, temperature, etc.)" }, "crafted_property_defs": { "items": { "$ref": "#/components/schemas/CraftedPropertyDef" }, "type": "array", "description": "Crafted property display metadata for interpreting slot modifier values" }, "user_owns": { "type": "boolean", "description": "Does user own this blueprint" }, "user_acquisition": { "$ref": "#/components/schemas/UserBlueprintAcquisition", "description": "User acquisition data" } }, "required": [ "blueprint", "output_item", "ingredients", "missions_rewarding", "slot_modifiers", "item_attributes" ], "type": "object", "additionalProperties": false }, "CraftableBlueprintResult": { "description": "Result from the craftable blueprints endpoint", "properties": { "blueprint_id": { "type": "string" }, "blueprint_code": { "type": "string" }, "blueprint_name": { "type": "string" }, "output_item_name": { "type": "string" }, "output_item_icon": { "type": "string" }, "item_category": { "type": "string" }, "crafting_time_seconds": { "type": "number", "format": "double" }, "max_craftable": { "type": "number", "format": "double" }, "ingredients": { "items": { "properties": { "quality_value": { "type": "number", "format": "double" }, "available_quantity": { "type": "number", "format": "double" }, "quantity_required": { "type": "number", "format": "double" }, "name": { "type": "string" }, "game_item_id": { "type": "string" } }, "required": [ "available_quantity", "quantity_required", "name", "game_item_id" ], "type": "object" }, "type": "array" } }, "required": [ "blueprint_id", "blueprint_code", "blueprint_name", "output_item_name", "max_craftable", "ingredients" ], "type": "object", "additionalProperties": false }, "MarketVersion": { "type": "string", "enum": [ "V1", "V2" ] }, "Record_string.boolean_": { "properties": {}, "additionalProperties": { "type": "boolean" }, "type": "object", "description": "Construct a type with a set of properties K of type T" }, "GetFeatureFlagResponse": { "description": "Response for getting feature flag\n\nReturns the current market version for the authenticated user,\nalong with developer status to determine if debug UI should be shown.", "properties": { "user_id": { "type": "string", "description": "User ID" }, "market_version": { "$ref": "#/components/schemas/MarketVersion", "description": "Current market version (V1 or V2) — backward compat" }, "is_developer": { "type": "boolean", "description": "Whether user has developer privileges (admin or dev environment)" }, "has_override": { "type": "boolean", "description": "Whether this user has a manual override (show treatment picker if true)" }, "flags": { "$ref": "#/components/schemas/Record_string.boolean_", "description": "All resolved flags for this user" }, "overridden_flags": { "items": { "type": "string" }, "type": "array", "description": "Which flags this user has overrides for" } }, "required": [ "user_id", "market_version", "is_developer", "has_override", "flags", "overridden_flags" ], "type": "object", "additionalProperties": false }, "SetFeatureFlagResponse": { "description": "Response for setting feature flag\n\nConfirms the market version has been updated for the user.", "properties": { "user_id": { "type": "string", "description": "User ID" }, "market_version": { "$ref": "#/components/schemas/MarketVersion", "description": "Updated market version" }, "message": { "type": "string", "description": "Success message" } }, "required": [ "user_id", "market_version", "message" ], "type": "object", "additionalProperties": false }, "SetFeatureFlagRequest": { "description": "Request for setting feature flag\n\nAllows developers to switch between V1 and V2 market experiences.\nRestricted to users with admin role.", "properties": { "market_version": { "$ref": "#/components/schemas/MarketVersion", "description": "Market version to set (V1 or V2) — backward compat for market_v2" }, "flag_name": { "type": "string", "description": "Flag name to set (e.g. \"market_v2\", \"crafting\", \"wiki\")" }, "enabled": { "type": "boolean", "description": "Whether to enable or disable the flag" } }, "type": "object", "additionalProperties": false }, "DashboardOwnerType": { "type": "string", "enum": [ "user", "org", "shop" ], "description": "Wire types for the customizable dashboard. These are the single source of truth\nfor the DashboardConfig shape: TSOA emits them into the OpenAPI spec, and the\nfrontend client codegen turns them into matching TypeScript types — so the same\nstructure is used for server persistence, the API contract, and the client with\nno casting." }, "WidgetScope": { "anyOf": [ { "properties": { "kind": { "type": "string", "enum": [ "me" ], "nullable": false } }, "required": [ "kind" ], "type": "object" }, { "properties": { "kind": { "type": "string", "enum": [ "current_context" ], "nullable": false } }, "required": [ "kind" ], "type": "object" }, { "properties": { "kind": { "type": "string", "enum": [ "all_orgs" ], "nullable": false } }, "required": [ "kind" ], "type": "object" }, { "properties": { "kind": { "type": "string", "enum": [ "all_shops" ], "nullable": false } }, "required": [ "kind" ], "type": "object" }, { "properties": { "spectrumId": { "type": "string" }, "kind": { "type": "string", "enum": [ "specific_org" ], "nullable": false } }, "required": [ "spectrumId", "kind" ], "type": "object" }, { "properties": { "shopId": { "type": "string" }, "kind": { "type": "string", "enum": [ "specific_shop" ], "nullable": false } }, "required": [ "shopId", "kind" ], "type": "object" } ], "description": "Widget data-scope binding, chosen per widget when it is added." }, "WidgetLayout": { "description": "Grid placement in react-grid-layout coordinates.", "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "w": { "type": "number", "format": "double" }, "h": { "type": "number", "format": "double" } }, "required": [ "x", "y", "w", "h" ], "type": "object", "additionalProperties": false }, "Record_string.string-or-number-or-boolean_": { "properties": {}, "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number", "format": "double" }, { "type": "boolean" } ] }, "type": "object", "description": "Construct a type with a set of properties K of type T" }, "DashboardWidget": { "properties": { "id": { "type": "string", "description": "Stable per-instance id (a widget type may appear multiple times)." }, "type": { "type": "string", "description": "Key into the widget registry." }, "scope": { "$ref": "#/components/schemas/WidgetScope" }, "layout": { "$ref": "#/components/schemas/WidgetLayout" }, "settings": { "$ref": "#/components/schemas/Record_string.string-or-number-or-boolean_", "description": "Widget-specific settings (e.g. period). Validated per widget on the client." } }, "required": [ "id", "type", "scope", "layout" ], "type": "object", "additionalProperties": false }, "DashboardConfig": { "properties": { "version": { "type": "number", "format": "double" }, "widgets": { "items": { "$ref": "#/components/schemas/DashboardWidget" }, "type": "array" } }, "required": [ "version", "widgets" ], "type": "object", "additionalProperties": false }, "DashboardLayout": { "properties": { "owner_type": { "$ref": "#/components/schemas/DashboardOwnerType" }, "owner_id": { "type": "string" }, "config": { "$ref": "#/components/schemas/DashboardConfig" }, "updated_by": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "owner_type", "owner_id", "config", "updated_by", "updated_at" ], "type": "object", "additionalProperties": false }, "DashboardLayoutResponse": { "$ref": "#/components/schemas/DashboardLayout" }, "UpdateDashboardLayoutRequest": { "properties": { "owner_type": { "$ref": "#/components/schemas/DashboardOwnerType" }, "owner_id": { "type": "string" }, "config": { "$ref": "#/components/schemas/DashboardConfig" } }, "required": [ "owner_type", "owner_id", "config" ], "type": "object", "additionalProperties": false }, "CartListingInfo": { "description": "Listing information for cart items", "properties": { "listing_id": { "type": "string", "description": "Listing UUID" }, "title": { "type": "string", "description": "Listing title" }, "shop_id": { "type": "string", "description": "Shop ID" }, "shop_name": { "type": "string", "description": "Shop name" }, "shop_slug": { "type": "string", "description": "Shop slug — use for profile links: /shops/:slug" }, "shop_rating": { "type": "number", "format": "double", "description": "Shop rating (0-5)" }, "status": { "type": "string", "description": "Current listing status" }, "shop_next_available": { "type": "string", "nullable": true, "description": "ISO 8601 timestamp of shop's next available slot, or null if not set / currently available" } }, "required": [ "listing_id", "title", "shop_id", "shop_name", "shop_slug", "shop_rating", "status" ], "type": "object", "additionalProperties": false }, "CartVariantDetail": { "description": "Variant details for cart items (separate from listings to avoid TSOA conflicts)", "properties": { "variant_id": { "type": "string", "description": "UUID of the variant" }, "attributes": { "$ref": "#/components/schemas/VariantAttributes", "description": "Variant attributes (quality_tier, quality_value, crafted_source, etc)" }, "display_name": { "type": "string", "description": "Human-readable display name (e.g., \"Tier 5 (95.5%) - Crafted\")" }, "short_name": { "type": "string", "description": "Short name for compact display (e.g., \"T5 Crafted\")" } }, "required": [ "variant_id", "attributes", "display_name", "short_name" ], "type": "object", "additionalProperties": false }, "CartItemDetail": { "description": "Detailed information about a cart item\nRequirement 29.8: Include availability and price change indicators", "properties": { "cart_item_id": { "type": "string", "description": "UUID of the cart item" }, "listing": { "$ref": "#/components/schemas/CartListingInfo", "description": "Listing information" }, "variant": { "$ref": "#/components/schemas/CartVariantDetail", "description": "Variant details with quality attributes" }, "quantity": { "type": "number", "format": "double", "description": "Quantity in cart" }, "price_per_unit": { "type": "number", "format": "double", "description": "Price per unit at time of add-to-cart (snapshot)" }, "subtotal": { "type": "number", "format": "double", "description": "Subtotal for this item (quantity * price_per_unit)" }, "available": { "type": "boolean", "description": "Whether this variant is currently available" }, "quantity_available": { "type": "number", "format": "double", "description": "Total quantity available for this variant" }, "price_changed": { "type": "boolean", "description": "Whether the price has changed since add-to-cart" }, "current_price": { "type": "number", "format": "double", "description": "Current price if price_changed is true" }, "others_in_cart": { "type": "number", "format": "double", "description": "Number of other users who also have this listing in their cart" } }, "required": [ "cart_item_id", "listing", "variant", "quantity", "price_per_unit", "subtotal", "available", "quantity_available", "price_changed" ], "type": "object", "additionalProperties": false }, "GetCartResponse": { "description": "Response from getting cart contents\nRequirement 29.1-29.12: Return cart items with variant details and totals", "properties": { "items": { "items": { "$ref": "#/components/schemas/CartItemDetail" }, "type": "array", "description": "Array of cart items with variant details" }, "total_price": { "type": "number", "format": "double", "description": "Total price of all items in cart" }, "item_count": { "type": "number", "format": "double", "description": "Total number of items in cart" } }, "required": [ "items", "total_price", "item_count" ], "type": "object", "additionalProperties": false }, "AddToCartResponse": { "description": "Response from adding item to cart\nRequirement 30.10: Return cart_item_id on success", "properties": { "cart_item_id": { "type": "string", "description": "UUID of the created cart item" }, "message": { "type": "string", "description": "Success message" } }, "required": [ "cart_item_id", "message" ], "type": "object", "additionalProperties": false }, "AddToCartRequest": { "description": "Request to add an item to cart with variant selection\nRequirement 30.2: Accept listing_id, variant_id, and quantity", "properties": { "listing_id": { "type": "string", "description": "UUID of the listing" }, "variant_id": { "type": "string", "description": "UUID of the specific variant to add" }, "quantity": { "type": "number", "format": "double", "description": "Quantity to add (must be > 0)" } }, "required": [ "listing_id", "variant_id", "quantity" ], "type": "object", "additionalProperties": false }, "UpdateCartItemRequest": { "description": "Request to update a cart item\nRequirement 31.2: Accept quantity and variant_id updates", "properties": { "quantity": { "type": "number", "format": "double", "description": "New quantity (optional, must be > 0 if provided)" }, "variant_id": { "type": "string", "description": "New variant selection (optional)" } }, "type": "object", "additionalProperties": false }, "UnavailableCartItem": { "description": "Unavailable item information for checkout response", "properties": { "cart_item_id": { "type": "string", "description": "Cart item UUID" }, "listing_title": { "type": "string", "description": "Listing title" }, "variant_display_name": { "type": "string", "description": "Variant display name" }, "reason": { "type": "string", "description": "Reason for unavailability" } }, "required": [ "cart_item_id", "listing_title", "variant_display_name", "reason" ], "type": "object", "additionalProperties": false }, "CheckoutCartResponse": { "description": "Response from cart checkout\nRequirement 32.10: Return order_id and purchase summary", "properties": { "result": { "type": "string", "description": "Result status" }, "offer_id": { "type": "string", "description": "UUID of the created offer" }, "session_id": { "type": "string", "description": "UUID of the offer session" }, "discord_invite": { "type": "string", "nullable": true, "description": "Discord invite code (if available)" }, "unavailable_items": { "items": { "$ref": "#/components/schemas/UnavailableCartItem" }, "type": "array", "description": "Array of items that could not be purchased (optional)" } }, "required": [ "result", "offer_id", "session_id", "discord_invite" ], "type": "object", "additionalProperties": false }, "CheckoutCartRequest": { "description": "Request to checkout cart\nRequirement 32.2: Accept confirmation for price changes", "properties": { "confirm_price_changes": { "type": "boolean", "description": "Required if any prices have changed since add-to-cart" }, "note": { "type": "string", "description": "Optional note from buyer to seller" }, "shop_id": { "type": "string", "description": "Checkout only items from this shop. If omitted, all items must be from one shop." } }, "type": "object", "additionalProperties": false }, "BuyOrderVariantDetail": { "description": "Variant details for buy order response", "properties": { "variant_id": { "type": "string", "description": "UUID of the variant" }, "attributes": { "$ref": "#/components/schemas/VariantAttributes", "description": "Variant attributes (quality_tier, quality_value, crafted_source, etc)" }, "display_name": { "type": "string", "description": "Human-readable display name (e.g., \"Tier 5 (95.5%) - Crafted\")" }, "short_name": { "type": "string", "description": "Short name for compact display (e.g., \"T5 Crafted\")" } }, "required": [ "variant_id", "attributes", "display_name", "short_name" ], "type": "object", "additionalProperties": false }, "BuyOrderItemDetail": { "description": "Purchase item detail in buy order response", "properties": { "order_item_id": { "type": "string", "description": "UUID of the order item" }, "listing_id": { "type": "string", "description": "UUID of the listing" }, "item_id": { "type": "string", "description": "UUID of the listing item" }, "variant": { "$ref": "#/components/schemas/BuyOrderVariantDetail", "description": "Variant details with quality attributes" }, "quantity": { "type": "number", "format": "double", "description": "Quantity purchased" }, "price_per_unit": { "type": "number", "format": "double", "description": "Price per unit at time of purchase (snapshot)" }, "subtotal": { "type": "number", "format": "double", "description": "Subtotal for this item (quantity * price_per_unit)" } }, "required": [ "order_item_id", "listing_id", "item_id", "variant", "quantity", "price_per_unit", "subtotal" ], "type": "object", "additionalProperties": false }, "CreateBuyOrderResponse": { "properties": { "order_id": { "type": "string", "description": "UUID of the created order" }, "buyer_id": { "type": "string", "description": "UUID of the buyer" }, "shop_id": { "type": "string", "description": "Shop ID of the seller" }, "total_price": { "type": "number", "format": "double", "description": "Total price in aUEC (atomic units)" }, "status": { "type": "string", "description": "Order status" }, "created_at": { "type": "string", "description": "ISO 8601 timestamp of order creation" }, "item": { "$ref": "#/components/schemas/BuyOrderItemDetail", "description": "Purchase item details" }, "allocation_result": { "properties": { "total_allocated": { "type": "number", "format": "double" }, "total_requested": { "type": "number", "format": "double" }, "has_partial_allocations": { "type": "boolean" } }, "required": [ "total_allocated", "total_requested", "has_partial_allocations" ], "type": "object", "description": "Stock allocation result summary" } }, "required": [ "order_id", "buyer_id", "shop_id", "total_price", "status", "created_at", "item" ], "type": "object", "additionalProperties": false }, "CreateBuyOrderRequest": { "description": "Request to create a direct purchase order\nBypasses cart and creates order immediately from listing with variant selection", "properties": { "listing_id": { "type": "string", "description": "UUID of the listing to purchase from" }, "variant_id": { "type": "string", "description": "UUID of the specific variant to purchase" }, "quantity": { "type": "number", "format": "double", "description": "Quantity to purchase (must be > 0)" } }, "required": [ "listing_id", "variant_id", "quantity" ], "type": "object", "additionalProperties": false }, "BuyOrderPhoto": { "properties": { "resource_id": { "type": "string" }, "url": { "type": "string" } }, "required": [ "resource_id", "url" ], "type": "object", "additionalProperties": false }, "StandingBuyOrder": { "properties": { "buy_order_id": { "type": "string" }, "game_item_id": { "type": "string" }, "game_item_name": { "type": "string" }, "game_item_type": { "type": "string", "description": "Game item type for quality mode determination" }, "buyer_id": { "type": "string" }, "buyer_name": { "type": "string" }, "quantity": { "type": "number", "format": "double" }, "quantity_fulfilled": { "type": "number", "format": "double" }, "price_per_unit": { "type": "number", "format": "double" }, "quality_tier_min": { "type": "number", "format": "double" }, "quality_tier_max": { "type": "number", "format": "double" }, "quality_value_min": { "type": "number", "format": "double", "description": "Minimum quality value (0-1000)" }, "quality_value_max": { "type": "number", "format": "double", "description": "Maximum quality value (0-1000)" }, "negotiable": { "type": "boolean" }, "status": { "type": "string", "enum": [ "active", "fulfilled", "cancelled", "expired" ] }, "created_at": { "type": "string" }, "expires_at": { "type": "string" }, "visibility": { "type": "string", "enum": [ "public", "roster_only", "private" ] }, "target_supplier_id": { "type": "string", "nullable": true }, "target_supplier_contractor_id": { "type": "string", "nullable": true }, "declined_at": { "type": "string", "nullable": true }, "photos": { "items": { "$ref": "#/components/schemas/BuyOrderPhoto" }, "type": "array" } }, "required": [ "buy_order_id", "game_item_id", "game_item_name", "buyer_id", "buyer_name", "quantity", "quantity_fulfilled", "price_per_unit", "negotiable", "status", "created_at" ], "type": "object", "additionalProperties": false }, "BuyOrderVisibility": { "type": "string", "enum": [ "public", "roster_only", "private" ] }, "CreateTargetedBuyOrderRequest": { "properties": { "game_item_id": { "type": "string" }, "quantity": { "type": "number", "format": "double" }, "price_per_unit": { "type": "number", "format": "double" }, "quality_tier_min": { "type": "number", "format": "double" }, "quality_tier_max": { "type": "number", "format": "double" }, "quality_value_min": { "type": "number", "format": "double", "description": "Minimum quality value (0-1000) for resource buy orders" }, "quality_value_max": { "type": "number", "format": "double", "description": "Maximum quality value (0-1000) for resource buy orders" }, "negotiable": { "type": "boolean", "description": "Whether the buyer accepts counter-offers / offer sessions on this order" }, "expires_in_days": { "type": "number", "format": "double" }, "photo_resource_ids": { "items": { "type": "string" }, "type": "array", "description": "Optional image resource IDs to attach to this buy order" }, "visibility": { "$ref": "#/components/schemas/BuyOrderVisibility", "description": "Controls who can see and act on this buy order" }, "target_supplier_id": { "type": "string", "description": "Direct to a specific supplier user (requires visibility = 'private')" }, "target_supplier_contractor_id": { "type": "string", "description": "Direct to a specific supplier org (requires visibility = 'private')" } }, "required": [ "game_item_id", "quantity", "price_per_unit" ], "type": "object", "additionalProperties": false }, "SearchBuyOrdersResponse": { "properties": { "buy_orders": { "items": { "$ref": "#/components/schemas/StandingBuyOrder" }, "type": "array" }, "total": { "type": "number", "format": "double" }, "page": { "type": "number", "format": "double" }, "page_size": { "type": "number", "format": "double" } }, "required": [ "buy_orders", "total", "page", "page_size" ], "type": "object", "additionalProperties": false }, "UpdateStandingBuyOrderRequest": { "properties": { "quantity": { "type": "number", "format": "double" }, "price_per_unit": { "type": "number", "format": "double" }, "quality_tier_min": { "type": "number", "format": "double" }, "quality_tier_max": { "type": "number", "format": "double" }, "quality_value_min": { "type": "number", "format": "double" }, "quality_value_max": { "type": "number", "format": "double" }, "negotiable": { "type": "boolean" }, "expires_in_days": { "type": "number", "format": "double" } }, "type": "object", "additionalProperties": false }, "FulfillBuyOrderRequest": { "properties": { "listing_id": { "type": "string" }, "variant_id": { "type": "string" }, "quantity": { "type": "number", "format": "double", "description": "Quantity to fulfill (defaults to remaining if omitted)" } }, "required": [ "listing_id", "variant_id" ], "type": "object", "additionalProperties": false }, "DeclineBuyOrderRequest": { "properties": { "buy_order_id": { "type": "string" } }, "required": [ "buy_order_id" ], "type": "object", "additionalProperties": false }, "SellerNextAvailableResponse": { "properties": { "next_available": { "type": "string", "nullable": true, "description": "ISO 8601 timestamp of next available slot, or null if currently available / no schedule" }, "has_schedule": { "type": "boolean", "description": "Whether the seller has an availability schedule set" } }, "required": [ "next_available", "has_schedule" ], "type": "object", "additionalProperties": false }, "BidDetail": { "properties": { "bid_id": { "type": "string" }, "bidder": { "properties": { "avatar": { "type": "string", "nullable": true }, "display_name": { "type": "string" }, "username": { "type": "string" } }, "required": [ "avatar", "display_name", "username" ], "type": "object" }, "amount": { "type": "number", "format": "double" }, "is_active": { "type": "boolean" }, "created_at": { "type": "string" } }, "required": [ "bid_id", "bidder", "amount", "is_active", "created_at" ], "type": "object", "additionalProperties": false }, "AuctionDetailResponse": { "properties": { "listing_id": { "type": "string" }, "end_time": { "type": "string" }, "min_bid_increment": { "type": "number", "format": "double" }, "buyout_price": { "type": "number", "format": "double", "nullable": true }, "reserve_price": { "type": "number", "format": "double", "nullable": true }, "status": { "type": "string" }, "current_highest_bid": { "type": "number", "format": "double", "nullable": true }, "total_bids": { "type": "number", "format": "double" }, "bids": { "items": { "$ref": "#/components/schemas/BidDetail" }, "type": "array" } }, "required": [ "listing_id", "end_time", "min_bid_increment", "buyout_price", "reserve_price", "status", "current_highest_bid", "total_bids", "bids" ], "type": "object", "additionalProperties": false }, "PlaceBidResponse": { "properties": { "bid_id": { "type": "string" }, "amount": { "type": "number", "format": "double" }, "is_highest": { "type": "boolean" }, "current_highest": { "type": "number", "format": "double" } }, "required": [ "bid_id", "amount", "is_highest", "current_highest" ], "type": "object", "additionalProperties": false }, "PlaceBidRequest": { "properties": { "amount": { "type": "number", "format": "double" } }, "required": [ "amount" ], "type": "object", "additionalProperties": false }, "PriceDataPoint": { "description": "Price data point in time series", "properties": { "timestamp": { "type": "string", "description": "ISO 8601 timestamp for this data point" }, "avg_price": { "type": "number", "format": "double", "description": "Average price during this time period" }, "min_price": { "type": "number", "format": "double", "description": "Minimum price during this time period" }, "max_price": { "type": "number", "format": "double", "description": "Maximum price during this time period" }, "volume": { "type": "number", "format": "double", "description": "Number of transactions/listings during this time period" }, "quality_tier": { "type": "number", "format": "double", "description": "Optional quality tier for this data series" } }, "required": [ "timestamp", "avg_price", "min_price", "max_price", "volume" ], "type": "object", "additionalProperties": false }, "GetPriceHistoryResponse": { "description": "Response for price history endpoint", "properties": { "game_item_id": { "type": "string", "description": "Game item UUID" }, "game_item_name": { "type": "string", "description": "Game item name" }, "data": { "items": { "$ref": "#/components/schemas/PriceDataPoint" }, "type": "array", "description": "Time series data points" }, "start_date": { "type": "string", "description": "Start date of the time range" }, "end_date": { "type": "string", "description": "End date of the time range" }, "interval": { "type": "string", "description": "Time interval used for aggregation" } }, "required": [ "game_item_id", "game_item_name", "data", "start_date", "end_date", "interval" ], "type": "object", "additionalProperties": false }, "QualityTierDistribution": { "description": "Quality tier distribution data", "properties": { "quality_tier": { "type": "number", "format": "double", "description": "Quality tier (1-5)" }, "quantity_available": { "type": "number", "format": "double", "description": "Total quantity available for this tier" }, "listing_count": { "type": "number", "format": "double", "description": "Number of listings offering this tier" }, "avg_price": { "type": "number", "format": "double", "description": "Average price for this tier" }, "min_price": { "type": "number", "format": "double", "description": "Minimum price for this tier" }, "max_price": { "type": "number", "format": "double", "description": "Maximum price for this tier" }, "shop_count": { "type": "number", "format": "double", "description": "Number of unique sellers offering this tier" } }, "required": [ "quality_tier", "quantity_available", "listing_count", "avg_price", "min_price", "max_price", "shop_count" ], "type": "object", "additionalProperties": false }, "GetQualityDistributionResponse": { "description": "Response for quality distribution endpoint", "properties": { "game_item_id": { "type": "string", "description": "Game item UUID" }, "game_item_name": { "type": "string", "description": "Game item name" }, "distribution": { "items": { "$ref": "#/components/schemas/QualityTierDistribution" }, "type": "array", "description": "Distribution data by quality tier" }, "total_quantity": { "type": "number", "format": "double", "description": "Total quantity across all tiers" }, "start_date": { "type": "string", "description": "Start date of the time range (if filtered)" }, "end_date": { "type": "string", "description": "End date of the time range (if filtered)" } }, "required": [ "game_item_id", "game_item_name", "distribution", "total_quantity" ], "type": "object", "additionalProperties": false }, "QualityTierSales": { "description": "Sales data by quality tier", "properties": { "quality_tier": { "type": "number", "format": "double", "description": "Quality tier (1-5)" }, "volume": { "type": "number", "format": "double", "description": "Total sales volume (number of items sold)" }, "avg_price": { "type": "number", "format": "double", "description": "Average sale price for this tier" }, "avg_time_to_sale_hours": { "type": "number", "format": "double", "description": "Average time to sale in hours" } }, "required": [ "quality_tier", "volume", "avg_price", "avg_time_to_sale_hours" ], "type": "object", "additionalProperties": false }, "QualityTierPremium": { "description": "Price premium data by quality tier", "properties": { "quality_tier": { "type": "number", "format": "double", "description": "Quality tier (1-5)" }, "premium_percentage": { "type": "number", "format": "double", "description": "Price premium percentage compared to tier 1 baseline" } }, "required": [ "quality_tier", "premium_percentage" ], "type": "object", "additionalProperties": false }, "GetSellerStatsResponse": { "description": "Response for seller stats endpoint", "properties": { "shop_id": { "type": "string", "description": "Shop ID" }, "sales_by_quality": { "items": { "$ref": "#/components/schemas/QualityTierSales" }, "type": "array", "description": "Sales data grouped by quality tier" }, "inventory_distribution": { "items": { "$ref": "#/components/schemas/QualityTierDistribution" }, "type": "array", "description": "Current inventory distribution by quality tier" }, "price_premiums": { "items": { "$ref": "#/components/schemas/QualityTierPremium" }, "type": "array", "description": "Price premium percentages by quality tier" } }, "required": [ "shop_id", "sales_by_quality", "inventory_distribution", "price_premiums" ], "type": "object", "additionalProperties": false }, "ListingConversionStat": { "description": "View → conversion metrics for a single listing.\n\nNote: `unique_viewers` counts distinct logged-in viewers only; anonymous\nviews are recorded with a null viewer and are included in `views` but not in\n`unique_viewers`.", "properties": { "listing_id": { "type": "string", "description": "Listing UUID" }, "title": { "type": "string", "description": "Listing title" }, "views": { "type": "number", "format": "double", "description": "Total recorded views (including anonymous)" }, "unique_viewers": { "type": "number", "format": "double", "description": "Distinct logged-in viewers" }, "cart_adds": { "type": "number", "format": "double", "description": "Distinct users who added this listing to a cart" }, "orders": { "type": "number", "format": "double", "description": "Distinct orders that include this listing" }, "sales": { "type": "number", "format": "double", "description": "Distinct fulfilled (sold) orders that include this listing" }, "conversion_rate": { "type": "number", "format": "double", "description": "Sales as a percentage of views (0 when there are no views)" }, "created_at": { "type": "string", "description": "ISO 8601 timestamp when the listing was created" } }, "required": [ "listing_id", "title", "views", "unique_viewers", "cart_adds", "orders", "sales", "conversion_rate", "created_at" ], "type": "object", "additionalProperties": false }, "ListingStatsTotals": { "description": "Shop-level totals across all returned listings.", "properties": { "views": { "type": "number", "format": "double", "description": "Total views across listings" }, "unique_viewers": { "type": "number", "format": "double", "description": "Total distinct logged-in viewers across listings" }, "cart_adds": { "type": "number", "format": "double", "description": "Total distinct cart adds across listings" }, "orders": { "type": "number", "format": "double", "description": "Total distinct orders across listings" }, "sales": { "type": "number", "format": "double", "description": "Total distinct fulfilled orders across listings" }, "conversion_rate": { "type": "number", "format": "double", "description": "Aggregate sales as a percentage of aggregate views" } }, "required": [ "views", "unique_viewers", "cart_adds", "orders", "sales", "conversion_rate" ], "type": "object", "additionalProperties": false }, "GetListingStatsResponse": { "description": "Response for the listing-stats endpoint", "properties": { "shop_id": { "type": "string", "description": "Shop ID" }, "listings": { "items": { "$ref": "#/components/schemas/ListingConversionStat" }, "type": "array", "description": "Per-listing view → conversion metrics, ordered by views descending" }, "totals": { "$ref": "#/components/schemas/ListingStatsTotals", "description": "Aggregate totals across the returned listings" } }, "required": [ "shop_id", "listings", "totals" ], "type": "object", "additionalProperties": false }, "FeatureFlagConfig": { "properties": { "flag_name": { "type": "string" }, "default_version": { "$ref": "#/components/schemas/MarketVersion" }, "rollout_percentage": { "type": "number", "format": "double" }, "enabled": { "type": "boolean" } }, "required": [ "flag_name", "default_version", "rollout_percentage", "enabled" ], "type": "object", "additionalProperties": false }, "UpdateConfigRequest": { "properties": { "flag_name": { "type": "string", "description": "Which flag to update (defaults to market_v2)" }, "default_version": { "$ref": "#/components/schemas/MarketVersion", "description": "Global default version for users without overrides" }, "rollout_percentage": { "type": "number", "format": "double", "description": "Percentage of users (0-100) to receive V2 via rollout" }, "enabled": { "type": "boolean", "description": "Master kill-switch: when false, everyone gets V1" } }, "type": "object", "additionalProperties": false }, "FeatureFlagStats": { "properties": { "flag_name": { "type": "string" }, "enabled": { "type": "boolean" }, "default_version": { "$ref": "#/components/schemas/MarketVersion" }, "rollout_percentage": { "type": "number", "format": "double" }, "override_count": { "type": "number", "format": "double" }, "enabled_overrides": { "type": "number", "format": "double" }, "disabled_overrides": { "type": "number", "format": "double" } }, "required": [ "flag_name", "enabled", "default_version", "rollout_percentage", "override_count", "enabled_overrides", "disabled_overrides" ], "type": "object", "additionalProperties": false }, "UserOverrideWithName": { "properties": { "user_id": { "type": "string" }, "username": { "type": "string" }, "flag_name": { "type": "string" }, "enabled": { "type": "boolean" }, "updated_at": { "type": "string" } }, "required": [ "user_id", "username", "flag_name", "enabled", "updated_at" ], "type": "object", "additionalProperties": false }, "UserOverridesResponse": { "properties": { "overrides": { "items": { "$ref": "#/components/schemas/UserOverrideWithName" }, "type": "array" }, "total": { "type": "number", "format": "double" } }, "required": [ "overrides", "total" ], "type": "object", "additionalProperties": false }, "SetUserOverrideRequest": { "properties": { "username": { "type": "string" }, "flag_name": { "type": "string" }, "enabled": { "type": "boolean" } }, "required": [ "username", "flag_name", "enabled" ], "type": "object", "additionalProperties": false }, "ImportErrorResponse": { "description": "Error response for import failures", "properties": { "success": { "type": "boolean", "enum": [ false ], "nullable": false }, "error": { "type": "string" }, "details": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "success", "error", "timestamp" ], "type": "object", "additionalProperties": false }, "ImportGameDataResponse": { "description": "Import summary returned by game data import endpoint", "properties": { "success": { "type": "boolean" }, "summary": { "properties": { "blueprintsUpdated": { "type": "number", "format": "double" }, "blueprintsInserted": { "type": "number", "format": "double" }, "blueprintsProcessed": { "type": "number", "format": "double" }, "missionsUpdated": { "type": "number", "format": "double" }, "missionsInserted": { "type": "number", "format": "double" }, "missionsProcessed": { "type": "number", "format": "double" }, "fullSetsCreated": { "type": "number", "format": "double" }, "nameChanges": { "type": "number", "format": "double" }, "updated": { "type": "number", "format": "double" }, "inserted": { "type": "number", "format": "double" }, "matchedFuzzy": { "type": "number", "format": "double" }, "matchedCStoneUUID": { "type": "number", "format": "double" }, "matchedExact": { "type": "number", "format": "double" }, "matched": { "type": "number", "format": "double" }, "existingDBItems": { "type": "number", "format": "double" }, "validP4KItems": { "type": "number", "format": "double" }, "totalP4KItems": { "type": "number", "format": "double" } }, "required": [ "blueprintsUpdated", "blueprintsInserted", "blueprintsProcessed", "missionsUpdated", "missionsInserted", "missionsProcessed", "fullSetsCreated", "nameChanges", "updated", "inserted", "matchedFuzzy", "matchedCStoneUUID", "matchedExact", "matched", "existingDBItems", "validP4KItems", "totalP4KItems" ], "type": "object" }, "errors": { "items": { "type": "string" }, "type": "array" }, "timestamp": { "type": "string" } }, "required": [ "success", "summary", "errors", "timestamp" ], "type": "object", "additionalProperties": false }, "GameDataImportJob": { "properties": { "id": { "type": "string" }, "status": { "type": "string", "enum": [ "validating", "extracting", "importing", "completed", "failed" ] }, "startedAt": { "type": "string" }, "completedAt": { "type": "string", "nullable": true }, "progress": { "type": "string", "nullable": true }, "result": { "allOf": [ { "$ref": "#/components/schemas/ImportGameDataResponse" } ], "nullable": true }, "error": { "type": "string", "nullable": true }, "details": { "type": "string", "nullable": true } }, "required": [ "id", "status", "startedAt", "completedAt", "progress", "result", "error", "details" ], "type": "object", "additionalProperties": false }, "RequestDeletionResponse": { "properties": { "scheduledAt": { "type": "string" }, "message": { "type": "string" } }, "required": [ "scheduledAt", "message" ], "type": "object", "additionalProperties": false }, "RequestDeletionBody": { "properties": { "reason": { "type": "string" } }, "type": "object", "additionalProperties": false }, "DeletionStatusResponse": { "properties": { "pending": { "type": "boolean" }, "scheduledAt": { "type": "string" }, "isTombstone": { "type": "boolean" } }, "required": [ "pending", "isTombstone" ], "type": "object", "additionalProperties": false }, "DeletionPreCheckResponse": { "properties": { "canDelete": { "type": "boolean" }, "blockers": { "items": { "properties": { "detail": { "type": "string" }, "type": { "type": "string" } }, "required": [ "detail", "type" ], "type": "object" }, "type": "array" } }, "required": [ "canDelete", "blockers" ], "type": "object", "additionalProperties": false } }, "securitySchemes": {} }, "info": { "title": "SC Market API v2", "version": "2.0.0", "description": "Star Citizen Market API v2 - TSOA-based with auto-generated routes and OpenAPI specification", "license": { "name": "MIT" }, "contact": {} }, "paths": { "/variant-types": { "get": { "operationId": "GetVariantTypes", "responses": { "200": { "description": "All variant type definitions with validation rules", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetVariantTypesResponse" } } } } }, "description": "Get all variant types with validation rules\n\nReturns all available variant type definitions including name, display_name,\nvalue_type, min_value, max_value, and allowed_values. Also includes flags\nfor affects_pricing, searchable, and filterable. Results are ordered by\ndisplay_order for consistent UI presentation.\n\nRequirements:\n- 4.4: GET /api/v2/variant-types endpoint\n- 4.5: Return all variant types with validation rules\n- 4.5: Include name, display_name, value_type, min_value, max_value, allowed_values\n- 4.5: Include affects_pricing, searchable, filterable flags\n- 4.5: Order by display_order", "summary": "Get all variant types", "tags": [ "Variant Types V2" ], "security": [], "parameters": [] } }, "/suppliers": { "get": { "operationId": "GetMySuppliers", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetSuppliersResponse" } } } } }, "tags": [ "Suppliers V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "query", "name": "status", "required": false, "schema": { "type": "string", "enum": [ "active", "suspended", "removed" ] } }, { "in": "query", "name": "tier", "required": false, "schema": { "type": "string", "enum": [ "preferred", "approved", "restricted" ] } }, { "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } } ] }, "post": { "operationId": "AddSupplier", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddSupplierResponse" } } } } }, "tags": [ "Suppliers V2" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddSupplierRequest" } } } } } }, "/suppliers/{relationshipId}": { "patch": { "operationId": "UpdateSupplier", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSupplierResponse" } } } } }, "tags": [ "Suppliers V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "relationshipId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSupplierRequest" } } } } }, "delete": { "operationId": "RemoveSupplier", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" } }, "required": [ "success" ], "type": "object" } } } } }, "tags": [ "Suppliers V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "relationshipId", "required": true, "schema": { "type": "string" } } ] } }, "/suppliers/as-supplier": { "get": { "operationId": "GetMyAggregators", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetSuppliersResponse" } } } } }, "tags": [ "Suppliers V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } } ] } }, "/stock-lots": { "post": { "operationId": "CreateStockLot", "responses": { "200": { "description": "Created stock lot", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStockLotResponse" } } } } }, "description": "Create a stock lot", "summary": "Create stock lot", "tags": [ "Stock Lots V2" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "description": "Create request with item_id, quantity, variant_attributes", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateStockLotRequest", "description": "Create request with item_id, quantity, variant_attributes" } } } } }, "get": { "operationId": "GetStockLots", "responses": { "200": { "description": "Stock lots with pagination metadata", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetStockLotsResponse" } } } } }, "description": "Get stock lots with filters\n\nRetrieves stock lots with optional filtering by listing, game item, location, variant,\nand quality tier. Supports pagination and returns enriched lot information including\nvariant attributes, location details, and owner information.\n\nRequirements:\n- 20.1: GET /api/v2/stock-lots endpoint\n- 20.2: Accept listing_id filter parameter\n- 20.3: Accept game_item_id filter parameter\n- 20.4: Accept location_id filter parameter\n- 20.5: Accept listed filter parameter\n- 20.6: Accept variant_id filter parameter\n- 20.7: Accept quality_tier_min and quality_tier_max filter parameters\n- 20.8: Return array of stock lots with variant information\n- 20.9: Include location and owner details in response\n- 20.10: Support pagination with page and page_size parameters\n- 20.11: Return total count for pagination\n- 20.12: Include crafted_by information if applicable", "summary": "Get stock lots", "tags": [ "Stock Lots V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Filter by listing UUID", "in": "query", "name": "listing_id", "required": false, "schema": { "type": "string" } }, { "description": "Filter by game item UUID", "in": "query", "name": "game_item_id", "required": false, "schema": { "type": "string" } }, { "description": "Filter by location UUID", "in": "query", "name": "location_id", "required": false, "schema": { "type": "string" } }, { "description": "Filter by listed status", "in": "query", "name": "listed", "required": false, "schema": { "type": "boolean" } }, { "description": "Filter by variant UUID", "in": "query", "name": "variant_id", "required": false, "schema": { "type": "string" } }, { "description": "Minimum quality tier (1-5)", "in": "query", "name": "quality_tier_min", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Maximum quality tier (1-5)", "in": "query", "name": "quality_tier_max", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "spectrum_id", "required": false, "schema": { "type": "string" } }, { "description": "Page number for pagination (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Number of results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } } ] } }, "/stock-lots/{id}": { "put": { "operationId": "UpdateStockLot", "responses": { "200": { "description": "Updated stock lot", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStockLotResponse" } } } } }, "description": "Update a stock lot\n\nUpdates a stock lot's quantity, listed status, location, or notes. Verifies ownership\nbefore allowing updates and prevents negative quantities. Triggers automatic recalculation\nof quantity_available in the parent listing_items record.\n\nRequirements:\n- 20.1: PUT /api/v2/stock-lots/:id endpoint\n- 20.2: Accept quantity_total update\n- 20.3: Accept listed status update\n- 20.4: Accept location_id update\n- 20.5: Accept notes update\n- 20.6: Verify ownership before updates\n- 20.7: Trigger quantity_available recalculation\n- 20.8: Prevent negative quantities\n- 20.9: Log modifications to audit trail\n- 20.10: Return updated stock lot with variant information\n- 20.11: Validate notes length (max 1000 characters)\n- 20.12: Use database transaction for atomicity", "summary": "Update stock lot", "tags": [ "Stock Lots V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Stock lot UUID", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Update request with optional fields", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStockLotRequest", "description": "Update request with optional fields" } } } } }, "delete": { "operationId": "DeleteStockLot", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } } } } }, "description": "Delete a stock lot\n\nVerifies ownership and ensures the lot is not allocated to pending orders.", "summary": "Delete stock lot", "tags": [ "Stock Lots V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Stock lot UUID", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/stock-lots/bulk-update": { "post": { "operationId": "BulkUpdateStockLots", "responses": { "200": { "description": "Bulk update results with success/failure counts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkUpdateStockLotsResponse" } } } } }, "description": "Bulk update stock lots\n\nPerforms bulk operations on multiple stock lots in a single transaction. Validates\nownership for all lots before applying any updates. Returns summary of successful\nand failed operations.\n\nRequirements:\n- 22.1: POST /api/v2/stock-lots/bulk-update endpoint\n- 22.2: Accept array of stock_lot_id values with updates\n- 22.3: Support bulk quantity updates\n- 22.4: Support bulk listing/unlisting operations\n- 22.5: Support bulk location transfers\n- 22.6: Use database transaction for atomicity\n- 22.7: Return summary of successful and failed operations\n- 22.8: Validate ownership for all stock lots in batch\n- 22.9: Log all bulk operations to audit trail\n- 22.10: Trigger quantity_available recalculation for affected listings", "summary": "Bulk update stock lots", "tags": [ "Stock Lots V2" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "description": "Bulk update request with array of lot updates", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkUpdateStockLotsRequest", "description": "Bulk update request with array of lot updates" } } } } } }, "/shops/mine": { "get": { "operationId": "GetMyShops", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ShopResponse" }, "type": "array" } } } } }, "description": "List all shops the current user can manage.\nIncludes personal shops and org shops where user has manage_market.", "summary": "List my shops", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/shops": { "post": { "operationId": "CreateShop", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ShopResponse" } } } } }, "description": "Create a new shop. If contractor_id is provided, the shop is org-owned\n(user must have manage_market). Otherwise, user-owned.", "summary": "Create shop", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateShopRequest" } } } } }, "get": { "operationId": "BrowseShops", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "page_size": { "type": "number", "format": "double" }, "page": { "type": "number", "format": "double" }, "total": { "type": "number", "format": "double" }, "shops": { "items": { "$ref": "#/components/schemas/ShopPublicResponse" }, "type": "array" } }, "required": [ "page_size", "page", "total", "shops" ], "type": "object" } } } } }, "description": "Browse all active shops. Supports search, pagination, and sorting.", "summary": "Browse shops", "tags": [ "Shops" ], "security": [], "parameters": [ { "in": "query", "name": "search", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "tag", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "sort_by", "required": false, "schema": { "type": "string", "enum": [ "name", "rating", "created_at", "total_sales" ] } }, { "in": "query", "name": "sort_order", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] } } ] } }, "/shops/quick": { "post": { "operationId": "QuickCreateShop", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ShopResponse" } } } } }, "description": "Quick-create a shop with auto-populated defaults from user profile or org details.\nOnly name is required to proceed — everything else is pre-filled.", "summary": "Quick-create shop", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuickCreateShopRequest" } } } } } }, "/shops/by-owner": { "get": { "operationId": "GetShopsByOwner", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ShopPublicResponse" }, "type": "array" } } } } }, "description": "Get shops by owner. Used on user/org profile pages to show their shops.", "summary": "Get shops by owner", "tags": [ "Shops" ], "security": [], "parameters": [ { "in": "query", "name": "username", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "spectrum_id", "required": false, "schema": { "type": "string" } } ] } }, "/shops/{slug}": { "get": { "operationId": "GetShop", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ShopPublicResponse" } } } } }, "description": "Get a shop's public profile by slug.", "summary": "Get shop by slug", "tags": [ "Shops" ], "security": [], "parameters": [ { "in": "path", "name": "slug", "required": true, "schema": { "type": "string" } } ] } }, "/shops/{shopId}": { "put": { "operationId": "UpdateShop", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ShopResponse" } } } } }, "description": "Update shop settings. Only the shop owner (or org member with manage_market) can update.", "summary": "Update shop", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "shopId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateShopRequest" } } } } }, "delete": { "operationId": "ArchiveShop", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" } }, "required": [ "success" ], "type": "object" } } } } }, "description": "Archive a shop. Listings under this shop will remain but the shop won't appear in directories.", "summary": "Archive shop", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "shopId", "required": true, "schema": { "type": "string" } } ] } }, "/shops/{shopId}/reviews": { "get": { "operationId": "GetShopReviews", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "page_size": { "type": "number", "format": "double" }, "page": { "type": "number", "format": "double" }, "total": { "type": "number", "format": "double" }, "reviews": { "items": { "$ref": "#/components/schemas/ShopReviewResponse" }, "type": "array" } }, "required": [ "page_size", "page", "total", "reviews" ], "type": "object" } } } } }, "description": "Get reviews for a shop. Returns paginated list of ratings with reviewer info.", "summary": "Get shop reviews", "tags": [ "Shops" ], "security": [], "parameters": [ { "in": "path", "name": "shopId", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } } ] } }, "/shops/{shopId}/webhooks": { "get": { "operationId": "GetShopWebhooks", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ShopWebhookResponse" }, "type": "array" } } } } }, "description": "List webhooks for a shop.\nRequires manage_market permission.", "summary": "List shop webhooks", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "shopId", "required": true, "schema": { "type": "string" } } ] }, "post": { "operationId": "CreateShopWebhook", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ShopWebhookResponse" } } } } }, "description": "Create a webhook for a shop.\nRequires manage_market permission.", "summary": "Create shop webhook", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "shopId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateShopWebhookRequest" } } } } } }, "/shops/{shopId}/webhooks/{webhookId}": { "delete": { "operationId": "DeleteShopWebhook", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" } }, "required": [ "success" ], "type": "object" } } } } }, "description": "Delete a webhook for a shop.\nRequires manage_market permission.", "summary": "Delete shop webhook", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "shopId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "webhookId", "required": true, "schema": { "type": "string" } } ] } }, "/shops/{shopId}/transfer": { "post": { "operationId": "TransferShop", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ShopResponse" } } } } }, "description": "Transfer shop ownership to a user or an org.\n\nSupports all directions (user↔user, user↔org, org↔org). The requester must\ncurrently be able to manage the shop. When transferring to an org, the\nrequester must also have manage_market in the target org (auto-accept).\n\nAfter transfer, active order/offer assignments held by people no longer\nassociated with the new owner are cleared so the new owner can reclaim them,\nand shop badges are recomputed (owner-derived badges may change).", "summary": "Transfer shop ownership", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "shopId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransferShopRequest" } } } } } }, "/shops/{shopId}/blocklist": { "get": { "operationId": "GetShopBlocklist", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ShopBlocklistEntry" }, "type": "array" } } } } }, "description": "Get users blocked from this shop.", "summary": "Get shop blocklist", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "shopId", "required": true, "schema": { "type": "string" } } ] }, "post": { "operationId": "BlockUserFromShop", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" } }, "required": [ "success" ], "type": "object" } } } } }, "description": "Block a user from this shop.", "summary": "Block user from shop", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "shopId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BlockUserRequest" } } } } } }, "/shops/{shopId}/blocklist/{blockedUserId}": { "delete": { "operationId": "UnblockUserFromShop", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" } }, "required": [ "success" ], "type": "object" } } } } }, "description": "Unblock a user from this shop.", "summary": "Unblock user from shop", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "shopId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "blockedUserId", "required": true, "schema": { "type": "string" } } ] } }, "/shops/{shopId}/customers": { "get": { "operationId": "GetShopCustomers", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ShopCustomersResponse" } } } } }, "description": "Get customers who have placed orders at this shop.", "summary": "Get shop customers", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "shopId", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } } ] } }, "/shops/{shopId}/order-settings": { "get": { "operationId": "GetShopOrderSettings", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ShopOrderSettingResponse" }, "type": "array" } } } } }, "description": "List all order settings for this shop.", "summary": "Get shop order settings", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "shopId", "required": true, "schema": { "type": "string" } } ] } }, "/shops/{shopId}/order-settings/{settingType}": { "put": { "operationId": "UpsertShopOrderSetting", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ShopOrderSettingResponse" } } } } }, "description": "Create or update an order setting for this shop.", "summary": "Upsert shop order setting", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "shopId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "settingType", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertShopOrderSettingRequest" } } } } }, "delete": { "operationId": "DeleteShopOrderSetting", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" } }, "required": [ "success" ], "type": "object" } } } } }, "description": "Delete an order setting for this shop.", "summary": "Delete shop order setting", "tags": [ "Shops" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "shopId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "settingType", "required": true, "schema": { "type": "string" } } ] } }, "/requisitions": { "post": { "operationId": "CreateRequisition", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRequisitionResponse" } } } } }, "tags": [ "Requisitions V2" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRequisitionRequest" } } } } }, "get": { "operationId": "GetRequisitions", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetRequisitionsResponse" } } } } }, "tags": [ "Requisitions V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "query", "name": "role", "required": false, "schema": { "type": "string", "enum": [ "buyer", "supplier" ] } }, { "in": "query", "name": "status", "required": false, "schema": { "type": "string", "enum": [ "pending", "assigned", "completed", "cancelled" ] } }, { "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } } ] } }, "/requisitions/{orderId}": { "get": { "operationId": "GetRequisition", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequisitionDetail" } } } } }, "tags": [ "Requisitions V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "orderId", "required": true, "schema": { "type": "string" } } ] } }, "/requisitions/offer-items": { "post": { "operationId": "SetOfferRequisitionItems", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "items": { "items": { "$ref": "#/components/schemas/OfferRequisitionItem" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } } }, "tags": [ "Requisitions V2" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetOfferRequisitionItemsRequest" } } } } } }, "/requisitions/offer-items/{offerId}": { "get": { "operationId": "GetOfferRequisitionItems", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "items": { "items": { "$ref": "#/components/schemas/OfferRequisitionItem" }, "type": "array" } }, "required": [ "items" ], "type": "object" } } } } }, "tags": [ "Requisitions V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "offerId", "required": true, "schema": { "type": "string" } } ] } }, "/orders": { "post": { "operationId": "CreateOrder", "responses": { "200": { "description": "Created order with order_id and item details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOrderResponse" } } } } }, "description": "Create a new order with variant-specific items\n\nCreates an order by:\n1. Validating variant availability for each item\n2. Creating order record in V1 orders table\n3. Creating market_orders entries (V1 compatibility)\n4. Creating order_market_items_v2 entries with variant tracking\n5. Snapshotting variant prices at purchase time\n6. Allocating stock from variant-specific lots\n7. Notifying seller of new order\n\nUses database transaction for atomicity to ensure all-or-nothing behavior.\nStock allocation uses listing_item_lots directly (V2).\n\nRequirements:\n- 25.1: POST /api/v2/orders endpoint\n- 25.2: Accept array of items with listing_id, variant_id, quantity\n- 25.3: Validate variant availability before order creation\n- 25.4: Use variant-specific pricing in order calculations\n- 25.5: Allocate stock from correct variant's stock lots\n- 25.6: Use database transaction for atomicity\n- 25.7: Snapshot variant prices at time of order creation\n- 25.8: Prevent ordering unavailable variants with descriptive error\n- 25.9: Create order_market_items_v2 entries for each item\n- 25.10: Return order_id and order details on success\n- 25.11: Notify seller of new order\n- 25.12: Log order creation to Audit_Trail", "summary": "Create order", "tags": [ "Orders V2" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "description": "Order creation request with items array", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOrderRequest", "description": "Order creation request with items array" } } } } }, "get": { "operationId": "GetOrders", "responses": { "200": { "description": "Orders list with pagination metadata", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetOrdersResponse" } } } } }, "description": "Get orders list with filtering and pagination\n\nRetrieves a list of orders for the current user with:\n1. Role-based filtering (buyer or seller)\n2. Status filtering (pending, completed, cancelled)\n3. Quality tier filtering (min and max)\n4. Pagination support\n5. Sorting options\n\nReturns order previews with quality tier information visible.\n\nRequirements:\n- 45.1: Provide OrderListV2 React component (backend support)\n- 45.2: Maintain visual parity with V1 OrderList component\n- 45.3: Use RTK_Query_Client for API calls\n- 45.4: Show quality tier in order preview\n- 45.5: Filter orders by quality tier", "summary": "Get orders list", "tags": [ "Orders V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "query", "name": "status", "required": false, "schema": { "type": "string", "enum": [ "pending", "completed", "cancelled" ] } }, { "in": "query", "name": "role", "required": false, "schema": { "type": "string", "enum": [ "buyer", "seller" ] } }, { "in": "query", "name": "quality_tier_min", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "quality_tier_max", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "sort_by", "required": false, "schema": { "type": "string", "enum": [ "created_at", "updated_at", "total_price" ] } }, { "in": "query", "name": "sort_order", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] } } ] } }, "/orders/{orderId}": { "get": { "operationId": "GetOrderDetail", "responses": { "200": { "description": "Order details with buyer/seller info and variant details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetOrderDetailResponse" } } } } }, "description": "Get order details with variant information\n\nRetrieves complete order information including:\n1. Order metadata (status, timestamps, total price)\n2. Buyer and seller information (username, display_name, avatar)\n3. Array of order items with variant details\n4. Quality tier, variant attributes, and display_name for each item\n5. Price per unit snapshot from time of purchase\n\nAuthorization: User must be either the buyer or seller of the order.\n\nRequirements:\n- 26.1: GET /api/v2/orders/:id endpoint\n- 26.2: Return order metadata with buyer and seller information\n- 26.3: Return array of order items with variant details\n- 26.4: Include quality_tier for each order item\n- 26.5: Include variant attributes for each item\n- 26.6: Include variant display_name for each item\n- 26.7: Include price_per_unit snapshot from time of purchase\n- 26.8: Calculate order totals with per-variant pricing\n- 26.9: Include order status and timestamps\n- 26.10: Return 404 if order not found\n- 26.11: Validate user authorization to view order\n- 26.12: Include fulfillment status per item", "summary": "Get order detail", "tags": [ "Orders V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "UUID of the order to retrieve", "in": "path", "name": "orderId", "required": true, "schema": { "type": "string" } } ] } }, "/orders/by-listing/{listingId}": { "get": { "operationId": "GetOrdersByListing", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrdersByListingResponse" } } } } }, "description": "Get orders and offers related to a specific listing.\nOnly visible to the listing owner or org members.", "summary": "Get orders by listing", "tags": [ "Orders V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Listing UUID", "in": "path", "name": "listingId", "required": true, "schema": { "type": "string" } } ] } }, "/onboarding/status": { "get": { "operationId": "GetOnboardingStatus", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OnboardingStatusResponse" } } } } }, "tags": [ "Onboarding" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/onboarding/complete": { "post": { "operationId": "CompleteOnboarding", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "completedAt": { "type": "string" } }, "required": [ "completedAt" ], "type": "object" } } } } }, "tags": [ "Onboarding" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/offers/search": { "get": { "operationId": "SearchOffers", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchOffersV2Response" } } } } }, "description": "Search offers for the current user", "tags": [ "Offers V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "query", "name": "role", "required": false, "schema": { "type": "string", "enum": [ "customer", "seller" ] } }, { "in": "query", "name": "status", "required": false, "schema": { "type": "string", "enum": [ "active", "closed" ] } }, { "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } } ] } }, "/offers/{sessionId}": { "get": { "operationId": "GetOfferSession", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetOfferSessionV2Response" } } } } }, "description": "Get offer session with V2 variant-enriched market listings\n\nNOTE: must stay declared *after* every literal-path GET on this route\n(e.g. \"search\"). TSOA emits Express routes in declaration order, so a\n\"{sessionId}\" registered first would swallow /offers/search and try to\nload a session whose id is the literal string \"search\".", "tags": [ "Offers V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "sessionId", "required": true, "schema": { "type": "string" } } ] } }, "/listings": { "post": { "operationId": "CreateListing", "responses": { "200": { "description": "Created listing with listing_id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateListingResponse" } } } } }, "description": "Create a new listing with variants\n\nCreates a listing with stock lots that have variant attributes (quality tier, crafted source, etc).\nUses database transaction for atomicity. Supports unified pricing (one price for all variants)\nor per-variant pricing (different prices per quality tier).\n\nThe variant deduplication logic ensures that variants with identical attributes are reused\nacross listings, preventing duplicate variant records.\n\nRequirements:\n- 14.1: POST /api/v2/listings endpoint\n- 14.2: Accept title, description, game_item_id\n- 14.3: Accept pricing_mode and base_price\n- 14.4: Accept array of lots with variant_attributes\n- 14.5: Create or reuse variants based on variant_attributes\n- 14.6: Create stock_lots for each lot\n- 14.7: Use database transaction for atomicity\n- 14.8: Validate all inputs before creating listing\n- 14.9: Return created listing with listing_id\n- 14.11: Validate seller ownership before creation", "summary": "Create listing", "tags": [ "Listings V2" ], "security": [ { "verified": [] } ], "parameters": [], "requestBody": { "description": "Listing creation request with title, description, pricing, and lots", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateListingRequest", "description": "Listing creation request with title, description, pricing, and lots" } } } } } }, "/listings/search": { "get": { "operationId": "SearchListings", "responses": { "200": { "description": "Search results with pagination metadata", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchListingsResponse" } } } } }, "description": "Search listings with filters\n\nSearches active listings using full-text search, quality tier filters, price filters,\nand game item filters. Uses the listing_search view for optimized query performance.\n\nRequirements:\n- 15.1: GET /api/v2/listings/search endpoint\n- 15.2: Accept text query parameter for full-text search\n- 15.3: Accept game_item_id parameter for item filtering\n- 15.4: Accept quality_tier_min and quality_tier_max parameters\n- 15.5: Accept price_min and price_max parameters\n- 15.6: Accept page and page_size parameters for pagination\n- 15.7: Return listings with price_min, price_max, quality_tier_min, quality_tier_max\n- 15.8: Return total count for pagination\n- 15.9: Support sorting by created_at, price, quality, seller_rating\n- 15.10: Include seller information in results\n- 15.11: Include variant_count in results\n- 15.12: Execute queries within 50ms performance target", "summary": "Search listings", "tags": [ "Listings V2" ], "security": [], "parameters": [ { "description": "Full-text search query", "in": "query", "name": "text", "required": false, "schema": { "type": "string" } }, { "description": "Filter by specific game item UUID", "in": "query", "name": "game_item_id", "required": false, "schema": { "type": "string" } }, { "description": "Minimum quality tier (1-5)", "in": "query", "name": "quality_tier_min", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Maximum quality tier (1-5)", "in": "query", "name": "quality_tier_max", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "quality_value_min", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "quality_value_max", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Minimum price filter", "in": "query", "name": "price_min", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Maximum price filter", "in": "query", "name": "price_max", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Page number for pagination (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Number of results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "item_type", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "quantity_min", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "status", "required": false, "schema": { "type": "string", "enum": [ "active", "inactive", "sold", "expired", "cancelled" ] } }, { "description": "Sort field (default: created_at)", "in": "query", "name": "sort_by", "required": false, "schema": { "type": "string", "enum": [ "created_at", "updated_at", "price", "quality", "shop_rating", "quantity" ] } }, { "description": "Sort order (default: desc)", "in": "query", "name": "sort_order", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] } }, { "in": "query", "name": "language_codes", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "listing_type", "required": false, "schema": { "type": "string", "enum": [ "single", "bundle", "bulk" ] } }, { "in": "query", "name": "shop_slug", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "pickup_method", "required": false, "schema": { "type": "string", "enum": [ "delivery", "pickup", "any" ] } }, { "in": "query", "name": "in_stock", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "has_photos", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "bulk_discount", "required": false, "schema": { "type": "boolean" } } ] } }, "/listings/mine": { "get": { "operationId": "GetMyListings", "responses": { "200": { "description": "Updated listing with variant breakdown", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetMyListingsResponse" } } } } }, "description": "Update an existing listing\n\nUpdates listing metadata (title, description), pricing (base_price or per-variant prices),\nand stock lot details (quantities, listed status, locations). Validates ownership before\nallowing updates and prevents editing sold or cancelled listings.\n\nRequirements:\n- 17.1: PUT /api/v2/listings/:id endpoint\n- 17.2: Allow updating title and description\n- 17.3: Allow updating base_price for unified pricing mode\n- 17.4: Allow updating per-variant prices for per_variant pricing mode\n- 17.5: Allow updating stock lot quantities\n- 17.6: Allow updating stock lot listed status\n- 17.7: Prevent editing sold or cancelled listings\n- 17.8: Validate ownership before allowing updates\n- 17.9: Return updated listing with variant breakdown\n- 17.10: Log all modifications to Audit_Trail\n- 17.11: Use database transaction for atomicity\n- 17.12: Invalidate cache after updates", "summary": "Update listing", "tags": [ "Listings V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Filter by listing status", "in": "query", "name": "status", "required": false, "schema": { "type": "string", "enum": [ "active", "inactive", "sold", "expired", "cancelled" ] } }, { "description": "Page number for pagination (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Number of results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Sort field (default: created_at)", "in": "query", "name": "sort_by", "required": false, "schema": { "type": "string", "enum": [ "created_at", "updated_at", "price", "quantity" ] } }, { "description": "Sort order (default: desc)", "in": "query", "name": "sort_order", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] } }, { "in": "query", "name": "spectrum_id", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "shop_id", "required": false, "schema": { "type": "string" } } ] } }, "/listings/inventory-summary": { "get": { "operationId": "GetInventorySummary", "responses": { "200": { "description": "Complete listing detail with variant breakdown", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InventorySummaryResponse" } } } } }, "description": "Get listing detail with variant breakdown\n\nRetrieves complete listing information including seller details, game item information,\nand variant breakdown with quantities, prices, and locations. Returns 404 if listing\nnot found.\n\nRequirements:\n- 16.1: GET /api/v2/listings/:id endpoint\n- 16.2: Return listing metadata with seller information\n- 16.3: Return array of items with game_item details\n- 16.4: Return array of variants for each item with attributes\n- 16.5: Return quantity and price for each variant\n- 16.6: Return display_name for each variant\n- 16.7: Include location information for stock lots\n- 16.8: Include crafted_by information if applicable\n- 16.9: Return 404 if listing not found\n- 16.10: Include view count and timestamps\n- 16.11: Include seller rating and status\n- 16.12: Support image gallery with multiple photos", "summary": "Get listing detail", "tags": [ "Listings V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "query", "name": "spectrum_id", "required": false, "schema": { "type": "string" } } ] } }, "/listings/{id}": { "get": { "operationId": "GetListingDetail", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetListingDetailResponse" } } } } }, "tags": [ "Listings V2" ], "security": [], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] }, "put": { "operationId": "UpdateListing", "responses": { "200": { "description": "Search results with pagination metadata", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetListingDetailResponse" } } } } }, "description": "Search listings with filters\n\nSearches active listings using full-text search, quality tier filters, price filters,\nand game item filters. Uses the listing_search view for optimized query performance.\n\nRequirements:\n- 15.1: GET /api/v2/listings/search endpoint\n- 15.2: Accept text query parameter for full-text search\n- 15.3: Accept game_item_id parameter for item filtering\n- 15.4: Accept quality_tier_min and quality_tier_max parameters\n- 15.5: Accept price_min and price_max parameters\n- 15.6: Accept page and page_size parameters for pagination\n- 15.7: Return listings with price_min, price_max, quality_tier_min, quality_tier_max\n- 15.8: Return total count for pagination\n- 15.9: Support sorting by created_at, price, quality, seller_rating\n- 15.10: Include seller information in results\n- 15.11: Include variant_count in results\n- 15.12: Execute queries within 50ms performance target", "summary": "Search listings", "tags": [ "Listings V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateListingRequest" } } } } }, "delete": { "operationId": "DeleteListing", "responses": { "200": { "description": "Success message", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } } } } }, "description": "Archive (soft delete) a listing\n\nSets the listing status to 'cancelled'. Validates ownership before allowing deletion.", "summary": "Delete listing", "tags": [ "Listings V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Listing UUID", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/listings/{id}/refresh": { "post": { "operationId": "RefreshListing", "responses": { "200": { "description": "Success message with next refresh time", "content": { "application/json": { "schema": { "properties": { "next_refresh_at": { "type": "string" }, "message": { "type": "string" } }, "required": [ "next_refresh_at", "message" ], "type": "object" } } } } }, "description": "Refresh a listing to bump it to the top of search results\n\nUpdates the listing's updated_at timestamp to make it appear at the top of search results\nwhen sorted by date. Enforces a cooldown period between refreshes to prevent abuse.\nValidates ownership before allowing refresh.\n\nRequirements:\n- 49.1: POST /api/v2/listings/:id/refresh endpoint\n- 49.2: Update listing updated_at timestamp\n- 49.3: Enforce cooldown period between refreshes\n- 49.4: Validate ownership before allowing refresh\n- 49.5: Log refresh actions to Audit_Trail", "summary": "Refresh listing", "tags": [ "Listings V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Listing UUID", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/listings/{id}/views": { "post": { "operationId": "TrackView", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "views": { "type": "number", "format": "double" } }, "required": [ "views" ], "type": "object" } } } } }, "description": "Track a listing view", "summary": "Increment view count", "tags": [ "Listings V2" ], "security": [], "parameters": [ { "description": "Listing UUID", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/listings/{id}/photos": { "post": { "operationId": "UploadPhotos", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "photos": { "items": { "properties": { "url": { "type": "string" }, "resource_id": { "type": "string" } }, "required": [ "url", "resource_id" ], "type": "object" }, "type": "array" } }, "required": [ "photos" ], "type": "object" } } } } }, "description": "Upload photos for a listing", "summary": "Upload listing photos", "tags": [ "Listings V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Listing UUID", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/listings/import-uex": { "post": { "operationId": "ImportFromUex", "responses": { "200": { "description": "Preview of importable listings or import result", "content": { "application/json": { "schema": { "properties": { "total": { "type": "number", "format": "double" }, "imported": { "type": "number", "format": "double" }, "preview": { "items": { "properties": { "source": { "type": "string" }, "quality": { "type": "number", "format": "double" }, "quantity": { "type": "number", "format": "double" }, "price": { "type": "number", "format": "double" }, "title": { "type": "string" } }, "required": [ "quantity", "price", "title" ], "type": "object" }, "type": "array" } }, "type": "object" } } } } }, "description": "Import listings from UEX marketplace\n\nFetches a user's active sell listings from UEXCorp API and creates\ncorresponding listings on SC Market. Supports importing as the user\nor as an org they belong to.", "summary": "Import listings from UEX", "tags": [ "Listings V2" ], "security": [ { "verified": [] } ], "parameters": [], "requestBody": { "description": "UEX username and optional org to import as", "required": true, "content": { "application/json": { "schema": { "properties": { "confirm": { "type": "boolean" }, "listings": { "items": { "properties": { "source": { "type": "string" }, "location": { "type": "string" }, "durability": { "type": "number", "format": "double" }, "quality": { "type": "number", "format": "double" }, "quantity": { "type": "number", "format": "double" }, "price": { "type": "number", "format": "double" }, "description": { "type": "string" }, "title": { "type": "string" } }, "required": [ "quantity", "price", "description", "title" ], "type": "object" }, "type": "array" }, "shop_id": { "type": "string" }, "uex_username": { "type": "string" } }, "required": [ "shop_id", "uex_username" ], "type": "object", "description": "UEX username and optional org to import as" } } } } } }, "/inventory": { "get": { "operationId": "GetInventory", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InventoryResponse" } } } } }, "description": "List all inventory lots for the current user", "tags": [ "Inventory V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "query", "name": "game_item_id", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "listing_id", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "listed", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } } ] }, "post": { "operationId": "CreateInventoryLot", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "lot": { "$ref": "#/components/schemas/InventoryLotDetail" } }, "required": [ "lot" ], "type": "object" } } } } }, "description": "Create an unlisted inventory lot (personal inventory)", "tags": [ "Inventory V2" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInventoryLotRequest" } } } } } }, "/inventory/{lotId}/list": { "post": { "operationId": "LinkToListing", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "lot": { "$ref": "#/components/schemas/InventoryLotDetail" } }, "required": [ "lot" ], "type": "object" } } } } }, "description": "Link a lot to a listing (makes it available for sale)", "tags": [ "Inventory V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "lotId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LinkToListingRequest" } } } } } }, "/inventory/{lotId}/unlist": { "post": { "operationId": "UnlinkFromListing", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "lot": { "$ref": "#/components/schemas/InventoryLotDetail" } }, "required": [ "lot" ], "type": "object" } } } } }, "description": "Unlink a lot from its listing (returns to personal inventory)", "tags": [ "Inventory V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "lotId", "required": true, "schema": { "type": "string" } } ] } }, "/inventory/{lotId}": { "delete": { "operationId": "DeleteInventoryLot", "responses": { "204": { "description": "No content" } }, "description": "Delete an inventory lot", "tags": [ "Inventory V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "lotId", "required": true, "schema": { "type": "string" } } ] } }, "/integrations/scmdb/ingest/{token}": { "post": { "operationId": "IngestWebhook", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScmdbIngestResponse" } } } } }, "description": "Receive SCMDB sync events.\nPublic endpoint — authentication is via the token in the URL path.\nContent-Type from SCMDB is text/plain but body is JSON.", "summary": "Ingest SCMDB webhook", "tags": [ "Integrations - SCMDB" ], "security": [], "parameters": [ { "description": "Sync token identifying the user", "in": "path", "name": "token", "required": true, "schema": { "type": "string" } } ] } }, "/integrations/scmdb/status": { "get": { "operationId": "GetConnectionStatus", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScmdbStatusResponse" } } } } }, "description": "Get SCMDB sync connection status for the authenticated user.", "summary": "Get SCMDB status", "tags": [ "Integrations - SCMDB" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/integrations/scmdb/connect": { "post": { "operationId": "Connect", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScmdbConnectResponse" } } } } }, "description": "Generate a new SCMDB sync token and return the ingest URL.", "summary": "Connect SCMDB", "tags": [ "Integrations - SCMDB" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/integrations/scmdb/regenerate": { "post": { "operationId": "Regenerate", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScmdbConnectResponse" } } } } }, "description": "Regenerate the SCMDB sync token. Old URL stops working immediately.", "summary": "Regenerate SCMDB token", "tags": [ "Integrations - SCMDB" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/integrations/scmdb/disconnect": { "delete": { "operationId": "Disconnect", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "ok": { "type": "boolean" } }, "required": [ "ok" ], "type": "object" } } } } }, "description": "Disconnect SCMDB sync. Deactivates the token.", "summary": "Disconnect SCMDB", "tags": [ "Integrations - SCMDB" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/admin/imports/{source}": { "post": { "operationId": "StartImport", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "job": { "$ref": "#/components/schemas/ImportJob" } }, "required": [ "job" ], "type": "object" } } } } }, "description": "Start a bulk import job", "tags": [ "Admin Imports" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Import source: cstone-items, uex-items, or uex-attributes", "in": "path", "name": "source", "required": true, "schema": { "$ref": "#/components/schemas/ImportSource" } } ] } }, "/admin/imports/{jobId}": { "get": { "operationId": "GetJobStatus", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "job": { "allOf": [ { "$ref": "#/components/schemas/ImportJob" } ], "nullable": true } }, "required": [ "job" ], "type": "object" } } } } }, "description": "Get status of a specific import job", "tags": [ "Admin Imports" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "The job ID returned from startImport", "in": "path", "name": "jobId", "required": true, "schema": { "type": "string" } } ] } }, "/admin/imports": { "get": { "operationId": "ListJobs", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "jobs": { "items": { "$ref": "#/components/schemas/ImportJob" }, "type": "array" } }, "required": [ "jobs" ], "type": "object" } } } } }, "description": "List all import jobs (most recent first)", "tags": [ "Admin Imports" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/images/upload": { "post": { "operationId": "UploadImage", "responses": { "200": { "description": "The uploaded image resource_id and CDN URL", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageUploadResponse" } } } } }, "description": "Upload a single image\n\nUploads and validates an image immediately (before form submission).\nThe returned resource_id can be used in photo_resource_ids when creating a listing.", "summary": "Upload image", "tags": [ "Images V2" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/health": { "get": { "operationId": "GetHealth", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthResponse" } } } } }, "description": "Health check endpoint", "summary": "Check API health status", "tags": [ "Health" ], "security": [], "parameters": [] } }, "/game-items/search": { "get": { "operationId": "SearchGameItems", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/GameItemSearchResult" }, "type": "array" } } } } }, "description": "Search game items by name", "summary": "Search game items", "tags": [ "Game Items V2" ], "security": [], "parameters": [ { "description": "Search text", "in": "query", "name": "query", "required": false, "schema": { "type": "string" } }, { "description": "Max results (default 50)", "in": "query", "name": "limit", "required": false, "schema": { "format": "double", "type": "number" } } ] } }, "/game-items/categories": { "get": { "operationId": "GetCategories", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/GameItemCategory" }, "type": "array" } } } } }, "description": "Get game item categories", "summary": "Get categories", "tags": [ "Game Items V2" ], "security": [], "parameters": [] } }, "/game-items/{id}/listings": { "get": { "operationId": "GetListings", "responses": { "200": { "description": "Game item listings with quality distribution", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetGameItemListingsResponse" } } } } }, "description": "Get all listings for a specific game item with quality distribution\n\nReturns all active listings for the specified game item along with quality\ndistribution statistics. Supports filtering by quality tier and sorting options.\nComputes quality distribution across all listings showing quantity, price ranges,\nand seller counts per quality tier.\n\nRequirements:\n- 38.1: GET /api/v2/game-items/:id/listings endpoint\n- 38.2: Return all active listings for specified game item\n- 38.3: Compute quality distribution across all listings\n- 38.4: Return quantity available per quality_tier\n- 38.5: Return price range per quality_tier (min, max, average)\n- 38.6: Return number of sellers per quality_tier\n- 38.7: Support filtering by quality_tier\n- 38.8: Support sorting by price, quality, quantity, seller_rating\n- 38.9: Support pagination with page and page_size parameters\n- 38.10: Cache quality distribution for performance\n- 38.11: Execute queries within 50ms performance target\n- 38.12: Include game item metadata in response", "summary": "Get listings for game item", "tags": [ "Game Items V2" ], "security": [], "parameters": [ { "description": "Game item UUID (required)", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "description": "Optional quality tier filter (1-5)", "in": "query", "name": "quality_tier", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Sort field (default: price)", "in": "query", "name": "sort_by", "required": false, "schema": { "type": "string", "enum": [ "price", "quality", "quantity", "shop_rating" ] } }, { "description": "Sort order (default: asc)", "in": "query", "name": "sort_order", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] } }, { "description": "Page number for pagination (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Number of results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } } ] } }, "/game-items/aggregates": { "get": { "operationId": "SearchGameItemAggregates", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchGameItemAggregatesResponse" } } } } }, "description": "Search game item aggregates for the bulk items page.\nReturns one row per game item with totals across all sellers.", "summary": "Search game item aggregates", "tags": [ "Game Items V2" ], "security": [], "parameters": [ { "in": "query", "name": "text", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "item_type", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "price_min", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "price_max", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "quantity_min", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "quantity_max", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "sort_by", "required": false, "schema": { "type": "string", "enum": [ "price", "quantity", "name", "shop_count" ] } }, { "in": "query", "name": "sort_order", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] } }, { "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } } ] } }, "/game-data/wishlists": { "get": { "operationId": "GetWishlists", "responses": { "200": { "description": "List of user wishlists with statistics", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListWishlistsResponse" } } } } }, "description": "Get user's wishlists\n\nReturns all wishlists owned by the authenticated user with item counts\nand progress statistics.\n\nRequirements:\n- 32.1: List user wishlists\n- 32.2: Display item counts\n- 32.3: Display progress statistics\n- 46.3: Display acquisition progress", "summary": "Get user wishlists", "tags": [ "Game Data - Wishlists" ], "security": [ { "loggedin": [] } ], "parameters": [] }, "post": { "operationId": "CreateWishlist", "responses": { "200": { "description": "Created wishlist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Wishlist" } } } } }, "description": "Create a new wishlist\n\nCreates a new wishlist for the authenticated user with specified settings.\nSupports public/private visibility and organization collaboration.\n\nRequirements:\n- 32.1: Create wishlist\n- 32.2: Support custom names and descriptions\n- 32.4: Support public/private visibility\n- 32.5: Support organization wishlists", "summary": "Create wishlist", "tags": [ "Game Data - Wishlists" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateWishlistRequest" } } } } } }, "/game-data/wishlists/{wishlist_id}": { "get": { "operationId": "GetWishlist", "responses": { "200": { "description": "Wishlist with items and statistics", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetWishlistResponse" } } } } }, "description": "Get wishlist detail with items\n\nReturns complete wishlist information including all items with enriched\ngame data, crafting availability, and progress statistics.\n\nRequirements:\n- 32.3: Get wishlist detail\n- 53.1: Display all wishlist items\n- 53.2: Display item details (name, icon, type)\n- 53.3: Display crafting availability\n- 53.4: Display progress statistics", "summary": "Get wishlist detail", "tags": [ "Game Data - Wishlists" ], "security": [], "parameters": [ { "description": "Wishlist UUID", "in": "path", "name": "wishlist_id", "required": true, "schema": { "type": "string" } }, { "description": "Optional share token for public wishlists", "in": "query", "name": "share_token", "required": false, "schema": { "type": "string" } } ] }, "put": { "operationId": "UpdateWishlist", "responses": { "200": { "description": "Updated wishlist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Wishlist" } } } } }, "description": "Update wishlist\n\nUpdates wishlist metadata including name, description, and visibility settings.\nOnly the wishlist owner can update it.\n\nRequirements:\n- 32.4: Update wishlist\n- 32.5: Update visibility settings", "summary": "Update wishlist", "tags": [ "Game Data - Wishlists" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Wishlist UUID", "in": "path", "name": "wishlist_id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateWishlistRequest" } } } } }, "delete": { "operationId": "DeleteWishlist", "responses": { "200": { "description": "Success response", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" } }, "required": [ "success" ], "type": "object" } } } } }, "description": "Delete wishlist\n\nPermanently deletes a wishlist and all its items.\nOnly the wishlist owner can delete it.\n\nRequirements:\n- 32.6: Delete wishlist", "summary": "Delete wishlist", "tags": [ "Game Data - Wishlists" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Wishlist UUID", "in": "path", "name": "wishlist_id", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/wishlists/{wishlist_id}/items": { "post": { "operationId": "AddWishlistItem", "responses": { "200": { "description": "Created wishlist item", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WishlistItemWithDetails" } } } } }, "description": "Add item to wishlist\n\nAdds a new item to the wishlist with specified quantity, quality, and priority.\nSupports both craftable and non-craftable items.\n\nRequirements:\n- 46.7: Add item to wishlist\n- 53.5: Support priority levels\n- 53.6: Support quality tier specification\n- 53.7: Support notes", "summary": "Add item to wishlist", "tags": [ "Game Data - Wishlists" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Wishlist UUID", "in": "path", "name": "wishlist_id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddWishlistItemRequest" } } } } } }, "/game-data/wishlists/{wishlist_id}/items/{item_id}": { "delete": { "operationId": "RemoveWishlistItem", "responses": { "200": { "description": "Success response", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" } }, "required": [ "success" ], "type": "object" } } } } }, "description": "Remove item from wishlist\n\nPermanently removes an item from the wishlist.\n\nRequirements:\n- 46.8: Remove item from wishlist", "summary": "Remove item from wishlist", "tags": [ "Game Data - Wishlists" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Wishlist UUID", "in": "path", "name": "wishlist_id", "required": true, "schema": { "type": "string" } }, { "description": "Item UUID", "in": "path", "name": "item_id", "required": true, "schema": { "type": "string" } } ] }, "put": { "operationId": "UpdateWishlistItem", "responses": { "200": { "description": "Updated wishlist item", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WishlistItemWithDetails" } } } } }, "description": "Update wishlist item\n\nUpdates item properties including quantity, quality tier, priority, notes, and acquisition status.\n\nRequirements:\n- 46.9: Update item priority/notes\n- 53.8: Update acquisition status\n- 53.9: Support reordering by priority", "summary": "Update wishlist item", "tags": [ "Game Data - Wishlists" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Wishlist UUID", "in": "path", "name": "wishlist_id", "required": true, "schema": { "type": "string" } }, { "description": "Item UUID", "in": "path", "name": "item_id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateWishlistItemRequest" } } } } } }, "/game-data/wishlists/{wishlist_id}/shopping-list": { "get": { "operationId": "GenerateShoppingList", "responses": { "200": { "description": "Shopping list with material requirements", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ShoppingListResponse" } } } } }, "description": "Generate shopping list from wishlist\n\nAnalyzes all wishlist items and generates a comprehensive shopping list\nshowing required materials for crafting, quantities needed, and acquisition methods.\n\nRequirements:\n- 46.10: Generate shopping list\n- 53.10: Display material requirements", "summary": "Generate shopping list", "tags": [ "Game Data - Wishlists" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Wishlist UUID", "in": "path", "name": "wishlist_id", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/wiki/items": { "get": { "operationId": "SearchItems", "responses": { "200": { "description": "Wiki item search results with pagination", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchWikiItemsResponse" } } } } }, "description": "Search and filter game items with full stats\n\nReturns comprehensive item database with filtering by type, size, grade,\nmanufacturer, and full-text search. Includes all item attributes extracted\nfrom game data (weapon stats, shield stats, power output, etc.).", "summary": "Search wiki items", "tags": [ "Game Data - Wiki" ], "security": [], "parameters": [ { "description": "Full-text search on item name", "in": "query", "name": "text", "required": false, "schema": { "type": "string" } }, { "description": "Filter by item type (e.g., WeaponGun, Shield, PowerPlant)", "in": "query", "name": "type", "required": false, "schema": { "type": "string" } }, { "description": "Filter by item sub-type", "in": "query", "name": "sub_type", "required": false, "schema": { "type": "string" } }, { "description": "Filter by item size (1-5, S1-S5)", "in": "query", "name": "size", "required": false, "schema": { "type": "string" } }, { "description": "Filter by item grade (A, B, C, D, F)", "in": "query", "name": "grade", "required": false, "schema": { "type": "string" } }, { "description": "Filter by manufacturer name", "in": "query", "name": "manufacturer", "required": false, "schema": { "type": "string" } }, { "description": "Filter by game item category", "in": "query", "name": "category", "required": false, "schema": { "type": "string" } }, { "description": "Game version ID (defaults to active LIVE version)", "in": "query", "name": "version_id", "required": false, "schema": { "type": "string" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "default": 1, "format": "double", "type": "number" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "default": 20, "format": "double", "type": "number" } } ] } }, "/game-data/wiki/items/{id}": { "get": { "operationId": "GetItemDetail", "responses": { "200": { "description": "Complete item details with attributes, recipes, and missions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WikiItemDetail" } } } } }, "description": "Get item detail with all attributes, crafting recipes, and related missions\n\nReturns complete item information including all extracted attributes\n(weapon stats, shield stats, power output, etc.), blueprints that craft\nthis item, missions that reward this item, and market listing statistics.", "summary": "Get item details", "tags": [ "Game Data - Wiki" ], "security": [], "parameters": [ { "description": "Game item UUID", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/wiki/ships": { "get": { "operationId": "GetShips", "responses": { "200": { "description": "Ship search results with pagination", "content": { "application/json": { "schema": { "properties": { "page_size": { "type": "number", "format": "double" }, "page": { "type": "number", "format": "double" }, "total": { "type": "number", "format": "double" }, "ships": { "items": { "$ref": "#/components/schemas/WikiShipSearchResult" }, "type": "array" } }, "required": [ "page_size", "page", "total", "ships" ], "type": "object" } } } } }, "description": "Get ship list with manufacturer, focus, and size\n\nReturns all ships with basic information for browsing. Ships are identified\nby specific item types in the game data.", "summary": "Get ships", "tags": [ "Game Data - Wiki" ], "security": [], "parameters": [ { "description": "Filter by manufacturer", "in": "query", "name": "manufacturer", "required": false, "schema": { "type": "string" } }, { "description": "Filter by ship focus (e.g., Combat, Exploration, Mining)", "in": "query", "name": "focus", "required": false, "schema": { "type": "string" } }, { "description": "Filter by ship size", "in": "query", "name": "size", "required": false, "schema": { "type": "string" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "default": 1, "format": "double", "type": "number" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "default": 20, "format": "double", "type": "number" } } ] } }, "/game-data/wiki/ships/{id}": { "get": { "operationId": "GetShipDetail", "responses": { "200": { "description": "Complete ship details with loadout", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WikiShipDetail" } } } } }, "description": "Get ship detail with default loadout and description\n\nReturns complete ship information including all attributes, default loadout\ncomponents, and detailed specifications.", "summary": "Get ship details", "tags": [ "Game Data - Wiki" ], "security": [], "parameters": [ { "description": "Ship game item UUID", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/wiki/commodities": { "get": { "operationId": "GetCommodities", "responses": { "200": { "description": "Commodity search results with pagination", "content": { "application/json": { "schema": { "properties": { "page_size": { "type": "number", "format": "double" }, "page": { "type": "number", "format": "double" }, "total": { "type": "number", "format": "double" }, "commodities": { "items": { "$ref": "#/components/schemas/WikiCommoditySearchResult" }, "type": "array" } }, "required": [ "page_size", "page", "total", "commodities" ], "type": "object" } } } } }, "description": "Get commodity/resource list with mining stats\n\nReturns all resources and commodities with acquisition methods and mining\nstatistics where applicable.", "summary": "Get commodities", "tags": [ "Game Data - Wiki" ], "security": [], "parameters": [ { "description": "Filter by resource category", "in": "query", "name": "category", "required": false, "schema": { "type": "string" } }, { "description": "Filter to mineable resources only", "in": "query", "name": "can_be_mined", "required": false, "schema": { "type": "boolean" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "default": 1, "format": "double", "type": "number" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "default": 20, "format": "double", "type": "number" } } ] } }, "/game-data/wiki/locations": { "get": { "operationId": "GetLocations", "responses": { "200": { "description": "Location hierarchy nodes", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/WikiLocationNode" }, "type": "array" } } } } }, "description": "Get starmap hierarchy browser\n\nReturns hierarchical location data (System → Planet → Moon → Outpost)\nfor browsing the game universe.", "summary": "Get locations", "tags": [ "Game Data - Wiki" ], "security": [], "parameters": [ { "description": "Optional parent location ID to get children", "in": "query", "name": "parent_id", "required": false, "schema": { "type": "string" } } ] } }, "/game-data/wiki/manufacturers": { "get": { "operationId": "GetManufacturers", "responses": { "200": { "description": "Manufacturer list", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/WikiManufacturerSearchResult" }, "type": "array" } } } } }, "description": "Get manufacturer list with lore\n\nReturns all manufacturers with descriptions and item counts.", "summary": "Get manufacturers", "tags": [ "Game Data - Wiki" ], "security": [], "parameters": [] } }, "/game-data/wiki/manufacturers/{id}": { "get": { "operationId": "GetManufacturerDetail", "responses": { "200": { "description": "Complete manufacturer details with items", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WikiManufacturerDetail" } } } } }, "description": "Get manufacturer detail with all items\n\nReturns complete manufacturer information including all items produced\nby this manufacturer.", "summary": "Get manufacturer details", "tags": [ "Game Data - Wiki" ], "security": [], "parameters": [ { "description": "Manufacturer name", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/versions": { "get": { "operationId": "ListVersions", "responses": { "200": { "description": "Array of all game versions", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/GameVersion" }, "type": "array" } } } } }, "description": "List all game versions\n\nReturns all game versions (LIVE, PTU, EPTU) with metadata including\nversion numbers, build numbers, release dates, and last data update timestamps.\n\nRequirements:\n- 13.1: Allow players to choose between LIVE, PTU, and EPTU versions\n- 45.1: Display current selected version prominently\n- 45.3: Display version type (LIVE, PTU, EPTU) with visual distinction\n- 45.4: Display full version number including build number\n- 45.5: Display last data update timestamp for each version", "summary": "List game versions", "tags": [ "Game Data - Versions" ], "security": [], "parameters": [] } }, "/game-data/versions/active": { "get": { "operationId": "GetActiveVersions", "responses": { "200": { "description": "Active versions by type", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActiveVersionsResponse" } } } } }, "description": "Get active game versions\n\nReturns the currently active version for each version type (LIVE, PTU, EPTU).\nThis endpoint is used by the version selector to display available versions\nand by default queries to determine which version to use.\n\nRequirements:\n- 13.1: Allow players to choose between LIVE, PTU, and EPTU versions\n- 13.6: Default to LIVE version for new users\n- 45.2: Provide dropdown or modal for version selection\n- 45.5: Display last data update timestamp for each version\n- 45.7: Display version-specific data counts", "summary": "Get active versions", "tags": [ "Game Data - Versions" ], "security": [], "parameters": [] } }, "/game-data/versions/select": { "post": { "operationId": "SelectVersion", "responses": { "200": { "description": "Success response with selected version", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SelectVersionResponse" } } } } }, "description": "Set user's selected game version\n\nRecords the user's selected game version preference, which persists across\nbrowser sessions and page navigation. This selection determines which version's\ndata is displayed throughout the game data system.\n\nRequirements:\n- 13.2: Display data specific to selected version\n- 13.3: Persist selected version across browser sessions\n- 45.6: Persist selection across page navigation\n- 45.9: Support quick toggle between LIVE and PTU", "summary": "Select game version", "tags": [ "Game Data - Versions" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "description": "Version selection request", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SelectVersionRequest", "description": "Version selection request" } } } } } }, "/game-data/resources/search": { "get": { "operationId": "SearchResources", "responses": { "200": { "description": "Resource search results with pagination", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchResourcesResponse" } } } } }, "description": "Search resources with filters\n\nSupports filtering by category, subcategory, and acquisition method.\nIncludes full-text search on resource names and displays blueprint counts.\n\nRequirements:\n- 44.1: Maintain a database of all craftable resources (178+ resources)\n- 44.2: Categorize resources by type (Metals, Gases, Minerals, Components, etc.)\n- 44.3: Display resource properties (quality tiers, stack sizes, etc.)\n- 44.4: Support filtering resources by category\n- 44.5: Display which blueprints require each resource\n- 44.6: Display where resources can be obtained (mining, purchase, salvage)\n- 44.7: Support resource search by name or properties", "summary": "Search resources", "tags": [ "Game Data - Resources" ], "security": [], "parameters": [ { "description": "Full-text search on resource name", "in": "query", "name": "text", "required": false, "schema": { "type": "string" } }, { "description": "Filter by resource category", "in": "query", "name": "resource_category", "required": false, "schema": { "type": "string" } }, { "description": "Filter by resource subcategory", "in": "query", "name": "resource_subcategory", "required": false, "schema": { "type": "string" } }, { "description": "Filter by acquisition method", "in": "query", "name": "acquisition_method", "required": false, "schema": { "type": "string", "enum": [ "mined", "purchased", "salvaged", "looted" ] } }, { "description": "Game version ID (defaults to active LIVE version)", "in": "query", "name": "version_id", "required": false, "schema": { "type": "string" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "default": 1, "format": "double", "type": "number" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "default": 20, "format": "double", "type": "number" } } ] } }, "/game-data/resources/categories": { "get": { "operationId": "GetResourceCategories", "responses": { "200": { "description": "Array of categories with counts", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ResourceCategory" }, "type": "array" } } } } }, "description": "Get resource categories\n\nReturns all resource categories with item counts, supporting\nhierarchical category navigation in the resource browser.\n\nRequirements:\n- 44.2: Categorize resources by type (Metals, Gases, Minerals, Components, etc.)\n- 44.4: Support filtering resources by category", "summary": "Get categories", "tags": [ "Game Data - Resources" ], "security": [], "parameters": [ { "description": "Optional game version ID (defaults to active LIVE version)", "in": "query", "name": "version_id", "required": false, "schema": { "type": "string" } } ] } }, "/game-data/resources/{resource_id}": { "get": { "operationId": "GetResource", "responses": { "200": { "description": "Complete resource details with blueprints and locations", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResourceDetailResponse" } } } } }, "description": "Get resource detail with blueprints and locations\n\nReturns complete resource information including all blueprints that require\nthis resource, mining/purchase locations, and market price data.\n\nRequirements:\n- 44.3: Display resource properties (quality tiers, stack sizes, etc.)\n- 44.5: Display which blueprints require each resource\n- 44.6: Display where resources can be obtained (mining, purchase, salvage)\n- 44.8: Display resource market prices and availability", "summary": "Get resource details", "tags": [ "Game Data - Resources" ], "security": [], "parameters": [ { "description": "Resource UUID", "in": "path", "name": "resource_id", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/missions/search": { "get": { "operationId": "SearchMissions", "responses": { "200": { "description": "Mission search results with pagination", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchMissionsResponse" } } } } }, "description": "Search missions with comprehensive filters\n\nSupports filtering by category, career type, location, faction, legal status,\ndifficulty, sharing status, events, and blueprint rewards. Includes full-text\nsearch on mission names and community ratings.\n\nRequirements:\n- 1.1: Return all missions that can reward specified blueprint\n- 1.2: Display mission name, location, career type, organization\n- 1.3: Display reward probability for each blueprint\n- 1.4: Display total credit reward for each mission\n- 1.5: Support partial name matching for searches\n- 1.6: Return results within 200ms for typical queries\n- 41.1-41.10: Support comprehensive filtering (category, system, type, faction, etc.)", "summary": "Search missions", "tags": [ "Game Data - Missions" ], "security": [], "parameters": [ { "description": "Full-text search on mission name", "in": "query", "name": "text", "required": false, "schema": { "type": "string" } }, { "description": "Filter by mission category", "in": "query", "name": "category", "required": false, "schema": { "type": "string" } }, { "description": "Filter by career type", "in": "query", "name": "career_type", "required": false, "schema": { "type": "string" } }, { "description": "Filter by star system", "in": "query", "name": "star_system", "required": false, "schema": { "type": "string" } }, { "description": "Filter by planet or moon", "in": "query", "name": "planet_moon", "required": false, "schema": { "type": "string" } }, { "description": "Filter by faction", "in": "query", "name": "faction", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "mission_giver_org", "required": false, "schema": { "type": "string" } }, { "description": "Filter by legal status", "in": "query", "name": "legal_status", "required": false, "schema": { "type": "string", "enum": [ "LEGAL", "ILLEGAL" ] } }, { "description": "Minimum difficulty level (1-5)", "in": "query", "name": "difficulty_min", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Maximum difficulty level (1-5)", "in": "query", "name": "difficulty_max", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Filter by shareable status", "in": "query", "name": "is_shareable", "required": false, "schema": { "type": "boolean" } }, { "description": "Filter by availability type", "in": "query", "name": "availability_type", "required": false, "schema": { "type": "string" } }, { "description": "Filter by associated event", "in": "query", "name": "associated_event", "required": false, "schema": { "type": "string" } }, { "description": "Filter for chain starter missions", "in": "query", "name": "is_chain_starter", "required": false, "schema": { "type": "boolean" } }, { "description": "Filter for missions with blueprint rewards", "in": "query", "name": "has_blueprint_rewards", "required": false, "schema": { "type": "boolean" } }, { "description": "Minimum credit reward", "in": "query", "name": "credit_reward_min", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Minimum community difficulty rating", "in": "query", "name": "community_difficulty_min", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Minimum community satisfaction rating", "in": "query", "name": "community_satisfaction_min", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Filter by event code (show only missions for this event)", "in": "query", "name": "event_code", "required": false, "schema": { "type": "string" } }, { "description": "Exclude event-only missions (default: true — hides seasonal missions)", "in": "query", "name": "exclude_events", "required": false, "schema": { "type": "boolean" } }, { "description": "Game version ID (defaults to active LIVE version)", "in": "query", "name": "version_id", "required": false, "schema": { "type": "string" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "default": 1, "format": "double", "type": "number" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "default": 20, "format": "double", "type": "number" } } ] } }, "/game-data/missions/chains": { "get": { "operationId": "GetMissionChains", "responses": { "200": { "description": "Array of mission chains", "content": { "application/json": { "schema": { "items": { "properties": { "total_missions": { "type": "number", "format": "double" }, "chain_missions": { "items": { "$ref": "#/components/schemas/Mission" }, "type": "array" }, "starter_mission": { "$ref": "#/components/schemas/Mission" }, "chain_name": { "type": "string" }, "chain_id": { "type": "string" } }, "required": [ "total_missions", "chain_missions", "starter_mission", "chain_name", "chain_id" ], "type": "object" }, "type": "array" } } } } }, "description": "Get mission chains\n\nReturns all mission chains with their starter missions and progression paths.\nMission chains are series of related missions that must be completed in order.\n\nRequirements:\n- 47.1: Identify mission chains (series of related missions)\n- 47.2: Display starter missions (entry points to chains)\n- 47.3: Display unique missions (one-time only)\n- 47.4: Display mission prerequisites and unlock requirements", "summary": "Get mission chains", "tags": [ "Game Data - Missions" ], "security": [], "parameters": [ { "description": "Game version ID (defaults to active LIVE version)", "in": "query", "name": "version_id", "required": false, "schema": { "type": "string" } } ] } }, "/game-data/missions/reputation-ranks": { "get": { "operationId": "GetReputationRanks", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "display_name": { "type": "string" }, "scopes": { "items": { "type": "string" }, "type": "array" }, "ranks": { "items": { "$ref": "#/components/schemas/ReputationRank" }, "type": "array" } }, "required": [ "display_name", "scopes", "ranks" ], "type": "object" } } } } }, "description": "Get reputation rank thresholds for a scope (e.g., headhunter, salvage)", "summary": "Get reputation ranks", "tags": [ "Game Data - Missions" ], "security": [], "parameters": [ { "description": "The reputation scope code", "in": "query", "name": "scope_code", "required": false, "schema": { "type": "string" } } ] } }, "/game-data/missions/events": { "get": { "operationId": "GetGameEvents", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "events": { "items": { "$ref": "#/components/schemas/GameEvent" }, "type": "array" } }, "required": [ "events" ], "type": "object" } } } } }, "description": "List all game events/scenarios that have associated missions", "summary": "Get game events", "tags": [ "Game Data - Missions" ], "security": [], "parameters": [] } }, "/game-data/missions/{mission_id}": { "get": { "operationId": "GetMissionDetail", "responses": { "200": { "description": "Complete mission details with reward pools", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MissionDetailResponse" } } } } }, "description": "Get mission detail with blueprint rewards\n\nReturns complete mission information including all blueprint reward pools,\nprerequisite missions, and user-specific data (completion status, ratings).\n\nRequirements:\n- 2.1: Display all blueprints in reward pool\n- 2.2: Display probability of receiving each blueprint\n- 2.3: Display total number of blueprints in reward pool\n- 2.4: Display selection mechanism (e.g., \"1 of 6 blueprints\")\n- 2.5: Group blueprints by reward pool when multiple pools exist\n- 2.6: Display blueprint rarity or tier information", "summary": "Get mission details", "tags": [ "Game Data - Missions" ], "security": [], "parameters": [ { "description": "Mission UUID", "in": "path", "name": "mission_id", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/missions/by-code/{mission_code}": { "get": { "operationId": "GetMissionDetailByCode", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MissionDetailResponse" } } } } }, "description": "Get mission detail by mission_code (string identifier)", "tags": [ "Game Data - Missions" ], "security": [], "parameters": [ { "description": "The mission code string (e.g., pu_eliminatespecific_lawful_stanton4_intro)", "in": "path", "name": "mission_code", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/missions/{mission_id}/blueprints": { "get": { "operationId": "GetMissionBlueprints", "responses": { "200": { "description": "Array of blueprint details with reward information", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/BlueprintDetail" }, "type": "array" } } } } }, "description": "Get blueprints rewarded by mission\n\nReturns detailed information about all blueprints that can be rewarded\nby the specified mission, including drop probabilities and ingredient counts.", "summary": "Get mission blueprints", "tags": [ "Game Data - Missions" ], "security": [], "parameters": [ { "description": "Mission UUID", "in": "path", "name": "mission_id", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/missions/{mission_id}/complete": { "post": { "operationId": "CompleteMission", "responses": { "200": { "description": "Success response", "content": { "application/json": { "schema": { "properties": { "completion_id": { "type": "string" }, "success": { "type": "boolean" } }, "required": [ "completion_id", "success" ], "type": "object" } } } } }, "description": "Mark mission as completed\n\nRecords mission completion for the authenticated user, including which\nblueprints were rewarded. This enables completion tracking and filtering.\n\nRequirements:\n- 29.1: Allow players to mark missions as completed\n- 29.2: Record completion date for each mission\n- 29.3: Record which blueprints were rewarded from each completion\n- 29.4: Display completion status on mission search results\n- 29.5: Compute completion statistics per player\n- 29.6: Support filtering missions by completion status", "summary": "Complete mission", "tags": [ "Game Data - Missions" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Mission UUID", "in": "path", "name": "mission_id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Completion details", "required": true, "content": { "application/json": { "schema": { "properties": { "completion_notes": { "type": "string" }, "blueprints_rewarded": { "items": { "type": "string" }, "type": "array" } }, "type": "object", "description": "Completion details" } } } } } }, "/game-data/missions/{mission_id}/rate": { "post": { "operationId": "RateMission", "responses": { "200": { "description": "Success response", "content": { "application/json": { "schema": { "properties": { "rating_id": { "type": "string" }, "success": { "type": "boolean" } }, "required": [ "rating_id", "success" ], "type": "object" } } } } }, "description": "Rate mission difficulty and satisfaction\n\nRecords user's rating for a mission. Ratings are aggregated to compute\ncommunity averages displayed on mission search results. Database triggers\nautomatically update the mission's aggregate ratings.\n\nRequirements:\n- 49.1: Allow authenticated users to rate mission difficulty (1-5 stars)\n- 49.2: Allow authenticated users to rate mission satisfaction (1-5 stars)\n- 49.3: Display average community difficulty rating\n- 49.4: Display average community satisfaction rating", "summary": "Rate mission", "tags": [ "Game Data - Missions" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Mission UUID", "in": "path", "name": "mission_id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Rating details", "required": true, "content": { "application/json": { "schema": { "properties": { "rating_comment": { "type": "string" }, "satisfaction_rating": { "type": "number", "format": "double" }, "difficulty_rating": { "type": "number", "format": "double" } }, "required": [ "satisfaction_rating", "difficulty_rating" ], "type": "object", "description": "Rating details" } } } } } }, "/game-data/mining/ores": { "get": { "operationId": "SearchOres", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchOresResponse" } } } } }, "description": "Search ores with filters", "summary": "Search ores", "tags": [ "Game Data - Mining" ], "security": [], "parameters": [ { "description": "Search ore name", "in": "query", "name": "text", "required": false, "schema": { "type": "string" } }, { "description": "Filter by star system", "in": "query", "name": "system", "required": false, "schema": { "type": "string" } }, { "description": "Filter by mining method", "in": "query", "name": "mining_method", "required": false, "schema": { "type": "string", "enum": [ "ship", "ground", "fps" ] } }, { "description": "Filter by rarity", "in": "query", "name": "rarity", "required": false, "schema": { "type": "string", "enum": [ "common", "uncommon", "rare", "epic", "legendary" ] } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "default": 1, "format": "double", "type": "number" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "default": 20, "format": "double", "type": "number" } } ] } }, "/game-data/mining/ores/{name}": { "get": { "operationId": "GetOreDetail", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OreDetailResponse" } } } } }, "description": "Get ore detail by name", "summary": "Get ore details", "tags": [ "Game Data - Mining" ], "security": [], "parameters": [ { "description": "Element name (e.g. 'gold_ore')", "in": "path", "name": "name", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/mining/locations": { "get": { "operationId": "SearchLocations", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchLocationsResponse" } } } } }, "description": "Search mining locations with filters", "summary": "Search mining locations", "tags": [ "Game Data - Mining" ], "security": [], "parameters": [ { "description": "Search location name", "in": "query", "name": "text", "required": false, "schema": { "type": "string" } }, { "description": "Filter by star system", "in": "query", "name": "system", "required": false, "schema": { "type": "string" } }, { "description": "Filter by location type", "in": "query", "name": "location_type", "required": false, "schema": { "type": "string", "enum": [ "surface", "asteroidfield" ] } }, { "description": "Filter by mining method", "in": "query", "name": "mining_method", "required": false, "schema": { "type": "string", "enum": [ "ship", "ground", "fps" ] } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "default": 1, "format": "double", "type": "number" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "default": 20, "format": "double", "type": "number" } } ] } }, "/game-data/mining/locations/{name}": { "get": { "operationId": "GetLocationDetail", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationDetailResponse" } } } } }, "description": "Get mining location detail", "summary": "Get location details", "tags": [ "Game Data - Mining" ], "security": [], "parameters": [ { "description": "Location name (e.g. 'stanton1b')", "in": "path", "name": "name", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/mining/refining-methods": { "get": { "operationId": "GetRefiningMethods", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefiningMethodsResponse" } } } } }, "description": "Get all refining methods", "summary": "Get refining methods", "tags": [ "Game Data - Mining" ], "security": [], "parameters": [] } }, "/game-data/crafting/calculate-quality": { "post": { "operationId": "CalculateQuality", "responses": { "200": { "description": "Quality calculation result with breakdown and predicted stats", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalculateQualityResponse" } } } } }, "description": "Calculate output quality from ingredients\n\nComputes the expected output quality based on input material qualities\nusing the blueprint's quality calculation formula (weighted_average, minimum, or maximum).\n\nENHANCEMENT: Now includes actual stat calculations from game_item_attributes.\nShows how material quality affects final item stats (damage, HP, power output, etc.)\n\nRequirements:\n- 20.1: Support weighted_average calculation type\n- 20.2: Support minimum calculation type\n- 20.3: Support maximum calculation type\n- 20.4: Validate input materials match blueprint requirements\n- 20.5: Return quality tier and quality value\n- 20.6: Include calculation breakdown\n- 51.1-51.10: Quality calculation display requirements", "summary": "Calculate output quality with stat predictions", "tags": [ "Game Data - Crafting" ], "security": [], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalculateQualityRequest" } } } } } }, "/game-data/crafting/simulate": { "post": { "operationId": "SimulateCrafting", "responses": { "200": { "description": "Simulation results with best/worst/cost-effective options", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulateCraftingResponse" } } } } }, "description": "Simulate crafting with ingredient variations\n\nTests different combinations of ingredient qualities to show how\noutput quality varies. Useful for planning optimal material selection.\n\nRequirements:\n- 21.1: Support testing multiple quality tier combinations\n- 21.2: Return all simulation results\n- 21.3: Identify best result (highest quality)\n- 21.4: Identify worst result (lowest quality)\n- 21.5: Identify most cost-effective result\n- 21.6: Include material configuration for each result\n- 52.1-52.10: Crafting simulation requirements", "summary": "Simulate crafting variations", "tags": [ "Game Data - Crafting" ], "security": [], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulateCraftingRequest" } } } } } }, "/game-data/crafting/craft": { "post": { "operationId": "RecordCrafting", "responses": { "200": { "description": "Success response with session ID", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecordCraftingResponse" } } } } }, "description": "Record crafting session\n\nSaves a completed crafting session to the user's history for tracking\nand statistics. Requires authentication.\n\nRequirements:\n- 31.1: Record blueprint used\n- 31.2: Record input materials with qualities\n- 31.3: Record output quality achieved\n- 31.4: Record success/critical success status\n- 31.5: Record costs\n- 31.6: Associate with user account", "summary": "Record crafting session", "tags": [ "Game Data - Crafting" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecordCraftingRequest" } } } } } }, "/game-data/crafting/history": { "get": { "operationId": "GetCraftingHistory", "responses": { "200": { "description": "Paginated crafting history", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCraftingHistoryResponse" } } } } }, "description": "Get user's crafting history\n\nReturns paginated list of user's crafting sessions with optional\nfiltering by blueprint. Requires authentication.\n\nRequirements:\n- 45.1: Return crafting sessions with pagination\n- 45.2: Support filtering by blueprint\n- 45.3: Include blueprint and output item names\n- 45.4: Include input materials used\n- 45.5: Include output quality achieved\n- 45.6: Sort by date descending", "summary": "Get crafting history", "tags": [ "Game Data - Crafting" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Optional blueprint filter", "in": "query", "name": "blueprint_id", "required": false, "schema": { "type": "string" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "default": 1, "format": "double", "type": "number" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "default": 20, "format": "double", "type": "number" } } ] } }, "/game-data/crafting/craftable-items": { "get": { "operationId": "GetCraftableItems", "responses": { "200": { "description": "Craftable items with material availability", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCraftableItemsResponse" } } } } }, "description": "Get craftable items based on owned blueprints and stock\n\nReturns items that can be crafted based on user's owned blueprints\nand available materials in their stock lots. Shows material availability\nand maximum craftable quantities.\n\nRequirements:\n- 10.1-10.6: Blueprint Inventory Tracking\n- 11.1-11.6: Organization Blueprint Tracking\n- 21.1-21.6: Material Inventory Integration\n- 22.1-22.6: Crafting Cost Estimation", "summary": "Get craftable items from stock", "tags": [ "Game Data - Crafting" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Filter by item category", "in": "query", "name": "item_category", "required": false, "schema": { "type": "string" } }, { "description": "Filter by rarity", "in": "query", "name": "rarity", "required": false, "schema": { "type": "string" } }, { "description": "Filter by tier (1-5)", "in": "query", "name": "tier", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Show only items that can be crafted with current stock", "in": "query", "name": "craftable_only", "required": false, "schema": { "type": "boolean" } }, { "description": "Game version ID (defaults to active LIVE version)", "in": "query", "name": "version_id", "required": false, "schema": { "type": "string" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "default": 1, "format": "double", "type": "number" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "default": 20, "format": "double", "type": "number" } } ] } }, "/game-data/crafting/statistics": { "get": { "operationId": "GetCraftingStatistics", "responses": { "200": { "description": "Crafting statistics", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCraftingStatisticsResponse" } } } } }, "description": "Get user's crafting statistics\n\nReturns aggregate statistics about user's crafting activity including\nsuccess rates, average quality, and per-blueprint statistics.\n\nRequirements:\n- 45.7: Calculate total sessions\n- 45.8: Calculate average output quality\n- 45.9: Calculate success rates\n- 45.10: Provide per-blueprint statistics", "summary": "Get crafting statistics", "tags": [ "Game Data - Crafting" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/game-data/blueprints/search": { "get": { "operationId": "SearchBlueprints", "responses": { "200": { "description": "Blueprint search results with pagination", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchBlueprintsResponse" } } } } }, "description": "Search blueprints with filters\n\nSupports filtering by category, rarity, tier, crafting station, and ownership.\nIncludes full-text search on blueprint names and displays ingredient/mission counts.\n\nRequirements:\n- 19.1: Categorize blueprints by item type\n- 19.2: Support hierarchical categories with subcategories\n- 19.3: Display category navigation in blueprint browser\n- 19.4: Support filtering by category in searches\n- 19.5: Display item count per category\n- 19.6: Support custom category views per user\n- 43.1-43.10: Display blueprints as cards with comprehensive information", "summary": "Search blueprints", "tags": [ "Game Data - Blueprints" ], "security": [], "parameters": [ { "description": "Full-text search on blueprint name", "in": "query", "name": "text", "required": false, "schema": { "type": "string" } }, { "description": "Filter by item category", "in": "query", "name": "item_category", "required": false, "schema": { "type": "string" } }, { "description": "Filter by item subcategory", "in": "query", "name": "item_subcategory", "required": false, "schema": { "type": "string" } }, { "description": "Filter by rarity", "in": "query", "name": "rarity", "required": false, "schema": { "type": "string" } }, { "description": "Filter by tier (1-5)", "in": "query", "name": "tier", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Filter by crafting station type", "in": "query", "name": "crafting_station_type", "required": false, "schema": { "type": "string" } }, { "description": "Filter by output game item ID", "in": "query", "name": "output_game_item_id", "required": false, "schema": { "type": "string" } }, { "description": "Filter to show only user-owned blueprints", "in": "query", "name": "user_owned_only", "required": false, "schema": { "type": "boolean" } }, { "description": "Filter by blueprint source (default, mission_reward)", "in": "query", "name": "source", "required": false, "schema": { "type": "string" } }, { "description": "Filter by manufacturer name", "in": "query", "name": "manufacturer", "required": false, "schema": { "type": "string" } }, { "description": "Filter by ingredient material name", "in": "query", "name": "ingredient_name", "required": false, "schema": { "type": "string" } }, { "description": "Game version ID (defaults to active LIVE version)", "in": "query", "name": "version_id", "required": false, "schema": { "type": "string" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "default": 1, "format": "double", "type": "number" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "default": 20, "format": "double", "type": "number" } } ] } }, "/game-data/blueprints/categories": { "get": { "operationId": "GetBlueprintCategories", "responses": { "200": { "description": "Array of categories with counts", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/BlueprintCategory" }, "type": "array" } } } } }, "description": "Get blueprint categories\n\nReturns all blueprint categories with item counts, supporting\nhierarchical category navigation in the blueprint browser.\n\nRequirements:\n- 19.1: Categorize blueprints by item type\n- 19.2: Support hierarchical categories with subcategories\n- 19.5: Display item count per category", "summary": "Get categories", "tags": [ "Game Data - Blueprints" ], "security": [], "parameters": [ { "description": "Optional game version ID (defaults to active LIVE version)", "in": "query", "name": "version_id", "required": false, "schema": { "type": "string" } } ] } }, "/game-data/blueprints/inventory": { "get": { "operationId": "GetUserBlueprintInventory", "responses": { "200": { "description": "User's blueprint inventory with statistics", "content": { "application/json": { "schema": { "properties": { "page_size": { "type": "number", "format": "double" }, "page": { "type": "number", "format": "double" }, "total": { "type": "number", "format": "double" }, "statistics": { "properties": { "recently_acquired_count": { "type": "number", "format": "double" }, "completion_percentage": { "type": "number", "format": "double" }, "total_available": { "type": "number", "format": "double" }, "total_owned": { "type": "number", "format": "double" } }, "required": [ "recently_acquired_count", "completion_percentage", "total_available", "total_owned" ], "type": "object" }, "blueprints": { "items": { "properties": { "acquisition_notes": { "type": "string" }, "acquisition_location": { "type": "string" }, "acquisition_method": { "type": "string" }, "acquisition_date": { "type": "string" }, "tier": { "type": "number", "format": "double" }, "rarity": { "type": "string" }, "item_category": { "type": "string" }, "output_item_icon": { "type": "string" }, "output_item_name": { "type": "string" }, "blueprint_name": { "type": "string" }, "blueprint_id": { "type": "string" } }, "required": [ "acquisition_date", "output_item_name", "blueprint_name", "blueprint_id" ], "type": "object" }, "type": "array" } }, "required": [ "page_size", "page", "total", "statistics", "blueprints" ], "type": "object" } } } } }, "description": "Get user's blueprint inventory\n\nReturns all blueprints owned by the authenticated user with acquisition details.\nSupports filtering by category, rarity, and version. Displays acquisition progress\nand statistics.\n\nRequirements:\n- 30.1: Record which blueprints each player owns\n- 30.2: Display owned blueprint count vs. total available\n- 30.3: Display acquisition date for each blueprint\n- 30.4: Support filtering blueprints by owned status\n- 30.5: Display acquisition progress\n- 30.6: Support bulk import of owned blueprints\n- 44.3: Allow players to mark blueprints as owned/not owned\n- 44.4: Display owned blueprint count vs. total available\n- 44.5: Support filtering blueprints by owned status\n- 44.6: Display acquisition progress\n- 44.7: Sync blueprint inventory across devices\n- 44.8: Support bulk import of blueprint lists\n- 44.9: Display recently acquired blueprints\n- 44.10: Support blueprint collection goals and achievements", "summary": "Get user inventory", "tags": [ "Game Data - Blueprints" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Filter by item category", "in": "query", "name": "item_category", "required": false, "schema": { "type": "string" } }, { "description": "Filter by rarity", "in": "query", "name": "rarity", "required": false, "schema": { "type": "string" } }, { "description": "Game version ID (defaults to active LIVE version)", "in": "query", "name": "version_id", "required": false, "schema": { "type": "string" } }, { "description": "Sort field (acquisition_date, blueprint_name)", "in": "query", "name": "sort_by", "required": false, "schema": { "default": "acquisition_date", "type": "string", "enum": [ "acquisition_date", "blueprint_name" ] } }, { "description": "Sort order (asc, desc)", "in": "query", "name": "sort_order", "required": false, "schema": { "default": "desc", "type": "string", "enum": [ "asc", "desc" ] } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "required": false, "schema": { "default": 1, "format": "double", "type": "number" } }, { "description": "Results per page (default: 50, max: 100)", "in": "query", "name": "page_size", "required": false, "schema": { "default": 50, "format": "double", "type": "number" } } ] } }, "/game-data/blueprints/{blueprint_id}": { "get": { "operationId": "GetBlueprintDetail", "responses": { "200": { "description": "Complete blueprint details with ingredients and missions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BlueprintDetailResponse" } } } } }, "description": "Get blueprint detail with ingredients and missions\n\nReturns complete blueprint information including all required ingredients\nwith market prices, missions that reward this blueprint, and crafting recipe details.\n\nRequirements:\n- 50.1: List all required ingredients with names\n- 50.2: Display required quantity for each ingredient\n- 50.3: Display ingredient quality requirements if applicable\n- 50.4: Highlight ingredients the player doesn't have\n- 50.5: Display ingredient icons or images\n- 50.6: Support clicking ingredients to view details\n- 50.7: Display total ingredient count\n- 50.8: Group ingredients by category\n- 50.9: Display alternative ingredients if substitutions are allowed\n- 50.10: Calculate total material cost based on market prices", "summary": "Get blueprint details", "tags": [ "Game Data - Blueprints" ], "security": [], "parameters": [ { "description": "Blueprint UUID", "in": "path", "name": "blueprint_id", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/blueprints/by-code/{blueprint_code}": { "get": { "operationId": "GetBlueprintDetailByCode", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BlueprintDetailResponse" } } } } }, "description": "Get missions that reward this blueprint\n\nReturns all missions that can reward the specified blueprint,\n/**\nGet blueprint detail by blueprint_code (string identifier)", "summary": "Get blueprint by code", "tags": [ "Game Data - Blueprints" ], "security": [], "parameters": [ { "description": "The blueprint code string", "in": "path", "name": "blueprint_code", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/blueprints/{blueprint_id}/missions": { "get": { "operationId": "GetBlueprintMissions", "responses": { "200": { "description": "Array of missions that reward this blueprint", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/MissionRewardingBlueprint" }, "type": "array" } } } } }, "description": "Get missions that reward a specific blueprint\n\nincluding drop probabilities and mission locations.", "summary": "Get blueprint missions", "tags": [ "Game Data - Blueprints" ], "security": [], "parameters": [ { "description": "Blueprint UUID", "in": "path", "name": "blueprint_id", "required": true, "schema": { "type": "string" } }, { "description": "Optional game version ID", "in": "query", "name": "version_id", "required": false, "schema": { "type": "string" } } ] } }, "/game-data/blueprints/{blueprint_id}/inventory": { "post": { "operationId": "AddBlueprintToInventory", "responses": { "200": { "description": "Success response with inventory ID", "content": { "application/json": { "schema": { "properties": { "inventory_id": { "type": "string" }, "success": { "type": "boolean" } }, "required": [ "inventory_id", "success" ], "type": "object" } } } } }, "description": "Add blueprint to user inventory\n\nMarks a blueprint as owned by the authenticated user. Records acquisition\ndetails including date, method, location, and notes for tracking purposes.\n\nRequirements:\n- 30.1: Allow players to mark blueprints as owned/not owned\n- 30.2: Display owned blueprint count vs. total available\n- 30.3: Support filtering blueprints by owned status\n- 30.4: Display acquisition progress\n- 44.1: Support Discord OAuth integration for authentication\n- 44.2: Associate blueprint inventory with Discord user account", "summary": "Add blueprint to inventory", "tags": [ "Game Data - Blueprints" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Blueprint UUID", "in": "path", "name": "blueprint_id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Acquisition details", "required": true, "content": { "application/json": { "schema": { "properties": { "acquisition_notes": { "type": "string" }, "acquisition_location": { "type": "string" }, "acquisition_method": { "type": "string" } }, "type": "object", "description": "Acquisition details" } } } } }, "delete": { "operationId": "RemoveBlueprintFromInventory", "responses": { "200": { "description": "Success response", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" } }, "required": [ "success" ], "type": "object" } } } } }, "description": "Remove blueprint from user inventory\n\nMarks a blueprint as not owned by the authenticated user. This allows users\nto maintain accurate inventory tracking when they lose access to blueprints.\n\nRequirements:\n- 30.1: Allow players to mark blueprints as owned/not owned\n- 30.3: Support filtering blueprints by owned status\n- 44.2: Associate blueprint inventory with Discord user account", "summary": "Remove blueprint from inventory", "tags": [ "Game Data - Blueprints" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Blueprint UUID", "in": "path", "name": "blueprint_id", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/blueprints/{blueprint_id}/org-owners/{spectrum_id}": { "get": { "operationId": "GetOrgBlueprintOwners", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "members": { "items": { "properties": { "acquisition_date": { "type": "string" }, "avatar": { "type": "string" }, "display_name": { "type": "string" }, "username": { "type": "string" }, "user_id": { "type": "string" } }, "required": [ "display_name", "username", "user_id" ], "type": "object" }, "type": "array" } }, "required": [ "members" ], "type": "object" } } } } }, "description": "Get org members who own a specific blueprint", "tags": [ "Game Data - Blueprints" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Blueprint UUID", "in": "path", "name": "blueprint_id", "required": true, "schema": { "type": "string" } }, { "description": "Org spectrum ID", "in": "path", "name": "spectrum_id", "required": true, "schema": { "type": "string" } } ] } }, "/game-data/blueprints/craftable": { "post": { "operationId": "FindCraftableBlueprints", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/CraftableBlueprintResult" }, "type": "array" } } } } }, "description": "Find blueprints craftable with given materials.\nReturns blueprints where all ingredients are satisfied, with max craftable count.", "summary": "Find craftable blueprints", "tags": [ "Game Data - Blueprints" ], "security": [], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "owned_only": { "type": "boolean" }, "materials": { "items": { "properties": { "quality_value": { "type": "number", "format": "double" }, "quantity_scu": { "type": "number", "format": "double" }, "game_item_id": { "type": "string" } }, "required": [ "quantity_scu", "game_item_id" ], "type": "object" }, "type": "array" } }, "required": [ "materials" ], "type": "object" } } } } } }, "/debug/feature-flag": { "get": { "operationId": "GetFeatureFlag", "responses": { "200": { "description": "Current feature flag setting", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetFeatureFlagResponse" } } } } }, "description": "Get current feature flag setting\n\nReturns the current market version (V1 or V2) for the authenticated user.\nAlso indicates whether the client should show debug / feature-flag tooling\n(admin users, or any user when NODE_ENV is development).\n\nRestricted to authenticated users only.", "summary": "Get feature flag", "tags": [ "Debug V2" ], "security": [], "parameters": [] }, "post": { "operationId": "SetFeatureFlag", "responses": { "200": { "description": "Updated feature flag setting", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetFeatureFlagResponse" } } } } }, "description": "Set feature flag\n\nSets the market version (V1 or V2) for the authenticated user.\nThis allows developers to switch between V1 and V2 experiences.\n\nRestricted to users with developer privileges (admin role) only.", "summary": "Set feature flag", "tags": [ "Debug V2" ], "security": [ { "loggedin": [] }, { "loggedin": [] } ], "parameters": [], "requestBody": { "description": "Feature flag setting request", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetFeatureFlagRequest", "description": "Feature flag setting request" } } } } } }, "/dashboard/layout": { "get": { "operationId": "GetLayout", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/DashboardLayoutResponse" } ], "nullable": true } } } } }, "description": "Get the saved dashboard layout for an owner. `owner_type`/`owner_id` default\nto the authenticated user's personal dashboard. Returns null config when no\nlayout has been saved yet.", "tags": [ "Dashboard V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "query", "name": "owner_type", "required": false, "schema": { "$ref": "#/components/schemas/DashboardOwnerType" } }, { "in": "query", "name": "owner_id", "required": false, "schema": { "type": "string" } } ] }, "put": { "operationId": "SaveLayout", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DashboardLayoutResponse" } } } } }, "description": "Create or replace the dashboard layout for an owner. Requires edit access:\npersonal dashboards by their owner, org dashboards by members with\nmanage_org_details, shop dashboards by users who can manage the shop.", "tags": [ "Dashboard V2" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateDashboardLayoutRequest" } } } } } }, "/cart": { "get": { "operationId": "GetCart", "responses": { "200": { "description": "Cart contents with variant details and availability", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCartResponse" } } } } }, "description": "Get user's cart with variant-specific items\n\nRetrieves all cart items for the authenticated user with:\n1. Variant details (quality tier, attributes, display name)\n2. Listing information (title, seller, status)\n3. Real-time availability check for each variant\n4. Price change detection (compare snapshot vs current price)\n5. Calculated subtotals and cart total\n\nAvailability is checked by querying listed stock lots for each variant.\nPrice changes are detected by comparing cart's price_per_unit with current\nvariant pricing from the listing.\n\nRequirements:\n- 29.1: GET /api/v2/cart endpoint\n- 29.2: Return array of cart items with variant details\n- 29.3: Include listing information for each cart item\n- 29.4: Include variant attributes (quality_tier, display_name)\n- 29.5: Include quantity and price_per_unit snapshot\n- 29.6: Calculate subtotal for each item\n- 29.7: Calculate total_price for entire cart\n- 29.8: Include availability indicator for each item\n- 29.9: Include price_changed indicator for each item\n- 29.10: Return current_price if price has changed\n- 29.11: Return item_count (total number of items)\n- 29.12: Filter cart items by authenticated user", "summary": "Get cart", "tags": [ "Cart V2" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/cart/add": { "post": { "operationId": "AddToCart", "responses": { "200": { "description": "Cart item ID and success message", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddToCartResponse" } } } } }, "description": "Add item to cart with variant selection\n\nAdds a variant-specific item to the user's cart by:\n1. Validating listing exists and is active\n2. Validating variant exists and belongs to listing\n3. Checking variant availability (sufficient stock)\n4. Snapshotting current variant price\n5. Creating or updating cart item (upsert on user_id + listing_id + variant_id)\n\nIf the same variant already exists in cart, the quantities are added together.\nPrice is updated to current price on each add operation.\n\nRequirements:\n- 30.1: POST /api/v2/cart/add endpoint\n- 30.2: Accept listing_id, variant_id, and quantity\n- 30.3: Validate listing exists and is active\n- 30.4: Validate variant exists and belongs to listing\n- 30.5: Check variant availability before adding\n- 30.6: Snapshot variant price at add-to-cart time\n- 30.7: Create cart_items_v2 entry with variant_id\n- 30.8: Support upsert (update if already in cart)\n- 30.9: Validate quantity is positive integer\n- 30.10: Return cart_item_id on success\n- 30.11: Prevent adding unavailable variants with descriptive error\n- 30.12: Log cart additions to audit trail", "summary": "Add item to cart", "tags": [ "Cart V2" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "description": "Add to cart request with listing, variant, and quantity", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddToCartRequest", "description": "Add to cart request with listing, variant, and quantity" } } } } } }, "/cart/{id}": { "put": { "operationId": "UpdateCartItem", "responses": { "200": { "description": "Success message", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } } } } }, "description": "Update cart item quantity\n\nUpdates a cart item's quantity or variant selection by:\n1. Validating cart item exists and belongs to user\n2. If quantity updated: validating new quantity against availability\n3. If variant changed: validating new variant and checking availability\n4. Updating price_per_unit to current price\n5. Updating cart item record\n\nQuantity must be positive. To remove an item, use DELETE endpoint instead.\nChanging variant will update the price to the new variant's current price.\n\nRequirements:\n- 31.1: PUT /api/v2/cart/:id endpoint\n- 31.2: Accept quantity and variant_id updates\n- 31.3: Validate cart item exists and belongs to user\n- 31.4: Validate new quantity against variant availability\n- 31.5: Validate new variant_id if provided\n- 31.6: Update price_per_unit to current price\n- 31.7: Prevent quantity from being set to 0 (use DELETE instead)\n- 31.8: Use database transaction for atomicity\n- 31.9: Return 404 if cart item not found\n- 31.10: Return 403 if cart item belongs to different user\n- 31.11: Log cart modifications to audit trail\n- 31.12: Invalidate cart cache after update", "summary": "Update cart item", "tags": [ "Cart V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Cart item UUID", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Update request with optional quantity and variant_id", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCartItemRequest", "description": "Update request with optional quantity and variant_id" } } } } }, "delete": { "operationId": "RemoveCartItem", "responses": { "200": { "description": "Success message", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } } } } }, "description": "Remove item from cart\n\nDeletes a cart item by:\n1. Validating cart item exists and belongs to user\n2. Deleting cart item record\n\nRequirements:\n- 33.1: DELETE /api/v2/cart/:id endpoint\n- 33.2: Validate cart item exists and belongs to user\n- 33.3: Delete cart_items_v2 entry\n- 33.4: Return 404 if cart item not found\n- 33.5: Return 403 if cart item belongs to different user\n- 33.6: Log cart deletions to audit trail\n- 33.7: Invalidate cart cache after deletion", "summary": "Remove cart item", "tags": [ "Cart V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Cart item UUID", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/cart/checkout": { "post": { "operationId": "CheckoutCart", "responses": { "200": { "description": "Offer session details (session_id, offer_id, discord_invite)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CheckoutCartResponse" } } } } }, "description": "Checkout cart — creates an offer session (mirrors V1 purchase_listings flow)\n\n1. Validates all cart items are still available\n2. Detects price changes and requires confirmation if needed\n3. Checks blocked users, availability requirements, order limits\n4. Creates an offer session via V1 createOffer (chat, Discord, notifications)\n5. Clears cart after successful offer creation", "summary": "Checkout cart", "tags": [ "Cart V2" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "description": "Checkout request with optional price change confirmation and note", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CheckoutCartRequest", "description": "Checkout request with optional price change confirmation and note" } } } } } }, "/buy-orders": { "post": { "operationId": "CreatePurchase", "responses": { "200": { "description": "Created order with order_id and purchase details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBuyOrderResponse" } } } } }, "description": "Create a direct purchase order from listing\n\nCreates an order directly from a listing with variant selection, bypassing the cart.\nThis implements \"Buy Now\" functionality for immediate purchases.\n\nProcess:\n1. Validates listing exists and is active\n2. Validates variant exists and belongs to listing\n3. Checks variant availability (sufficient stock)\n4. Snapshots variant price at purchase time\n5. Creates order record in V1 orders table\n6. Creates market_orders entry (V1 compatibility)\n7. Creates order_market_items_v2 entry with variant tracking\n8. Allocates stock from variant-specific lots\n9. Returns order details with purchase summary\n\nUses database transaction for atomicity to ensure all-or-nothing behavior.\nStock allocation uses listing_item_lots directly (V2).\n\nRequirements:\n- Validate listing exists and is active\n- Validate variant exists and belongs to listing\n- Check variant availability before order creation\n- Create order with variant-specific line item\n- Allocate stock for the variant\n- Use database transaction for atomicity\n- Snapshot variant price at time of purchase\n- Return order_id and purchase summary\n- Prevent ordering unavailable variants with descriptive error\n- Follow same patterns as cart checkout", "summary": "Create direct purchase order", "tags": [ "Buy Orders V2" ], "security": [ { "verified": [] } ], "parameters": [], "requestBody": { "description": "Purchase request with listing, variant, and quantity", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBuyOrderRequest", "description": "Purchase request with listing, variant, and quantity" } } } } } }, "/buy-orders/standing": { "post": { "operationId": "CreateStandingBuyOrder", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandingBuyOrder" } } } } }, "description": "Create a standing buy order", "tags": [ "Buy Orders V2" ], "security": [ { "verified": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTargetedBuyOrderRequest" } } } } } }, "/buy-orders/search": { "get": { "operationId": "SearchBuyOrders", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchBuyOrdersResponse" } } } } }, "description": "Search active standing buy orders", "tags": [ "Buy Orders V2" ], "security": [], "parameters": [ { "in": "query", "name": "text", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "game_item_id", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "quality_tier_min", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "quality_tier_max", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "quality_value_min", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "quality_value_max", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Sort by: created_at, price_per_unit, quality_tier_min, quality_value_min", "in": "query", "name": "sort_by", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "sort_order", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] } }, { "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } } ] } }, "/buy-orders/matches-for-seller": { "get": { "operationId": "GetMatchesForSeller", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchBuyOrdersResponse" } } } } }, "description": "Get active buy orders matching the seller's current inventory.\nJoins against listing_items to find orders the seller can fulfill right now.", "tags": [ "Buy Orders V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } } ] } }, "/buy-orders/mine": { "get": { "operationId": "GetMyBuyOrders", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchBuyOrdersResponse" } } } } }, "description": "Get current user's buy orders", "tags": [ "Buy Orders V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "query", "name": "status", "required": false, "schema": { "type": "string", "enum": [ "active", "fulfilled", "cancelled", "expired" ] } }, { "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "page_size", "required": false, "schema": { "format": "double", "type": "number" } } ] } }, "/buy-orders/{id}": { "get": { "operationId": "GetBuyOrderDetail", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandingBuyOrder" } } } } }, "description": "Get a single buy order by ID with full details", "tags": [ "Buy Orders V2" ], "security": [], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] }, "put": { "operationId": "UpdateBuyOrder", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandingBuyOrder" } } } } }, "description": "Update a standing buy order", "tags": [ "Buy Orders V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStandingBuyOrderRequest" } } } } }, "delete": { "operationId": "CancelBuyOrder", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } } } } }, "description": "Cancel a standing buy order", "tags": [ "Buy Orders V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/buy-orders/{id}/fulfill": { "post": { "operationId": "FulfillBuyOrder", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBuyOrderResponse" } } } } }, "description": "Fulfill a standing buy order (supports partial fulfillment)", "summary": "Seller fulfills a buy order", "tags": [ "Buy Orders V2" ], "security": [ { "verified": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FulfillBuyOrderRequest" } } } } } }, "/buy-orders/decline": { "post": { "operationId": "DeclineBuyOrder", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandingBuyOrder" } } } } }, "description": "Decline a standing buy order that was targeted directly at you.\nSets declined_at + declined_by and flips the order back to 'public' visibility\nso the buyer can retarget it or leave it open.", "tags": [ "Buy Orders V2" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeclineBuyOrderRequest" } } } } } }, "/availability/next": { "get": { "operationId": "GetNextAvailable", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SellerNextAvailableResponse" } } } } }, "description": "Get a seller's next available time", "tags": [ "Availability" ], "security": [ { "loggedin": [] } ], "parameters": [ { "description": "Username (for user sellers)", "in": "query", "name": "username", "required": false, "schema": { "type": "string" } }, { "description": "Spectrum ID (for contractor sellers)", "in": "query", "name": "spectrum_id", "required": false, "schema": { "type": "string" } } ] } }, "/auctions/{listingId}": { "get": { "operationId": "GetAuctionDetail", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuctionDetailResponse" } } } } }, "description": "Get auction details and bids for a listing", "tags": [ "Auctions V2" ], "security": [], "parameters": [ { "in": "path", "name": "listingId", "required": true, "schema": { "type": "string" } } ] } }, "/auctions/{listingId}/bids": { "post": { "operationId": "PlaceBid", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlaceBidResponse" } } } } }, "description": "Place a bid on an auction listing", "tags": [ "Auctions V2" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "listingId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlaceBidRequest" } } } } } }, "/analytics/price-history": { "get": { "operationId": "GetPriceHistory", "responses": { "200": { "description": "Price history time-series data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetPriceHistoryResponse" } } } } }, "description": "Get price history for a game item with optional quality tier filtering\n\nTracks prices per variant over time and aggregates by quality tier.\nReturns time-series data with timestamps, average/min/max prices, and volume.\nSupports filtering by game_item_id and quality_tier.\n\nRequirements:\n- 46.1: GET /api/v2/analytics/price-history endpoint\n- 46.2: Track prices per variant over time\n- 46.3: Aggregate by quality tier\n- 46.4: Support filtering by game_item_id and quality_tier\n- 46.5: Return time-series data with timestamps, avg_price, min_price, max_price, volume", "summary": "Get price history", "tags": [ "Analytics V2" ], "security": [], "parameters": [ { "description": "Game item UUID (required)", "in": "query", "name": "game_item_id", "required": true, "schema": { "type": "string" } }, { "description": "Optional quality tier filter (1-5)", "in": "query", "name": "quality_tier", "required": false, "schema": { "format": "double", "type": "number" } }, { "description": "Optional start date (ISO 8601 format, defaults to 30 days ago)", "in": "query", "name": "start_date", "required": false, "schema": { "type": "string" } }, { "description": "Optional end date (ISO 8601 format, defaults to now)", "in": "query", "name": "end_date", "required": false, "schema": { "type": "string" } }, { "description": "Time interval for aggregation (default: 'day')", "in": "query", "name": "interval", "required": false, "schema": { "type": "string", "enum": [ "hour", "day", "week", "month" ] } } ] } }, "/analytics/quality-distribution": { "get": { "operationId": "GetQualityDistribution", "responses": { "200": { "description": "Quality tier distribution histogram data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetQualityDistributionResponse" } } } } }, "description": "Get quality tier distribution for a game item\n\nShows distribution of available quality tiers with tier counts, quantities,\nprices, and seller counts. Supports filtering by game_item_id and optional\ndate range for tracking quality tier trends over time.\n\nRequirements:\n- 47.1: GET /api/v2/analytics/quality-distribution endpoint\n- 47.2: Show distribution of available quality tiers\n- 47.3: Track quality tier trends over time\n- 47.4: Support filtering by game_item_id\n- 47.5: Return histogram data with tier counts, quantities, prices, seller counts", "summary": "Get quality tier distribution", "tags": [ "Analytics V2" ], "security": [], "parameters": [ { "description": "Game item UUID (required)", "in": "query", "name": "game_item_id", "required": true, "schema": { "type": "string" } }, { "description": "Optional start date (ISO 8601 format)", "in": "query", "name": "start_date", "required": false, "schema": { "type": "string" } }, { "description": "Optional end date (ISO 8601 format)", "in": "query", "name": "end_date", "required": false, "schema": { "type": "string" } } ] } }, "/analytics/seller-stats": { "get": { "operationId": "GetSellerStats", "responses": { "200": { "description": "Shop analytics with sales and inventory breakdown", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetSellerStatsResponse" } } } } }, "description": "Get seller analytics with sales and inventory breakdown by quality tier\n\nProvides comprehensive seller analytics including:\n- Sales volume by quality tier (from completed orders)\n- Average sale price by quality tier\n- Time-to-sale metrics by quality tier\n- Current inventory distribution by quality tier\n- Price premium percentages for higher quality tiers\n\nRequirements:\n- 48.1: GET /api/v2/analytics/seller-stats endpoint\n- 48.2: Display sales volume by quality tier\n- 48.3: Display average sale price by quality tier\n- 48.4: Display time-to-sale by quality tier\n- 48.5: Display quality tier distribution of current inventory\n- 48.6: Calculate price premium percentage for higher quality tiers", "summary": "Get shop analytics", "tags": [ "Analytics V2" ], "security": [], "parameters": [ { "description": "Shop ID to get stats for", "in": "query", "name": "shop_id", "required": false, "schema": { "type": "string" } } ] } }, "/analytics/listing-stats": { "get": { "operationId": "GetListingStats", "responses": { "200": { "description": "Per-listing view/conversion metrics with shop-level totals", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetListingStatsResponse" } } } } }, "description": "Get per-listing view → conversion analytics for a shop.\n\nCombines view tracking (listing_views_v2), cart adds (cart_items_v2), and\norder linkage (order_market_items_v2 → orders) to produce a funnel per\nlisting: views → unique viewers → cart adds → orders → sales, plus a\nconversion rate (sales ÷ views). Listings are ranked by views descending.\n\nViews are counted from when frontend view tracking began; anonymous views\nare included in `views` but not `unique_viewers`. \"Sales\" are orders with\nstatus 'fulfilled'.", "summary": "Get listing view/conversion analytics", "tags": [ "Analytics V2" ], "security": [], "parameters": [ { "description": "Shop ID to get per-listing stats for", "in": "query", "name": "shop_id", "required": false, "schema": { "type": "string" } }, { "description": "Maximum number of listings to return (default 20, max 100)", "in": "query", "name": "limit", "required": false, "schema": { "format": "double", "type": "number" } } ] } }, "/admin/feature-flags/config": { "get": { "operationId": "GetConfig", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeatureFlagConfig" } } } } }, "description": "Get global feature flag configuration", "summary": "Get config", "tags": [ "Admin Feature Flags" ], "security": [ { "loggedin": [] } ], "parameters": [] }, "put": { "operationId": "UpdateConfig", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeatureFlagConfig" } } } } }, "description": "Update global feature flag configuration", "summary": "Update config", "tags": [ "Admin Feature Flags" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateConfigRequest" } } } } } }, "/admin/feature-flags/stats": { "get": { "operationId": "GetStats", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/FeatureFlagStats" }, "type": "array" } } } } }, "description": "Get feature flag stats (override counts, config summary)", "summary": "Get stats", "tags": [ "Admin Feature Flags" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/admin/feature-flags/overrides": { "get": { "operationId": "GetUserOverrides", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserOverridesResponse" } } } } }, "description": "List per-user overrides with pagination", "summary": "List user overrides", "tags": [ "Admin Feature Flags" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "query", "name": "page", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "pageSize", "required": false, "schema": { "format": "double", "type": "number" } }, { "in": "query", "name": "search", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "flag_name", "required": false, "schema": { "type": "string" } } ] }, "post": { "operationId": "SetUserOverride", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } } } } }, "description": "Set a per-user version override", "summary": "Set user override", "tags": [ "Admin Feature Flags" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetUserOverrideRequest" } } } } } }, "/admin/feature-flags/overrides/{username}": { "delete": { "operationId": "RemoveUserOverride", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } } } } }, "description": "Remove a per-user version override (user falls back to global config)", "summary": "Remove user override", "tags": [ "Admin Feature Flags" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "username", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "flag_name", "required": false, "schema": { "type": "string" } } ] } }, "/admin/import-game-data": { "post": { "operationId": "ImportGameData", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "anyOf": [ { "properties": { "job_id": { "type": "string" } }, "required": [ "job_id" ], "type": "object" }, { "$ref": "#/components/schemas/ImportErrorResponse" } ] } } } } }, "description": "Upload game data ZIP and start async import job", "summary": "Start game data import", "tags": [ "Admin" ], "security": [ { "loggedin": [] } ], "parameters": [] }, "get": { "operationId": "ListGameDataImportJobs", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "jobs": { "items": { "$ref": "#/components/schemas/GameDataImportJob" }, "type": "array" } }, "required": [ "jobs" ], "type": "object" } } } } }, "description": "List all game data import jobs (most recent first)", "summary": "List import jobs", "tags": [ "Admin" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/admin/import-game-data/{jobId}": { "get": { "operationId": "GetImportJobStatus", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "job": { "allOf": [ { "$ref": "#/components/schemas/GameDataImportJob" } ], "nullable": true } }, "required": [ "job" ], "type": "object" } } } } }, "description": "Get game data import job status", "summary": "Poll import job", "tags": [ "Admin" ], "security": [ { "loggedin": [] } ], "parameters": [ { "in": "path", "name": "jobId", "required": true, "schema": { "type": "string" } } ] } }, "/admin/expire-all-listings": { "post": { "operationId": "ExpireAllListings", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "affected": { "type": "number", "format": "double" } }, "required": [ "affected" ], "type": "object" } } } } }, "description": "Expire all active listings (used after game wipes).\nSets all active listings to 'expired' status, requiring sellers to manually refresh.", "summary": "Expire all active listings", "tags": [ "Admin" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/admin/active-listing-count": { "get": { "operationId": "GetActiveListingCount", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "count": { "type": "number", "format": "double" } }, "required": [ "count" ], "type": "object" } } } } }, "description": "Get count of active listings (for confirmation dialog).", "summary": "Get active listing count", "tags": [ "Admin" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/accounts/delete": { "post": { "operationId": "RequestDeletion", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestDeletionResponse" } } } } }, "tags": [ "Accounts V2" ], "security": [ { "loggedin": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestDeletionBody" } } } } } }, "/accounts/cancel-deletion": { "post": { "operationId": "CancelDeletion", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } } } } }, "tags": [ "Accounts V2" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/accounts/deletion-status": { "get": { "operationId": "GetDeletionStatus", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeletionStatusResponse" } } } } }, "tags": [ "Accounts V2" ], "security": [ { "loggedin": [] } ], "parameters": [] } }, "/accounts/deletion-precheck": { "get": { "operationId": "PreDeletionCheck", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeletionPreCheckResponse" } } } } }, "tags": [ "Accounts V2" ], "security": [ { "loggedin": [] } ], "parameters": [] } } }, "servers": [ { "url": "/api/v2" } ] }