{"openapi":"3.1.0","info":{"title":"BuyWhere Catalog API","description":"Agent-native product catalog API for AI agent commerce. Query millions of products across Southeast Asia.","version":"1.0.0"},"paths":{"/v1/products/":{"get":{"tags":["products"],"summary":"List all products","operationId":"list_products_v1_products__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page (1-100)","default":20,"title":"Limit"},"description":"Results per page (1-100)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Pagination offset (0-10000)","default":0,"title":"Offset"},"description":"Pagination offset (0-10000)"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort order: relevance, price_asc, price_desc, newest","title":"Sort By"},"description":"Sort order: relevance, price_asc, price_desc, newest"},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Target currency for price conversion. Supported: AUD, CNY, EUR, GBP, HKD, IDR, JPY, MYR, PHP, SGD, THB, USD, VND","title":"Currency"},"description":"Target currency for price conversion. Supported: AUD, CNY, EUR, GBP, HKD, IDR, JPY, MYR, PHP, SGD, THB, USD, VND"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/search":{"get":{"tags":["products"],"summary":"Search products (v1 API)","operationId":"v1_product_search_v1_products_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Full-text search query (max 500 chars)","title":"Q"},"description":"Full-text search query (max 500 chars)"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"price_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Minimum price filter","title":"Price Min"},"description":"Minimum price filter"},{"name":"price_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Maximum price filter","title":"Price Max"},"description":"Maximum price filter"},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Filter by platform/source","title":"Platform"},"description":"Filter by platform/source"},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by country code(s), comma-separated (e.g., SG,US)","title":"Country"},"description":"Filter by country code(s), comma-separated (e.g., SG,US)"},{"name":"country_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Alias for country","title":"Country Code"},"description":"Alias for country"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by region code(s), comma-separated (e.g., SG,US)","title":"Region"},"description":"Filter by region code(s), comma-separated (e.g., SG,US)"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort order: relevance, price_asc, price_desc, newest","title":"Sort By"},"description":"Sort order: relevance, price_asc, price_desc, newest"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page (1-100)","default":20,"title":"Limit"},"description":"Results per page (1-100)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Pagination offset (0-10000)","default":0,"title":"Offset"},"description":"Pagination offset (0-10000)"},{"name":"include_facets","in":"query","required":false,"schema":{"type":"boolean","description":"Include facet counts in response","default":false,"title":"Include Facets"},"description":"Include facet counts in response"},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Target currency for price conversion. Supported: AUD, CNY, EUR, GBP, HKD, IDR, JPY, MYR, PHP, SGD, THB, USD, VND","title":"Currency"},"description":"Target currency for price conversion. Supported: AUD, CNY, EUR, GBP, HKD, IDR, JPY, MYR, PHP, SGD, THB, USD, VND"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/best-price":{"get":{"tags":["products"],"summary":"Find cheapest product across all platforms","description":"Return the single cheapest listing for a product across all platforms.","operationId":"best_price_v1_products_best_price_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Product name to search for","title":"Q"},"description":"Product name to search for"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional category filter","title":"Category"},"description":"Optional category filter"},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Target currency for price conversion. Supported: AUD, CNY, EUR, GBP, HKD, IDR, JPY, MYR, PHP, SGD, THB, USD, VND","title":"Currency"},"description":"Target currency for price conversion. Supported: AUD, CNY, EUR, GBP, HKD, IDR, JPY, MYR, PHP, SGD, THB, USD, VND"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/compare":{"get":{"tags":["products"],"summary":"Search and compare the same product across all sources","operationId":"compare_product_search_v1_products_compare_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Product search query (e.g. iphone 15)","title":"Q"},"description":"Product search query (e.g. iphone 15)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max seed products from search to find matches for","default":10,"title":"Limit"},"description":"Max seed products from search to find matches for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["products"],"summary":"Compare multiple products across platforms","operationId":"compare_products_matrix_v1_products_compare_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareMatrixRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareMatrixResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/compare/diff":{"post":{"tags":["products"],"summary":"Compare 2-5 products directly — returns structured diff","operationId":"compare_products_diff_v1_products_compare_diff_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareDiffRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareDiffResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/products/trending":{"get":{"tags":["products"],"summary":"Get trending products ranked by query volume and clicks","operationId":"get_trending_products_v1_products_trending_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(24h|7d|30d)$","description":"Trending period: 24h, 7d, or 30d","default":"7d","title":"Period"},"description":"Trending period: 24h, 7d, or 30d"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Filter by category name","title":"Category"},"description":"Filter by category name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of products to return (1-100)","default":50,"title":"Limit"},"description":"Number of products to return (1-100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrendingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/export":{"get":{"tags":["products"],"summary":"Export products as CSV or JSON","operationId":"export_products_v1_products_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(csv|json)$","description":"Export format: csv or json","default":"json","title":"Format"},"description":"Export format: csv or json"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Filter by source/platform","title":"Source"},"description":"Filter by source/platform"},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Minimum price filter","title":"Min Price"},"description":"Minimum price filter"},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Maximum price filter","title":"Max Price"},"description":"Maximum price filter"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"description":"Max records to export (up to 10K)","default":1000,"title":"Limit"},"description":"Max records to export (up to 10K)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Pagination offset (0-10000)","default":0,"title":"Offset"},"description":"Pagination offset (0-10000)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/bulk-lookup":{"post":{"tags":["products"],"summary":"Bulk product lookup by SKU, UPC, or product URL","operationId":"bulk_lookup_v1_products_bulk_lookup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkLookupRequest"}}},"required":true},"responses":{"207":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/products/barcode/{code}":{"get":{"tags":["products"],"summary":"Find product by UPC/EAN barcode","operationId":"get_product_by_barcode_v1_products_barcode__code__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/random":{"get":{"tags":["products"],"summary":"Get N random products for agent exploration and testing","operationId":"get_random_products_v1_products_random_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Number of random products to return (1-50)","default":10,"title":"Limit"},"description":"Number of random products to return (1-50)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/deals":{"get":{"tags":["products"],"summary":"Find discounted products","description":"Return products currently priced below their original price by at least min_discount_pct%.","operationId":"get_product_deals_v1_products_deals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by product category","title":"Category"},"description":"Filter by product category"},{"name":"min_discount_pct","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":100,"minimum":0},{"type":"null"}],"description":"Minimum discount % (alias: minDiscount)","title":"Min Discount Pct"},"description":"Minimum discount % (alias: minDiscount)"},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by platform/source (e.g., lazada_sg, shopee_sg)","title":"Platform"},"description":"Filter by platform/source (e.g., lazada_sg, shopee_sg)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}":{"get":{"tags":["products"],"summary":"Get product by ID","operationId":"get_product_v1_products__product_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Target currency for price conversion. Supported: AUD, CNY, EUR, GBP, HKD, IDR, JPY, MYR, PHP, SGD, THB, USD, VND","title":"Currency"},"description":"Target currency for price conversion. Supported: AUD, CNY, EUR, GBP, HKD, IDR, JPY, MYR, PHP, SGD, THB, USD, VND"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/similar":{"get":{"tags":["products"],"summary":"Get similar products across merchants using category and price proximity","operationId":"get_similar_products_v1_products__product_id__similar_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Number of similar products to return (1-50)","default":10,"title":"Limit"},"description":"Number of similar products to return (1-50)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarProductsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/batch":{"post":{"tags":["products"],"summary":"Batch product lookup by IDs","operationId":"batch_lookup_products_v1_products_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchProductRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/products/bulk-ids":{"post":{"tags":["products"],"summary":"Bulk product lookup by IDs","operationId":"bulk_lookup_by_ids_v1_products_bulk_ids_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/products/{product_id}/matches":{"get":{"tags":["products"],"summary":"Get product matches across platforms","operationId":"get_product_matches_v1_products__product_id__matches_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.0,"description":"Minimum confidence score filter","default":0.0,"title":"Min Confidence"},"description":"Minimum confidence score filter"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max matches to return","default":50,"title":"Limit"},"description":"Max matches to return"},{"name":"recompute","in":"query","required":false,"schema":{"type":"boolean","description":"Force recompute matches instead of using cached","default":false,"title":"Recompute"},"description":"Force recompute matches instead of using cached"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductMatchesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/price-history":{"get":{"tags":["products"],"summary":"Get price history for a product","operationId":"get_price_history_v1_products__product_id__price_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Number of days of history to return (default 30)","default":30,"title":"Days"},"description":"Number of days of history to return (default 30)"},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source platform (e.g. shopee_sg, lazada_sg)","title":"Platform"},"description":"Filter by source platform (e.g. shopee_sg, lazada_sg)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/price-stats":{"get":{"tags":["products"],"summary":"Get price statistics and 30-day trend for a product","operationId":"get_price_stats_v1_products__product_id__price_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__product__PriceStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/price-prediction":{"get":{"tags":["products"],"summary":"Predict future price trend using linear regression on price history","operationId":"get_price_prediction_v1_products__product_id__price_prediction_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricePredictionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/alternatives":{"get":{"tags":["products"],"summary":"Find cheaper alternatives in the same category","operationId":"get_alternative_products_v1_products__product_id__alternatives_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Number of alternatives to return","default":10,"title":"Limit"},"description":"Number of alternatives to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/bundles":{"get":{"tags":["products"],"summary":"Suggest complementary products for bundling","operationId":"get_bundle_suggestions_v1_products__product_id__bundles_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Number of bundle items to return","default":10,"title":"Limit"},"description":"Number of bundle items to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BundleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/also-searched":{"get":{"tags":["products"],"summary":"Find products frequently searched together based on co-occurrence analysis","operationId":"get_also_searched_v1_products__product_id__also_searched_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Number of products to return","default":10,"title":"Limit"},"description":"Number of products to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/click":{"post":{"tags":["products"],"summary":"Track product click and redirect to affiliate URL","operationId":"track_product_click_v1_products__product_id__click_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/reviews":{"get":{"tags":["products"],"summary":"Get product reviews aggregation across platforms","operationId":"get_product_reviews_v1_products__product_id__reviews_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReviewsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/availability":{"get":{"tags":["products"],"summary":"Get product availability and stock status across all platforms","operationId":"get_product_availability_v1_products__product_id__availability_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"force_refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Force URL check instead of using cache","default":false,"title":"Force Refresh"},"description":"Force URL check instead of using cache"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductAvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/stock":{"get":{"tags":["products"],"summary":"Get product stock level","operationId":"get_product_stock_v1_products__product_id__stock_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductStockResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/url-availability":{"get":{"tags":["products"],"summary":"Check if product source URL is live — lightweight availability check for agents","operationId":"get_product_url_availability_v1_products__product_id__url_availability_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"force_refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Force URL check instead of using cache","default":false,"title":"Force Refresh"},"description":"Force URL check instead of using cache"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductURLAvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/availability":{"post":{"tags":["products"],"summary":"Bulk check product availability for multiple products","operationId":"bulk_check_availability_v1_products_availability_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAvailabilityRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/products/check-availability":{"post":{"tags":["products"],"summary":"Check if product URLs are still accessible and update availability status","operationId":"check_availability_v1_products_check_availability_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAvailabilityRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/products/{product_id}/price-comparison":{"get":{"tags":["products"],"summary":"Compare prices across platforms for a product","description":"Return all platform listings for the same product with price, shipping cost, total cost, seller rating, delivery estimate.\n\nUses ProductMatcher to find matching products across platforms, then enriches with\nshipping/delivery data from metadata.","operationId":"get_price_comparison_v1_products__product_id__price_comparison_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceComparisonResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/feed":{"get":{"tags":["products"],"summary":"Stream all products as NDJSON for bulk data consumers","operationId":"products_feed_v1_products_feed_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"updatedSince","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO8601 timestamp — return only products updated at or after this time","title":"Updatedsince"},"description":"ISO8601 timestamp — return only products updated at or after this time"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"description":"Chunk size per iteration (products per yield)","default":1000,"title":"Limit"},"description":"Chunk size per iteration (products per yield)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/bulk":{"post":{"tags":["products"],"summary":"Bulk import products for merchant self-serve","operationId":"bulk_import_products_v1_products_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkImportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/products/stats":{"get":{"tags":["products"],"summary":"Get catalog statistics","operationId":"get_catalog_stats_v1_products_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogStats"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/products/{product_id}/questions":{"post":{"tags":["products"],"summary":"Submit a product question","operationId":"create_question_v1_products__product_id__questions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["products"],"summary":"List product questions","operationId":"list_questions_v1_products__product_id__questions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":20,"title":"Page Size"},"description":"Items per page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/questions/{question_id}":{"get":{"tags":["products"],"summary":"Get question with answers","operationId":"get_question_v1_products__product_id__questions__question_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","title":"Question Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/questions/{question_id}/answers":{"post":{"tags":["products"],"summary":"Submit an answer to a question","operationId":"create_answer_v1_products__product_id__questions__question_id__answers_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","title":"Question Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search":{"get":{"tags":["search"],"summary":"Search products","operationId":"search_products_v1_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Full-text search query (max 500 chars)","title":"Q"},"description":"Full-text search query (max 500 chars)"},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Query language for translation: ms (Malay), th (Thai), vi (Vietnamese), id (Indonesian). Translated to English for matching.","title":"Lang"},"description":"Query language for translation: ms (Malay), th (Thai), vi (Vietnamese), id (Indonesian). Translated to English for matching."},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Minimum price filter","title":"Min Price"},"description":"Minimum price filter"},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Maximum price filter","title":"Max Price"},"description":"Maximum price filter"},{"name":"price_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Minimum price filter (alias for min_price)","title":"Price Min"},"description":"Minimum price filter (alias for min_price)"},{"name":"price_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Maximum price filter (alias for max_price)","title":"Price Max"},"description":"Maximum price filter (alias for max_price)"},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Filter by platform (source)","title":"Platform"},"description":"Filter by platform (source)"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Filter by source/platform (alias for platform)","title":"Source"},"description":"Filter by source/platform (alias for platform)"},{"name":"retailer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"US retailer facet filter: amazon,walmart,target,best_buy","title":"Retailer"},"description":"US retailer facet filter: amazon,walmart,target,best_buy"},{"name":"price_range","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"USD price range filter: under_25,25_50,50_100,100_250,250_plus","title":"Price Range"},"description":"USD price range filter: under_25,25_50,50_100,100_250,250_plus"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by region code(s), comma-separated (e.g., US,SG)","title":"Region"},"description":"Filter by region code(s), comma-separated (e.g., US,SG)"},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by country code(s), comma-separated (e.g., SG,MY)","title":"Country"},"description":"Filter by country code(s), comma-separated (e.g., SG,MY)"},{"name":"market","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Alias for country codes. Supports comma-separated values (e.g., SG,AU,US)","title":"Market"},"description":"Alias for country codes. Supports comma-separated values (e.g., SG,AU,US)"},{"name":"market[]","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Repeated alias for country codes (e.g., market[]=SG&market[]=US)","title":"Market[]"},"description":"Repeated alias for country codes (e.g., market[]=SG&market[]=US)"},{"name":"in_stock","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by availability","title":"In Stock"},"description":"Filter by availability"},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Target currency for price conversion. Supported: CNY, VND, SGD, THB, HKD, GBP, AUD, JPY, MYR, PHP, IDR, USD, EUR","title":"Currency"},"description":"Target currency for price conversion. Supported: CNY, VND, SGD, THB, HKD, GBP, AUD, JPY, MYR, PHP, IDR, USD, EUR"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page (1-100)","default":20,"title":"Limit"},"description":"Results per page (1-100)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Pagination offset (0-10000)","default":0,"title":"Offset"},"description":"Pagination offset (0-10000)"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for pagination","title":"Cursor"},"description":"Opaque cursor for pagination"},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Legacy cursor alias; interpreted as the next offset","title":"After"},"description":"Legacy cursor alias; interpreted as the next offset"},{"name":"include_facets","in":"query","required":false,"schema":{"type":"boolean","description":"Include facet counts in response","default":false,"title":"Include Facets"},"description":"Include facet counts in response"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search/semantic":{"get":{"tags":["search"],"summary":"Semantic search products","operationId":"semantic_search_products_v1_search_semantic_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Semantic search query","title":"Q"},"description":"Semantic search query"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Price"}},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Price"}},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by platform (source)","title":"Platform"},"description":"Filter by platform (source)"},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Target currency for price conversion. Supported: CNY, VND, SGD, THB, HKD, GBP, AUD, JPY, MYR, PHP, IDR, USD, EUR","title":"Currency"},"description":"Target currency for price conversion. Supported: CNY, VND, SGD, THB, HKD, GBP, AUD, JPY, MYR, PHP, IDR, USD, EUR"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search/autocomplete":{"get":{"tags":["search"],"summary":"US product title autocomplete with FTS prefix queries","operationId":"us_autocomplete_v1_search_autocomplete_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Search query prefix","title":"Q"},"description":"Search query prefix"},{"name":"region","in":"query","required":false,"schema":{"type":"string","description":"Region code (only us supported for this endpoint)","default":"us","title":"Region"},"description":"Region code (only us supported for this endpoint)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Max titles to return","default":8,"title":"Limit"},"description":"Max titles to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/USAutocompleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search/suggest":{"get":{"tags":["search"],"summary":"Search autocomplete with FTS prefix queries","operationId":"search_suggestions_v1_search_suggest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Search query prefix","title":"Q"},"description":"Search query prefix"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Max suggestions to return","default":10,"title":"Limit"},"description":"Max suggestions to return"},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by country code(s), comma-separated (e.g., US,SG)","title":"Country"},"description":"Filter by country code(s), comma-separated (e.g., US,SG)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutocompleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search/benchmark":{"get":{"tags":["search"],"summary":"Benchmark search performance","operationId":"benchmark_search_v1_search_benchmark_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Benchmark Search V1 Search Benchmark Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/search/image":{"post":{"tags":["search"],"summary":"Find products by image similarity","description":"Find products visually similar to the provided image.\n\nUses perceptual hashing (pHash) to compare images. Returns products\nsorted by similarity score. Requires images to be indexed in the\nImageHash table.\n\nPerformance: Limits hash comparisons to prevent O(n) scaling with large image datasets.\nFor production, consider approximate nearest neighbor (ANN) indexing.","operationId":"search_by_image_v1_search_image_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/search/filters":{"get":{"tags":["search"],"summary":"Get available filter options with counts for building dynamic filter UIs","operationId":"get_search_filters_v1_search_filters_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional search query to get filters scoped to results","title":"Q"},"description":"Optional search query to get filters scoped to results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchFiltersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search/history":{"get":{"tags":["search"],"summary":"Get search history for the authenticated API key","operationId":"get_search_history_v1_search_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page (1-100)","default":20,"title":"Limit"},"description":"Results per page (1-100)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchHistoryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/categories":{"get":{"tags":["categories"],"summary":"List available categories","operationId":"list_categories_v1_categories_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"region","in":"query","required":false,"schema":{"type":"string","description":"Filter by region code(s), comma-separated (e.g., US,SG)","title":"Region"},"description":"Filter by region code(s), comma-separated (e.g., US,SG)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/categories/tree":{"get":{"tags":["categories"],"summary":"List categories in hierarchical tree structure","description":"Return categories organized in a hierarchical tree structure.\n\nFor now, this returns the same structure as the flat categories endpoint\nsince we don't have a full taxonomy system implemented yet.","operationId":"list_categories_tree_v1_categories_tree_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"region","in":"query","required":false,"schema":{"type":"string","description":"Filter by region code(s), comma-separated (e.g., US,SG)","title":"Region"},"description":"Filter by region code(s), comma-separated (e.g., US,SG)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys":{"get":{"tags":["keys"],"summary":"List API keys (requires authentication)","description":"List all API keys for the authenticated developer.","operationId":"list_api_keys_v1_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyResponse"},"type":"array","title":"Response List Api Keys V1 Keys Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["keys"],"summary":"Provision API key (internal)","operationId":"create_api_key_v1_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/bootstrap":{"post":{"tags":["keys"],"summary":"Bootstrap initial API key (localhost only)","description":"Create initial API key if none exist (localhost only).","operationId":"bootstrap_key_v1_keys_bootstrap_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Bootstrap Key V1 Keys Bootstrap Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/{key_id}":{"delete":{"tags":["keys"],"summary":"Revoke API key (requires authentication)","description":"Revoke an API key (soft delete by setting is_active to False).","operationId":"revoke_key_v1_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/{key_id}/rotate":{"post":{"tags":["keys"],"summary":"Rotate API key (requires authentication)","description":"Rotate an API key (revoke old, generate new).","operationId":"rotate_key_v1_keys__key_id__rotate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Rotate Key V1 Keys  Key Id  Rotate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deals":{"get":{"tags":["deals"],"summary":"Find discounted products","description":"Return products currently priced below their original price by at least min_discount_pct%.","operationId":"get_deals_v1_deals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by product category","title":"Category"},"description":"Filter by product category"},{"name":"min_discount_pct","in":"query","required":false,"schema":{"type":"number","maximum":100,"minimum":0,"description":"Minimum discount % (default 10)","default":10.0,"title":"Min Discount Pct"},"description":"Minimum discount % (default 10)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deals/price-drops":{"get":{"tags":["deals"],"summary":"Find products with recent price decreases","description":"Return top products with the biggest price drops in the last 24 hours for a given region.","operationId":"get_price_drops_v1_deals_price_drops_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"region","in":"query","required":false,"schema":{"type":"string","description":"Region filter (default: us)","default":"us","title":"Region"},"description":"Region filter (default: us)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results (default: 10)","default":10,"title":"Limit"},"description":"Max results (default: 10)"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Number of days to look back for price drops","default":7,"title":"Days"},"description":"Number of days to look back for price drops"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceDropsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/coupons":{"get":{"tags":["coupons"],"summary":"List active coupons","operationId":"get_coupons_v1_coupons_get","parameters":[{"name":"retailer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by retailer ID (e.g. shopee_sg)","title":"Retailer Id"},"description":"Filter by retailer ID (e.g. shopee_sg)"},{"name":"discount_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by discount type: percentage, fixed, free_item, bogo","title":"Discount Type"},"description":"Filter by discount type: percentage, fixed, free_item, bogo"},{"name":"verified","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter to only verified coupons","title":"Verified"},"description":"Filter to only verified coupons"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results to return","default":20,"title":"Limit"},"description":"Max results to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/coupons/stats":{"get":{"tags":["coupons"],"summary":"Coupon statistics","operationId":"get_coupon_stats_v1_coupons_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponsStatsResponse"}}}}}}},"/v1/coupons/export":{"get":{"tags":["coupons"],"summary":"Export coupons as NDJSON file","operationId":"export_coupons_v1_coupons_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/coupons/retailers":{"get":{"tags":["coupons"],"summary":"List supported retailers","operationId":"get_coupon_retailers_v1_coupons_retailers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Get Coupon Retailers V1 Coupons Retailers Get"}}}}}}},"/v1/ingestion":{"post":{"tags":["ingestion"],"summary":"Register new ingestion run","operationId":"create_ingestion_run_v1_ingestion_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionRunCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["ingestion"],"summary":"List recent ingestion runs","operationId":"list_ingestion_runs_v1_ingestion_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source platform","title":"Source"},"description":"Filter by source platform"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Ingestion Runs V1 Ingestion Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ingestion/status":{"get":{"tags":["ingestion"],"summary":"Get ingestion dead letter queue status","operationId":"get_ingestion_status_v1_ingestion_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionStatusResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/ingestion/{run_id}":{"get":{"tags":["ingestion"],"summary":"Get ingestion run status","operationId":"get_ingestion_run_v1_ingestion__run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["ingestion"],"summary":"Update ingestion run progress","operationId":"update_ingestion_run_v1_ingestion__run_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionRunUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ingestion/{run_id}/complete":{"post":{"tags":["ingestion"],"summary":"Mark ingestion run as complete","operationId":"complete_ingestion_run_v1_ingestion__run_id__complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionRunComplete"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ingestion/stats":{"get":{"tags":["ingestion"],"summary":"Get ingestion statistics","operationId":"get_ingestion_stats_v1_ingestion_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionStats"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/ingestion/health":{"get":{"tags":["ingestion"],"summary":"Get ingestion pipeline health and throughput metrics","description":"Get ingestion pipeline health metrics including throughput, gaps, and performance.","operationId":"get_ingestion_health_v1_ingestion_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Ingestion Health V1 Ingestion Health Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/ingest/products":{"post":{"tags":["ingest"],"summary":"Ingest product batch","operationId":"ingest_products_v1_ingest_products_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/ingest/runs":{"get":{"tags":["ingest"],"summary":"List recent ingestion runs","operationId":"list_ingestion_runs_v1_ingest_runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ingest/runs/{run_id}":{"get":{"tags":["ingest"],"summary":"Get ingestion run by ID","operationId":"get_ingestion_run_v1_ingest_runs__run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/v1/status":{"get":{"tags":["status"],"summary":"Get catalog health and status","operationId":"get_catalog_status_v1_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogStatus"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/v1/status/scrapers":{"get":{"tags":["status"],"summary":"Get scraper health status per platform","operationId":"get_scraper_health_status_v1_v1_status_scrapers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScraperHealthReport"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/v1/status/health":{"get":{"tags":["status"],"summary":"Get system health — DB latency, pool, and scraper status","operationId":"get_system_health_v1_v1_status_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemHealthReport"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/v1/status/public":{"get":{"tags":["status"],"summary":"Public status page endpoint — no auth required","operationId":"public_status_v1_v1_status_public_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStatusResponse"}}}}}}},"/v1/catalog/health":{"get":{"tags":["catalog"],"summary":"Get catalog health and quality report","operationId":"catalog_health_v1_catalog_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogHealthReport"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/catalog/incomplete":{"get":{"tags":["catalog"],"summary":"List incomplete product records missing price/title/url","operationId":"list_incomplete_products_v1_catalog_incomplete_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Filter by source platform","title":"Source"},"description":"Filter by source platform"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page (1-100)","default":20,"title":"Limit"},"description":"Results per page (1-100)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Pagination offset (0-10000)","default":0,"title":"Offset"},"description":"Pagination offset (0-10000)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Incomplete Products V1 Catalog Incomplete Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/catalog/stats":{"get":{"tags":["catalog"],"summary":"Get catalog statistics — total products by platform and category","operationId":"catalog_stats_v1_catalog_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogStatsReport"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/catalog/quality-report":{"get":{"tags":["catalog"],"summary":"Get product data quality report with freshness, completeness, and price accuracy","operationId":"catalog_quality_report_v1_catalog_quality_report_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogQualityReport"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/catalog/health/public":{"get":{"tags":["catalog"],"summary":"Public catalog quality + freshness status — no auth required","operationId":"public_catalog_health_v1_catalog_health_public_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCatalogHealthReport"}}}}}}},"/v1/merchants":{"get":{"tags":["merchants"],"summary":"List all merchants with product counts","operationId":"list_merchants_v1_merchants_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search merchants by name","title":"Search"},"description":"Search merchants by name"},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by platform/source","title":"Platform"},"description":"Filter by platform/source"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/merchants/{merchant_id}":{"get":{"tags":["merchants"],"summary":"Get merchant profile with active products","operationId":"get_merchant_v1_merchants__merchant_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"merchant_id","in":"path","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by platform/source","title":"Platform"},"description":"Filter by platform/source"},{"name":"sample_limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Number of sample products to return","default":5,"title":"Sample Limit"},"description":"Number of sample products to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/merchant/analytics":{"get":{"tags":["merchant","analytics"],"summary":"Get merchant analytics","operationId":"get_merchant_analytics_v1_merchant_analytics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Number of days to analyze","default":7,"title":"Days"},"description":"Number of days to analyze"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of top products to return","default":10,"title":"Limit"},"description":"Number of top products to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brands":{"get":{"tags":["brands"],"summary":"List all brands with product counts","operationId":"list_brands_v1_brands_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source/platform","title":"Source"},"description":"Filter by source/platform"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brands/{brand_name}/products":{"get":{"tags":["brands"],"summary":"List products by brand","operationId":"get_brand_products_v1_brands__brand_name__products_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"brand_name","in":"path","required":true,"schema":{"type":"string","title":"Brand Name"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source/platform","title":"Source"},"description":"Filter by source/platform"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Min Price"}},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Price"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sources":{"get":{"tags":["sources"],"summary":"List all sources with product counts and status","description":"Return all sources (platforms) with product counts, merchant counts, and scrape status.","operationId":"list_sources_v1_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/.well-known/glama.json":{"get":{"tags":["AEO"],"summary":"Glama connector ownership claim file","operationId":"get_glama_claim_file__well_known_glama_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms.txt":{"get":{"tags":["AEO"],"summary":"LLM discovery file","description":"Returns buywhere.ai/llms.txt — the standard LLM discovery file per llmstxt.org spec.\nThis file allows AI agents and LLMs to discover and understand the BuyWhere API\nwithout human friction.","operationId":"get_llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/agents":{"get":{"tags":["AEO"],"summary":"Agent capability page with JSON-LD","description":"Agent capability page with JSON-LD SoftwareApplication schema.\nThis page helps AI agents understand BuyWhere as a tool they can use.","operationId":"get_agents_page_agents_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/schema":{"get":{"tags":["AEO"],"summary":"Structured API schema page","description":"Structured API schema page linking to OpenAPI spec and providing\nsemantic description of each endpoint for AI agents.","operationId":"get_api_schema_page_api_schema_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/openapi.yaml":{"get":{"tags":["AEO"],"summary":"OpenAPI specification","description":"Serve the OpenAPI specification file.","operationId":"get_openapi_spec_openapi_yaml_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/v1/developers/signup":{"post":{"tags":["developers"],"summary":"Developer self-service signup","operationId":"developer_signup_v1_developers_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperSignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperSignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developers/me":{"get":{"tags":["developers"],"summary":"Get developer profile","description":"Returns developer profile and all API keys associated with this account.","operationId":"developer_me_v1_developers_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperMeResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/developers/me/usage":{"get":{"tags":["developers"],"summary":"Get usage dashboard for authenticated developer","description":"Return dashboard usage for the authenticated API key.","operationId":"developer_usage_v1_developers_me_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperUsageResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/developers/verify":{"get":{"tags":["developers"],"summary":"Verify email and activate API key","operationId":"verify_email_v1_developers_verify_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/developers/resend-verification":{"post":{"tags":["developers"],"summary":"Resend verification email","operationId":"resend_verification_v1_developers_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/register":{"post":{"tags":["auth-compat"],"summary":"Legacy agent self-registration (compat)","description":"Backward-compatible registration endpoint.\n\nAccepts the old Node.js request shape and returns the old response shape\nwhile delegating to the same key-provisioning logic as /v1/developers/signup.","operationId":"legacy_register_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyRegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/me":{"get":{"tags":["auth"],"summary":"Get API key metadata","description":"Returns metadata for the authenticated API key.\n\nThis endpoint allows clients to verify their API key is valid and\nget information about the key's tier and rate limits.","operationId":"auth_me_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthMeResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/analytics/clicks":{"get":{"tags":["analytics"],"summary":"Get click analytics","operationId":"get_click_analytics_v1_analytics_clicks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Number of days to analyze","default":7,"title":"Days"},"description":"Number of days to analyze"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of top products to return","default":10,"title":"Limit"},"description":"Number of top products to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/clicks/events":{"get":{"tags":["analytics"],"summary":"Get raw click events with product_id, retailer, price, and timestamp","operationId":"get_click_events_v1_analytics_clicks_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Number of days to look back","default":7,"title":"Days"},"description":"Number of days to look back"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of events per page","default":50,"title":"Page Size"},"description":"Number of events per page"},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by platform (e.g., amazon_us, walmart_us)","title":"Platform"},"description":"Filter by platform (e.g., amazon_us, walmart_us)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickEventsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/usage":{"get":{"tags":["analytics"],"summary":"Get API usage analytics for your API key","operationId":"get_usage_analytics_v1_analytics_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageAnalyticsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/analytics/queries":{"get":{"tags":["analytics"],"summary":"Get recent query history for your API key","operationId":"get_query_history_v1_analytics_queries_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of recent queries to return","default":20,"title":"Limit"},"description":"Number of recent queries to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/query-stats":{"get":{"tags":["analytics"],"summary":"Get aggregate API query statistics toward 1M/month goal","operationId":"get_query_stats_v1_analytics_query_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryStatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/analytics/query-stats/daily":{"get":{"tags":["analytics"],"summary":"Get daily query breakdown for trend analysis","operationId":"get_query_stats_daily_v1_analytics_query_stats_daily_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":7,"description":"Number of days to include in daily breakdown","default":30,"title":"Days"},"description":"Number of days to include in daily breakdown"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryStatsDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/query-count":{"get":{"tags":["analytics"],"summary":"Get query count telemetry for launch window monitoring","operationId":"get_launch_window_telemetry_v1_analytics_query_count_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start time in ISO 8601 UTC","title":"Start"},"description":"Start time in ISO 8601 UTC"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End time in ISO 8601 UTC","title":"End"},"description":"End time in ISO 8601 UTC"},{"name":"days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":90,"minimum":1},{"type":"null"}],"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchWindowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/launch-window":{"get":{"tags":["analytics"],"summary":"Get launch window telemetry","operationId":"get_launch_window_telemetry_v1_analytics_launch_window_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start time in ISO 8601 UTC","title":"Start"},"description":"Start time in ISO 8601 UTC"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End time in ISO 8601 UTC","title":"End"},"description":"End time in ISO 8601 UTC"},{"name":"days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":90,"minimum":1},{"type":"null"}],"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchWindowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/stats":{"get":{"tags":["admin"],"summary":"Get admin dashboard statistics","operationId":"get_admin_stats_v1_admin_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/logs":{"get":{"tags":["admin"],"summary":"Query recent API request logs","operationId":"get_logs_v1_admin_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"}},{"name":"api_key_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/sessions":{"get":{"tags":["admin"],"summary":"Get agent sessions grouped by API key + 5-min time window","operationId":"get_sessions_v1_admin_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"api_key_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by specific API key ID","title":"Api Key Id"},"description":"Filter by specific API key ID"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/commissions":{"get":{"tags":["admin"],"summary":"Get commission tracking dashboard with daily/weekly/monthly breakdowns","operationId":"get_commissions_v1_admin_commissions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__admin__CommissionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/revenue":{"get":{"tags":["admin"],"summary":"Get revenue dashboard with clicks, conversions, and revenue stats","operationId":"get_revenue_dashboard_v1_admin_revenue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueDashboardResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/kpi":{"get":{"tags":["admin"],"summary":"Get activation funnel KPI snapshot for a given period","operationId":"get_kpi_snapshot_v1_admin_kpi_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Number of days to look back","default":7,"title":"Days"},"description":"Number of days to look back"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KpiSnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/analytics":{"get":{"tags":["admin"],"summary":"Get API analytics for AI models, regions, keywords, categories, and MCP tools (past 7 days)","operationId":"get_api_analytics_v1_admin_analytics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIAnalyticsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/search-analytics":{"get":{"tags":["admin"],"summary":"Get US search analytics - top queries, avg response time, zero-result queries, and popular categories","operationId":"get_search_analytics_v1_admin_search_analytics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchAnalyticsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/feature-flags":{"get":{"tags":["admin","feature-flags"],"summary":"Get all feature flag statuses","operationId":"get_all_feature_flags_admin_feature_flags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/feature-flags/{flag_name}":{"get":{"tags":["admin","feature-flags"],"summary":"Get a specific feature flag status","operationId":"get_feature_flag_admin_feature_flags__flag_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"flag_name","in":"path","required":true,"schema":{"type":"string","title":"Flag Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/feature-flags/{flag_name}/detailed":{"get":{"tags":["admin","feature-flags"],"summary":"Get feature flag with change history","operationId":"get_feature_flag_detailed_admin_feature_flags__flag_name__detailed_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"flag_name","in":"path","required":true,"schema":{"type":"string","title":"Flag Name"}},{"name":"history_limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"History Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagWithHistory"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/feature-flags/override":{"post":{"tags":["admin","feature-flags"],"summary":"Override a feature flag (runtime toggle)","operationId":"set_feature_flag_override_admin_feature_flags_override_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/feature-flags/batch-update":{"post":{"tags":["admin","feature-flags"],"summary":"Batch update multiple feature flags","operationId":"batch_update_feature_flags_admin_feature_flags_batch_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchFlagUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchFlagUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/feature-flags/override/{flag_name}":{"delete":{"tags":["admin","feature-flags"],"summary":"Clear feature flag override (revert to config)","operationId":"clear_feature_flag_override_admin_feature_flags_override__flag_name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"flag_name","in":"path","required":true,"schema":{"type":"string","title":"Flag Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/feature-flags/history/all":{"get":{"tags":["admin","feature-flags"],"summary":"Get feature flag change history","operationId":"get_all_flag_history_admin_feature_flags_history_all_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"flag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by specific flag","title":"Flag"},"description":"Filter by specific flag"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks":{"get":{"tags":["webhooks"],"summary":"List developer webhooks","operationId":"list_webhooks_v1_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["webhooks"],"summary":"Register a webhook","operationId":"create_webhook_v1_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/webhooks/{webhook_id}":{"delete":{"tags":["webhooks"],"summary":"Delete a webhook","operationId":"delete_webhook_v1_webhooks__webhook_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/test":{"post":{"tags":["webhooks"],"summary":"Send test event to verify webhook URL","operationId":"test_webhook_v1_webhooks_test_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/webhooks/{webhook_id}/active":{"patch":{"tags":["webhooks"],"summary":"Enable or disable a webhook","operationId":"toggle_webhook_v1_webhooks__webhook_id__active_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/catalog-update":{"post":{"tags":["webhooks"],"summary":"Inbound webhook for merchant catalog updates","description":"Receive catalog update notifications from merchants (price changes, stock updates, new products).\n\n**Authentication**: HMAC signature verification via headers:\n- `X-Webhook-Signature`: HMAC-SHA256 signature of the raw request body\n- `X-Webhook-Merchant-Id`: Merchant/source identifier\n\n**Idempotency**: Pass `idempotency_key` in the payload body to prevent duplicate processing.\nThe same key within 24 hours will return the cached response.\n\n**Rate Limit**: 100 requests/minute per merchant.","operationId":"receive_catalog_update_v1_webhooks_catalog_update_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogUpdateResponse"}}}}}}},"/v1/webhooks/catalog-update/register":{"post":{"tags":["webhooks"],"summary":"Register a merchant webhook endpoint","description":"Register a merchant's webhook endpoint and receive an HMAC secret for signature verification.","operationId":"register_catalog_webhook_v1_webhooks_catalog_update_register_post","parameters":[{"name":"merchant_id","in":"query","required":true,"schema":{"type":"string","title":"Merchant Id"}},{"name":"webhook_url","in":"query","required":true,"schema":{"type":"string","title":"Webhook Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/alerts":{"post":{"tags":["alertmanager"],"summary":"Receive Alertmanager webhooks","description":"Handle incoming Alertmanager webhook notifications.\n\nWhen FleetErrorStateConcentration alert fires with trigger_type=auto_heartbeat_first_class,\ntriggers auto-heartbeat for all platforms with recent failed ingestion runs.","operationId":"handle_alertmanager_webhook_webhooks_alerts_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/v1/metrics":{"get":{"tags":["metrics"],"summary":"Get data freshness and quality metrics for all platforms","operationId":"get_metrics_v1_v1_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__metrics__MetricsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/v1/metrics/completeness":{"get":{"tags":["metrics"],"summary":"Get completeness metrics (% of products with required fields) per platform","operationId":"get_completeness_metrics_v1_v1_metrics_completeness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletenessResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/v1/metrics/{source}":{"get":{"tags":["metrics"],"summary":"Get metrics for a specific platform","operationId":"get_platform_metrics_v1_v1_metrics__source__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformMetrics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/v1/alerts":{"get":{"tags":["alerts"],"summary":"List price alerts","operationId":"list_alerts_v1_v1_alerts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["alerts"],"summary":"Create a price alert","operationId":"create_alert_v1_v1_alerts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/v1/alerts/{alert_id}":{"delete":{"tags":["alerts"],"summary":"Cancel a price alert","operationId":"delete_alert_v1_v1_alerts__alert_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","title":"Alert Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/images/{image_hash}":{"get":{"tags":["images"],"summary":"Proxy and transform product image","operationId":"get_image_v1_images__image_hash__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"image_hash","in":"path","required":true,"schema":{"type":"string","title":"Image Hash"}},{"name":"w","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2000,"minimum":1},{"type":"null"}],"description":"Target width in pixels","title":"W"},"description":"Target width in pixels"},{"name":"h","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2000,"minimum":1},{"type":"null"}],"description":"Target height in pixels","title":"H"},"description":"Target height in pixels"},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Output format: webp, jpeg, png, gif","title":"Format"},"description":"Output format: webp, jpeg, png, gif"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/images/product/{product_id}":{"get":{"tags":["images"],"summary":"Proxy product image by product ID with preset sizes","operationId":"get_product_image_v1_images_product__product_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"size","in":"query","required":false,"schema":{"enum":["thumb","full"],"type":"string","description":"Image size: thumb (200x200) or full (800x800)","default":"thumb","title":"Size"},"description":"Image size: thumb (200x200) or full (800x800)"},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Output format: webp, jpeg, png, gif","default":"jpeg","title":"Format"},"description":"Output format: webp, jpeg, png, gif"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/images":{"post":{"tags":["images"],"summary":"Register an image URL and get a hash","operationId":"register_image_v1_images_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Image URL to register","title":"Url"},"description":"Image URL to register"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Register Image V1 Images Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/images/{image_hash}/info":{"get":{"tags":["images"],"summary":"Get image metadata","operationId":"get_image_info_v1_images__image_hash__info_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"image_hash","in":"path","required":true,"schema":{"type":"string","title":"Image Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Image Info V1 Images  Image Hash  Info Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/changelog":{"get":{"tags":["changelog"],"summary":"Get API changelog as structured JSON","operationId":"get_changelog_v1_changelog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangelogResponse"}}}}}}},"/v1/feed/new":{"get":{"tags":["feed"],"summary":"RSS 2.0 or JSON feed of newest products","description":"Return the most recently created products as an RSS 2.0 feed or cursor-paginated JSON.","operationId":"feed_new_products_v1_feed_new_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max items in feed","default":50,"title":"Limit"},"description":"Max items in feed"},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(rss|json)$","description":"Response format: 'rss' (default) or 'json' (cursor-paginated)","default":"rss","title":"Format"},"description":"Response format: 'rss' (default) or 'json' (cursor-paginated)"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor (base64-encoded created_at timestamp) for pagination. For JSON format only.","title":"Cursor"},"description":"Cursor (base64-encoded created_at timestamp) for pagination. For JSON format only."}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/feed/deals":{"get":{"tags":["feed"],"summary":"RSS 2.0 feed of latest deals and price drops","description":"Return products with recent price drops as an RSS 2.0 feed.","operationId":"feed_deals_v1_feed_deals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Lookback window in days","default":7,"title":"Days"},"description":"Lookback window in days"},{"name":"min_drop_pct","in":"query","required":false,"schema":{"type":"number","maximum":100,"minimum":0,"description":"Minimum price drop percentage","default":5.0,"title":"Min Drop Pct"},"description":"Minimum price drop percentage"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max items in feed","default":50,"title":"Limit"},"description":"Max items in feed"}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/feed/changes":{"get":{"tags":["feed"],"summary":"SSE stream of real-time product catalog changes","description":"Server-Sent Events stream of product additions, price changes, and deletions. Agents subscribe to this endpoint to receive real-time updates instead of polling. Streams for up to 24 hours, polling every `poll_interval` seconds for changes.","operationId":"feed_changes_v1_feed_changes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"since","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"ISO timestamp — only send changes after this time","title":"Since"},"description":"ISO timestamp — only send changes after this time"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source (e.g. 'lazada_sg', 'shopee_sg')","title":"Source"},"description":"Filter by source (e.g. 'lazada_sg', 'shopee_sg')"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"poll_interval","in":"query","required":false,"schema":{"type":"number","maximum":60.0,"minimum":1.0,"description":"Seconds between change polls (default 10)","default":10.0,"title":"Poll Interval"},"description":"Seconds between change polls (default 10)"},{"name":"max_duration","in":"query","required":false,"schema":{"type":"number","maximum":86400.0,"minimum":60.0,"description":"Max stream duration in seconds (default 86400 = 24h)","default":86400.0,"title":"Max Duration"},"description":"Max stream duration in seconds (default 86400 = 24h)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/feed/changelog":{"get":{"tags":["feed"],"summary":"RSS 2.0 feed of API changelog entries","description":"Return the API changelog as an RSS 2.0 feed.","operationId":"feed_changelog_v1_feed_changelog_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max items in feed","default":50,"title":"Limit"},"description":"Max items in feed"}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/trending":{"get":{"tags":["trending"],"summary":"Get top searched products — most viewed from search results","operationId":"get_trending_searches_v1_trending_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(24h|7d|30d)$","description":"Trending period: 24h, 7d, or 30d","default":"7d","title":"Period"},"description":"Trending period: 24h, 7d, or 30d"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category name","title":"Category"},"description":"Filter by category name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of products to return (default 20)","default":20,"title":"Limit"},"description":"Number of products to return (default 20)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrendingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/trending/clicks":{"get":{"tags":["trending"],"summary":"Get most clicked products — top products by affiliate link clicks","operationId":"get_trending_clicks_v1_trending_clicks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(24h|7d|30d)$","description":"Trending period: 24h, 7d, or 30d","default":"7d","title":"Period"},"description":"Trending period: 24h, 7d, or 30d"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category name","title":"Category"},"description":"Filter by category name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of products to return (default 20)","default":20,"title":"Limit"},"description":"Number of products to return (default 20)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrendingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/export/products":{"get":{"tags":["export"],"summary":"Bulk export products as CSV or JSON","operationId":"export_products_v1_export_products_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(csv|json)$","description":"Export format: csv or json","default":"json","title":"Format"},"description":"Export format: csv or json"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source/platform","title":"Source"},"description":"Filter by source/platform"},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Minimum price filter","title":"Min Price"},"description":"Minimum price filter"},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Maximum price filter","title":"Max Price"},"description":"Maximum price filter"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"description":"Max records per export (up to 10K)","default":1000,"title":"Limit"},"description":"Max records per export (up to 10K)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/export/products/count":{"get":{"tags":["export"],"summary":"Get exportable product count with filters","operationId":"export_count_v1_export_products_count_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source/platform","title":"Source"},"description":"Filter by source/platform"},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Minimum price filter","title":"Min Price"},"description":"Minimum price filter"},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Maximum price filter","title":"Max Price"},"description":"Maximum price filter"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Export Count V1 Export Products Count Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/enrich/batch":{"post":{"tags":["enrichment"],"summary":"Enrich a batch of products","operationId":"enrich_batch_v1_enrich_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchEnrichRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchEnrichResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/enrich/product/{product_id}":{"post":{"tags":["enrichment"],"summary":"Get enrichment preview for a product","operationId":"enrich_product_preview_v1_enrich_product__product_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.0,"default":0.7,"title":"Min Confidence"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/enrich/apply/{product_id}":{"post":{"tags":["enrichment"],"summary":"Apply enrichment to a product and save","operationId":"enrich_product_apply_v1_enrich_apply__product_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.0,"default":0.7,"title":"Min Confidence"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentApplyResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/enrich/stats":{"get":{"tags":["enrichment"],"summary":"Get enrichment coverage statistics","operationId":"get_enrichment_stats_v1_enrich_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentStats"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/health":{"get":{"tags":["system"],"summary":"Comprehensive health check with dependency status","operationId":"health_check_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComprehensiveHealthReport"}}}}}}},"/v1/health/scrapers":{"get":{"tags":["health"],"summary":"Scraping fleet health — all platforms","operationId":"scraper_fleet_health_v1_health_scrapers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScraperHealthReport"}}}}}}},"/v1/health/detailed":{"get":{"tags":["health"],"summary":"Detailed health check with dependency response times","operationId":"detailed_health_check_v1_health_detailed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedHealthResponse"}}}}}}},"/v1/health/db":{"get":{"tags":["health"],"summary":"Database connection health","operationId":"health_db_v1_health_db_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DBConnectionHealth"}}}}}}},"/v1/health/redis":{"get":{"tags":["health"],"summary":"Redis connection health","operationId":"health_redis_v1_health_redis_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DependencyHealth"}}}}}}},"/v1/watchlist":{"get":{"tags":["watchlist"],"summary":"List watchlist items","operationId":"list_watchlist_v1_watchlist_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["watchlist"],"summary":"Add a product to watchlist","operationId":"add_to_watchlist_v1_watchlist_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistAddRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/watchlist/{item_id}":{"delete":{"tags":["watchlist"],"summary":"Remove from watchlist","operationId":"remove_from_watchlist_v1_watchlist__item_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/watchlist/alerts":{"get":{"tags":["watchlist"],"summary":"Get watchlist price drop alerts","operationId":"get_watchlist_alerts_v1_watchlist_alerts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistAlertsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/import/csv":{"post":{"tags":["import"],"summary":"Import products from CSV file","operationId":"import_csv_v1_import_csv_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"source","in":"query","required":true,"schema":{"type":"string","description":"Source/platform name for imported products (e.g., merchant_own)","title":"Source"},"description":"Source/platform name for imported products (e.g., merchant_own)"},{"name":"merchant_id","in":"query","required":true,"schema":{"type":"string","description":"Merchant identifier for the import batch","title":"Merchant Id"},"description":"Merchant identifier for the import batch"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_csv_v1_import_csv_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CSVImportReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/preferences":{"get":{"tags":["preferences"],"summary":"Get notification preferences","operationId":"get_preferences_v1_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["preferences"],"summary":"Set notification preferences","operationId":"set_preferences_v1_preferences_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["preferences"],"summary":"Delete notification preferences","operationId":"delete_preferences_v1_preferences_delete","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["preferences"],"summary":"Update notification preferences","operationId":"update_preferences_v1_preferences_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/countries":{"get":{"tags":["countries"],"summary":"List available countries with product counts","operationId":"list_countries_v1_countries_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountryListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/products/{product_id}/duplicates":{"get":{"tags":["deduplication"],"summary":"Get duplicates for a product","operationId":"get_product_duplicates_v1_products__product_id__duplicates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.0,"default":0.0,"title":"Min Confidence"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/dedup/check":{"post":{"tags":["deduplication"],"summary":"Check a product for duplicates without saving","operationId":"check_duplicates_v1_products_dedup_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/ingest/dedup":{"post":{"tags":["deduplication"],"summary":"Run dedup check on a batch of products during ingestion","operationId":"ingest_dedup_check_v1_ingest_dedup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestDedupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestDedupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/ingest/dedup/pipeline":{"post":{"tags":["deduplication"],"summary":"Run full deduplication pipeline across all active products","operationId":"run_dedup_pipeline_v1_ingest_dedup_pipeline_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"resolve_conflicts","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to resolve canonical_id conflicts after matching","default":true,"title":"Resolve Conflicts"},"description":"Whether to resolve canonical_id conflicts after matching"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DedupPipelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ingest/dedup/audit":{"get":{"tags":["deduplication"],"summary":"Audit deduplication quality - detect false positives and negatives","operationId":"audit_dedup_quality_v1_ingest_dedup_audit_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DedupAuditResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/ingest/dedup/conflicts/resolve":{"post":{"tags":["deduplication"],"summary":"Detect and resolve canonical_id conflicts","operationId":"resolve_canonical_conflicts_v1_ingest_dedup_conflicts_resolve_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictResolutionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/compare":{"get":{"tags":["compare"],"summary":"Compare multiple products directly by IDs","description":"Compare multiple products directly by their IDs.\n\nReturns side-by-side comparison of title, price, merchant, availability, and affiliate_url.\nThis is the core value proposition for AI agents doing price comparison.","operationId":"compare_products_by_ids_v1_compare_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_ids","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Comma-separated product IDs (e.g. 1,2,3)","title":"Product Ids"},"description":"Comma-separated product IDs (e.g. 1,2,3)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/compare/{product_id}":{"get":{"tags":["compare"],"summary":"Compare same product across all sources","description":"Find the same product across all sources using title similarity + brand match.\n\nReturns products sorted by price with savings vs most expensive.\nThis is THE killer feature for shopping agents.","operationId":"compare_product_by_id_v1_compare__product_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Minimum price filter","title":"Min Price"},"description":"Minimum price filter"},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum price filter","title":"Max Price"},"description":"Maximum price filter"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/compare/diff":{"get":{"tags":["compare"],"summary":"Public deep link comparison - compare 2-5 products by IDs","description":"Public endpoint for deep linking product comparisons.\n\nURL pattern: /compare/diff?p=ASIN1,SKU2,SKU3\n\nThis endpoint does NOT require API key authentication and is designed for:\n- Social media sharing (Facebook, Twitter, etc.)\n- Deep links in emails and messages\n- SEO crawling by search engines\n\nReturns products with OG meta data for social sharing.","operationId":"compare_deep_link_v1_compare_diff_get","parameters":[{"name":"p","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Comma-separated product IDs (e.g. 1,2,3)","title":"P"},"description":"Comma-separated product IDs (e.g. 1,2,3)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeepLinkCompareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/v1/affiliate/link":{"post":{"tags":["affiliate"],"summary":"Generate tracked affiliate link for a product URL","description":"Generate a tracked affiliate link for a product URL.\n\nIf TRACKING_BASE_URL is configured, the link will be wrapped for click tracking.\nOtherwise returns a direct affiliate link with UTM parameters.","operationId":"create_affiliate_link_v1_v1_affiliate_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateLinkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/v1/affiliate/earnings":{"get":{"tags":["affiliate"],"summary":"Get estimated earnings per API key","description":"Get estimated affiliate earnings for this API key.\n\nReturns click counts and estimated earnings broken down by platform.\nEarnings are estimates based on known commission rates and may not reflect actual payouts.","operationId":"get_affiliate_earnings_v1_v1_affiliate_earnings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Number of days to look back","default":30,"title":"Days"},"description":"Number of days to look back"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EarningsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/subscribe":{"post":{"tags":["billing"],"summary":"Create Stripe checkout session for subscription upgrade","operationId":"create_checkout_session_v1_billing_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/status":{"get":{"tags":["billing"],"summary":"Check subscription and usage status","operationId":"get_billing_status_v1_billing_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/upgrade":{"post":{"tags":["billing"],"summary":"Upgrade tier (webhook-driven, placeholder)","operationId":"upgrade_tier_v1_billing_upgrade_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeTierRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/webhook":{"post":{"tags":["billing"],"summary":"Receive Stripe payment and subscription webhook events","operationId":"billing_webhook_v1_billing_webhook_post","parameters":[{"name":"Stripe-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingWebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/tiers":{"get":{"tags":["billing"],"summary":"List available billing tiers","operationId":"list_tiers_v1_billing_tiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Tiers V1 Billing Tiers Get"}}}}}}},"/v1/usage":{"get":{"tags":["usage"],"summary":"Get current API usage for your key","operationId":"get_usage_v1_usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":30,"minimum":1,"description":"Number of days of history to return","default":7,"title":"Days"},"description":"Number of days of history to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/agents/search":{"get":{"tags":["agent-native"],"summary":"Agent-optimized natural language product search","description":"Agent-optimized product search with natural language processing.\nReturns enhanced results with confidence scores, availability predictions, and competitor counts.","operationId":"agent_search_v2_agents_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Natural language search query","title":"Q"},"description":"Natural language search query"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of results to return","default":10,"title":"Limit"},"description":"Number of results to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source platform","title":"Source"},"description":"Filter by source platform"},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by platform (alias for source)","title":"Platform"},"description":"Filter by platform (alias for source)"},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Minimum price filter","title":"Min Price"},"description":"Minimum price filter"},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Maximum price filter","title":"Max Price"},"description":"Maximum price filter"},{"name":"price_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Minimum price filter (alias for min_price)","title":"Price Min"},"description":"Minimum price filter (alias for min_price)"},{"name":"price_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Maximum price filter (alias for max_price)","title":"Price Max"},"description":"Maximum price filter (alias for max_price)"},{"name":"availability","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by availability","title":"Availability"},"description":"Filter by availability"},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","description":"Sort by: relevance, price_asc, price_desc, newest","default":"relevance","title":"Sort By"},"description":"Sort by: relevance, price_asc, price_desc, newest"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/agents/price-comparison":{"get":{"tags":["agent-native"],"summary":"Agent-optimized price comparison across platforms","description":"Agent-optimized price comparison that finds the same product across multiple platforms\nand returns results sorted by price with savings calculations.","operationId":"agent_price_comparison_v2_agents_price_comparison_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Product name to compare prices for","title":"Product Name"},"description":"Product name to compare prices for"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Maximum number of results to return","default":10,"title":"Limit"},"description":"Maximum number of results to return"},{"name":"sources","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Specific sources to include","title":"Sources"},"description":"Specific sources to include"},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Country code filter","title":"Country"},"description":"Country code filter"},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Minimum price filter","title":"Min Price"},"description":"Minimum price filter"},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Maximum price filter","title":"Max Price"},"description":"Maximum price filter"},{"name":"availability_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only show products that are in stock","default":false,"title":"Availability Only"},"description":"Only show products that are in stock"},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","description":"Sort by: price_asc, price_desc, relevance, newest","default":"price_asc","title":"Sort By"},"description":"Sort by: price_asc, price_desc, relevance, newest"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPriceComparisonResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/agents/explore":{"get":{"tags":["v2"],"summary":"Explore products for agent discovery (v2 API)","description":"Get a randomized selection of products for agent exploration and discovery.\nThis endpoint is optimized for agents that need to discover products without\nspecific search queries, enabling serendipitous discovery and market analysis.","operationId":"v2_agents_explore_v2_agents_explore_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by brand","title":"Brand"},"description":"Filter by brand"},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Minimum price","title":"Min Price"},"description":"Minimum price"},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Maximum price","title":"Max Price"},"description":"Maximum price"},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by platform (source)","title":"Platform"},"description":"Filter by platform (source)"},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by country code (SG, MY, etc.)","title":"Country"},"description":"Filter by country code (SG, MY, etc.)"},{"name":"in_stock","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by availability","title":"In Stock"},"description":"Filter by availability"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Number of products to return","default":10,"title":"Limit"},"description":"Number of products to return"},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Target currency. Supported: AUD, CNY, EUR, GBP, HKD, IDR, JPY, MYR, PHP, SGD, THB, USD, VND","title":"Currency"},"description":"Target currency. Supported: AUD, CNY, EUR, GBP, HKD, IDR, JPY, MYR, PHP, SGD, THB, USD, VND"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/agents/batch-lookup":{"post":{"tags":["agent-native"],"summary":"Agent-optimized batch product lookup","description":"Agent-optimized batch product lookup for efficiently retrieving multiple products\nby ID with optional metadata, price history, and affiliate links.","operationId":"agent_batch_lookup_v2_agents_batch_lookup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBatchLookupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBatchLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/agents/compare-bulk":{"post":{"tags":["agent-native"],"summary":"Agent-optimized bulk price comparison across multiple products","description":"Agent-native bulk price comparison for multiple product queries in a single request.\nAccepts product names or SKUs and returns consolidated comparison data across all platforms.","operationId":"agent_compare_bulk_v2_agents_compare_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBulkCompareRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBulkCompareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/products":{"get":{"tags":["v2"],"summary":"List and search products (v2 API)","operationId":"v2_list_products_v2_products_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Full-text search query","title":"Q"},"description":"Full-text search query"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by brand","title":"Brand"},"description":"Filter by brand"},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Minimum price","title":"Min Price"},"description":"Minimum price"},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"description":"Maximum price","title":"Max Price"},"description":"Maximum price"},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by platform (source)","title":"Platform"},"description":"Filter by platform (source)"},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by country code (SG, MY, etc.)","title":"Country"},"description":"Filter by country code (SG, MY, etc.)"},{"name":"in_stock","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by availability","title":"In Stock"},"description":"Filter by availability"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort: relevance, price_asc, price_desc, newest","title":"Sort By"},"description":"Sort: relevance, price_asc, price_desc, newest"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Offset"}},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Target currency. Supported: AUD, CNY, EUR, GBP, HKD, IDR, JPY, MYR, PHP, SGD, THB, USD, VND","title":"Currency"},"description":"Target currency. Supported: AUD, CNY, EUR, GBP, HKD, IDR, JPY, MYR, PHP, SGD, THB, USD, VND"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2ProductListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/products/{product_id}":{"get":{"tags":["v2"],"summary":"Get product by ID (v2 API)","operationId":"v2_get_product_v2_products__product_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Target currency for price conversion","title":"Currency"},"description":"Target currency for price conversion"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/search":{"get":{"tags":["v2"],"summary":"Search products (v2 API)","operationId":"v2_search_v2_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","maxLength":500,"description":"Search query","title":"Q"},"description":"Search query"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"}},{"name":"min_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Price"}},{"name":"max_price","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Price"}},{"name":"in_stock","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In Stock"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Offset"}},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/trending":{"get":{"tags":["v2"],"summary":"Get trending products (v2 API)","operationId":"v2_trending_v2_trending_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Time period: 1d, 7d, 30d","default":"7d","title":"Period"},"description":"Time period: 1d, 7d, 30d"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/products/batch-details":{"post":{"tags":["v2"],"summary":"Batch product lookup optimized for agents","description":"Optimized batch endpoint for agent decision-making with minimal payload","operationId":"v2_batch_product_details_v2_products_batch_details_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchProductRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v2/health":{"get":{"tags":["v2"],"summary":"V2 Health","operationId":"v2_health_v2_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v2":{"get":{"tags":["v2"],"summary":"V2 Root","operationId":"v2_root_v2_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/saved-searches":{"get":{"tags":["saved-searches"],"summary":"List saved searches","operationId":"list_saved_searches_v1_saved_searches_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["saved-searches"],"summary":"Save a search query","operationId":"create_saved_search_v1_saved_searches_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/saved-searches/{saved_search_id}":{"get":{"tags":["saved-searches"],"summary":"Get a saved search","operationId":"get_saved_search_v1_saved_searches__saved_search_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"saved_search_id","in":"path","required":true,"schema":{"type":"string","title":"Saved Search Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["saved-searches"],"summary":"Update a saved search","operationId":"update_saved_search_v1_saved_searches__saved_search_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"saved_search_id","in":"path","required":true,"schema":{"type":"string","title":"Saved Search Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["saved-searches"],"summary":"Delete a saved search","operationId":"delete_saved_search_v1_saved_searches__saved_search_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"saved_search_id","in":"path","required":true,"schema":{"type":"string","title":"Saved Search Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/saved-searches/{saved_search_id}/results":{"get":{"tags":["saved-searches"],"summary":"Run saved search and return results","operationId":"run_saved_search_v1_saved_searches__saved_search_id__results_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"saved_search_id","in":"path","required":true,"schema":{"type":"string","title":"Saved Search Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page (1-100)","default":20,"title":"Limit"},"description":"Results per page (1-100)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Pagination offset (0-10000)","default":0,"title":"Offset"},"description":"Pagination offset (0-10000)"},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Target currency for price conversion","title":"Currency"},"description":"Target currency for price conversion"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/go/{tracking_id}":{"get":{"tags":["clickthrough"],"summary":"Click-through redirect with tracking","operationId":"clickthrough_redirect_go__tracking_id__get","parameters":[{"name":"tracking_id","in":"path","required":true,"schema":{"type":"string","title":"Tracking Id"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Click source (e.g., email, web, app)","title":"Source"},"description":"Click source (e.g., email, web, app)"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent ID that generated this tracking link","title":"Agent Id"},"description":"Agent ID that generated this tracking link"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/r/{slug}/{product_id}":{"get":{"tags":["clickthrough"],"summary":"Affiliate redirect with slug-based tracking","description":"Redirect to affiliate URL with affiliate-partner context logging.\n\nThis endpoint validates that the destination URL domain is in the allowed list\nbefore issuing the redirect, preventing open redirect attacks.","operationId":"affiliate_redirect_r__slug___product_id__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Click source (e.g., email, web, app)","title":"Source"},"description":"Click source (e.g., email, web, app)"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent ID that generated this tracking link","title":"Agent Id"},"description":"Agent ID that generated this tracking link"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referrals/codes":{"get":{"tags":["referrals"],"summary":"List your referral codes","operationId":"list_referral_codes_v1_referrals_codes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReferralCodeStatusResponse"},"type":"array","title":"Response List Referral Codes V1 Referrals Codes Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["referrals"],"summary":"Generate a referral code","operationId":"create_referral_code_v1_referrals_codes_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralCodeCreateResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/referrals/link":{"post":{"tags":["referrals"],"summary":"Get referral link with shareable copy","operationId":"get_referral_link_v1_referrals_link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","description":"Referral code to generate link for","title":"Code"},"description":"Referral code to generate link for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralShareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referrals/track-click":{"post":{"tags":["referrals"],"summary":"Track a referral link click","operationId":"track_referral_click_v1_referrals_track_click_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralLinkClickRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Track Referral Click V1 Referrals Track Click Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referrals/signup":{"post":{"tags":["referrals"],"summary":"Use a referral code","operationId":"track_referral_signup_v1_referrals_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralSignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralSignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/referrals/activate":{"post":{"tags":["referrals"],"summary":"Activate referral - rewards referrer when referee makes first API call","operationId":"activate_referral_v1_referrals_activate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Activate Referral V1 Referrals Activate Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/referrals/activations":{"get":{"tags":["referrals"],"summary":"Get referral activations/conversions","operationId":"get_referral_activations_v1_referrals_activations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReferralActivationResponse"},"type":"array","title":"Response Get Referral Activations V1 Referrals Activations Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/referrals/credits":{"get":{"tags":["referrals"],"summary":"Get referral credits summary","operationId":"calculate_referral_credits_v1_referrals_credits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralCreditsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/ref":{"get":{"tags":["referral-landing"],"summary":"Public referral landing page","operationId":"referral_landing_page_ref_get","parameters":[{"name":"ref","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Referral code","title":"Ref"},"description":"Referral code"}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ref/{code}":{"get":{"tags":["referral-landing"],"summary":"Public referral landing page with code","operationId":"referral_landing_with_code_ref__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referrals/intents":{"post":{"tags":["linkless-attribution"],"summary":"Create referral intent","operationId":"create_referral_intent_v1_referrals_intents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIntentRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/referrals/intents/{intent_id}":{"get":{"tags":["linkless-attribution"],"summary":"Get referral intent status","operationId":"get_referral_intent_v1_referrals_intents__intent_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"intent_id","in":"path","required":true,"schema":{"type":"string","title":"Intent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/promo-codes/reserve":{"post":{"tags":["linkless-attribution"],"summary":"Reserve an exclusive promo code for agent","operationId":"reserve_promo_code_v1_promo_codes_reserve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReservePromoRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoReservationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/referrals/session-claim":{"post":{"tags":["linkless-attribution"],"summary":"Bind referral token to merchant session","operationId":"create_session_claim_v1_referrals_session_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionClaimRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/conversions/linkless":{"post":{"tags":["linkless-attribution"],"summary":"Report a single linkless conversion","operationId":"report_linkless_conversion_v1_conversions_linkless_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinklessConversionRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/conversions/linkless/batch":{"post":{"tags":["linkless-attribution"],"summary":"Report batch linkless conversions (up to 100)","operationId":"report_batch_conversions_v1_conversions_linkless_batch_post","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LinklessConversionRequest"},"type":"array","title":"Body"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/commissions":{"get":{"tags":["linkless-attribution"],"summary":"List agent's commission decisions","operationId":"list_commissions_v1_commissions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommissionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/commissions/{commission_id}":{"get":{"tags":["linkless-attribution"],"summary":"Get commission decision detail","operationId":"get_commission_v1_commissions__commission_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"commission_id","in":"path","required":true,"schema":{"type":"string","title":"Commission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__linkless_attribution__CommissionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scraper-assignments":{"get":{"tags":["scraper_assignments"],"summary":"List all scraper assignments","operationId":"list_assignments_v1_scraper_assignments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","description":"Filter to active assignments only","default":false,"title":"Active Only"},"description":"Filter to active assignments only"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScraperAssignmentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["scraper_assignments"],"summary":"Create or update an assignment","operationId":"create_or_update_assignment_v1_scraper_assignments_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScraperAssignmentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScraperAssignmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scraper-assignments/agent/{agent_id}":{"get":{"tags":["scraper_assignments"],"summary":"Get all assignments for an agent","operationId":"get_agent_assignments_v1_scraper_assignments_agent__agent_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScraperAssignmentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scraper-assignments/{platform}":{"get":{"tags":["scraper_assignments"],"summary":"Get assignment for a platform","operationId":"get_platform_assignment_v1_scraper_assignments__platform__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScraperAssignmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["scraper_assignments"],"summary":"Update an assignment","operationId":"update_assignment_v1_scraper_assignments__platform__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScraperAssignmentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScraperAssignmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["scraper_assignments"],"summary":"Remove an assignment","operationId":"delete_assignment_v1_scraper_assignments__platform__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scraper-assignments/claim/{platform}":{"post":{"tags":["scraper_assignments"],"summary":"Agent claims a platform for scraping","operationId":"claim_platform_v1_scraper_assignments_claim__platform__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}},{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","description":"Agent ID claiming the platform","title":"Agent Id"},"description":"Agent ID claiming the platform"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScraperAssignmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scraper-assignments/release/{platform}":{"post":{"tags":["scraper_assignments"],"summary":"Agent releases a platform","operationId":"release_platform_v1_scraper_assignments_release__platform__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}},{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","description":"Agent ID releasing the platform","title":"Agent Id"},"description":"Agent ID releasing the platform"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scraper-assignments/heartbeat/{platform}":{"post":{"tags":["scraper_assignments"],"summary":"Update agent heartbeat for a platform","operationId":"heartbeat_platform_v1_scraper_assignments_heartbeat__platform__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}},{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","description":"Agent ID sending heartbeat","title":"Agent Id"},"description":"Agent ID sending heartbeat"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScraperAssignmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scraper-assignments/auto-heartbeat/{platform}":{"post":{"tags":["scraper_assignments"],"summary":"Trigger auto-heartbeat for a platform (force scrape)","operationId":"trigger_platform_auto_heartbeat_v1_scraper_assignments_auto_heartbeat__platform__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}},{"name":"reason","in":"query","required":false,"schema":{"type":"string","description":"Reason for auto-heartbeat trigger","default":"manual_trigger","title":"Reason"},"description":"Reason for auto-heartbeat trigger"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scraper-alerts/configs":{"get":{"tags":["scraper_alerts"],"summary":"List scraper alert configurations","operationId":"list_alert_configs_v1_scraper_alerts_configs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source","title":"Source"},"description":"Filter by source"},{"name":"enabled_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only return enabled configs","default":true,"title":"Enabled Only"},"description":"Only return enabled configs"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertConfigListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["scraper_alerts"],"summary":"Create scraper alert configuration","operationId":"create_alert_config_v1_scraper_alerts_configs_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScraperAlertConfigCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScraperAlertConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scraper-alerts/configs/{config_id}":{"delete":{"tags":["scraper_alerts"],"summary":"Delete scraper alert configuration","operationId":"delete_alert_config_v1_scraper_alerts_configs__config_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scraper-alerts/evaluate":{"get":{"tags":["scraper_alerts"],"summary":"Evaluate scraper health and trigger alerts","operationId":"evaluate_alerts_v1_scraper_alerts_evaluate_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"record","in":"query","required":false,"schema":{"type":"boolean","description":"Record triggered alerts to log","default":true,"title":"Record"},"description":"Record triggered alerts to log"},{"name":"send","in":"query","required":false,"schema":{"type":"boolean","description":"Send alerts via webhook/email","default":true,"title":"Send"},"description":"Send alerts via webhook/email"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scraper-alerts/logs":{"get":{"tags":["scraper_alerts"],"summary":"Get recent scraper alert history","operationId":"get_alert_logs_v1_scraper_alerts_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source","title":"Source"},"description":"Filter by source"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Max results to return","default":50,"title":"Limit"},"description":"Max results to return"},{"name":"since_hours","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":720,"minimum":1},{"type":"null"}],"description":"Only return alerts from last N hours","title":"Since Hours"},"description":"Only return alerts from last N hours"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertLogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scraper-alerts/growth/snapshot":{"post":{"tags":["scraper_alerts"],"summary":"Record catalog growth snapshot","operationId":"record_growth_v1_scraper_alerts_growth_snapshot_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrowthSnapshotResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/scraper-alerts/growth/rate":{"get":{"tags":["scraper_alerts"],"summary":"Get catalog growth rate over time","operationId":"get_growth_rate_v1_scraper_alerts_growth_rate_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source","title":"Source"},"description":"Filter by source"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Number of days to analyze","default":7,"title":"Days"},"description":"Number of days to analyze"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrowthRateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scraper/refresh-by-product-ids":{"post":{"tags":["scraper"],"summary":"Trigger targeted refresh for specific product IDs","description":"Trigger a targeted refresh for a list of product IDs.\nThis is intended to be used by the nightly price-refresh job to update specific comparison SKUs.\n\nSteps:\n1. Validate the input: expect a JSON object with a key \"product_ids\" that is a list of integers.\n2. Fetch the products from the database to get their source (platform) and SKU.\n3. Group the products by source (platform).\n4. For each platform, use the ingestion pipeline's targeted refresh to fetch and process the products.\n5. Return a summary of the refresh operation.\n\nNote: This endpoint does not return the updated product data, but rather a summary of the operation.","operationId":"refresh_by_product_ids_v1_scraper_refresh_by_product_ids_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":{"items":{"type":"integer"},"type":"array"},"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Refresh By Product Ids V1 Scraper Refresh By Product Ids Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/newsletter/subscribe":{"post":{"tags":["newsletter"],"summary":"Subscribe to developer newsletter","description":"Subscribe to the developer newsletter for API changelog and feature updates.\n\nRate limited to 10 subscriptions per IP per hour.","operationId":"newsletter_subscribe_v1_newsletter_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsletterSubscriptionCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsletterSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/newsletter/unsubscribe":{"delete":{"tags":["newsletter"],"summary":"Unsubscribe from developer newsletter","description":"Unsubscribe from the developer newsletter.","operationId":"newsletter_unsubscribe_v1_newsletter_unsubscribe_delete","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Newsletter Unsubscribe V1 Newsletter Unsubscribe Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/newsletter/subscribers":{"get":{"tags":["newsletter"],"summary":"Get all active newsletter subscribers","description":"Get all active newsletter subscribers (admin endpoint).","operationId":"get_subscribers_v1_newsletter_subscribers_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NewsletterSubscriptionResponse"},"title":"Response Get Subscribers V1 Newsletter Subscribers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me/watchlist":{"post":{"tags":["user-watchlist"],"summary":"Add a US product to user watchlist","operationId":"add_to_user_watchlist_api_auth_me_watchlist_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWatchlistAddRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWatchlistItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["user-watchlist"],"summary":"List user watchlist items (US products)","operationId":"list_user_watchlist_api_auth_me_watchlist_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWatchlistListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me/watchlist/{item_id}":{"delete":{"tags":["user-watchlist"],"summary":"Remove from user watchlist","operationId":"remove_from_user_watchlist_api_auth_me_watchlist__item_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me/watchlist/{item_id}/alerts":{"post":{"tags":["user-watchlist"],"summary":"Create a price alert from a watchlist item","operationId":"create_alert_from_watchlist_api_auth_me_watchlist__item_id__alerts_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistAlertCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__watchlist__WatchlistAlertResponse__2"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me/alerts":{"get":{"tags":["user_alerts"],"summary":"List price alerts for authenticated user","operationId":"list_user_alerts_api_auth_me_alerts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAlertListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["user_alerts"],"summary":"Create a user price alert","operationId":"create_user_alert_api_auth_me_alerts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAlertCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAlertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/me/alerts/{alert_id}":{"delete":{"tags":["user_alerts"],"summary":"Delete a price alert","operationId":"delete_user_alert_api_auth_me_alerts__alert_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","title":"Alert Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/alerts":{"post":{"tags":["public_alerts"],"summary":"Subscribe to price drop alerts","operationId":"create_public_alert_api_alerts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAlertCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAlertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/signup":{"post":{"tags":["auth"],"summary":"User signup for price alerts and watchlist","operationId":"user_signup_api_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"tags":["auth"],"summary":"User login for price alerts and watchlist","operationId":"user_login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me":{"get":{"tags":["auth"],"summary":"Get current user profile","operationId":"user_me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/me/push/service-worker.js":{"get":{"tags":["push_notifications"],"summary":"Get service worker script for push notifications","operationId":"get_service_worker_api_auth_me_push_service_worker_js_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/me/push/manifest.json":{"get":{"tags":["push_notifications"],"summary":"Get push notification manifest","operationId":"get_push_manifest_api_auth_me_push_manifest_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/me/push/vapid-public-key":{"get":{"tags":["push_notifications"],"summary":"Get VAPID public key for push subscription","operationId":"get_vapid_public_key_api_auth_me_push_vapid_public_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/me/push":{"get":{"tags":["push_notifications"],"summary":"List push subscriptions for authenticated user","operationId":"list_push_subscriptions_api_auth_me_push_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscriptionListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["push_notifications"],"summary":"Subscribe to push notifications","operationId":"subscribe_to_push_api_auth_me_push_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscriptionRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/me/push/{subscription_id}":{"delete":{"tags":["push_notifications"],"summary":"Unsubscribe from push notifications","operationId":"unsubscribe_from_push_api_auth_me_push__subscription_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me/push/by-endpoint":{"delete":{"tags":["push_notifications"],"summary":"Unsubscribe by endpoint URL","operationId":"unsubscribe_by_endpoint_api_auth_me_push_by_endpoint_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"endpoint","in":"query","required":true,"schema":{"type":"string","title":"Endpoint"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/notifications":{"get":{"tags":["user_notification_preferences"],"summary":"Get notification preferences for authenticated user","operationId":"get_notification_preferences_api_me_notifications_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotificationPreferenceResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["user_notification_preferences"],"summary":"Set notification preferences for authenticated user","operationId":"set_notification_preferences_api_me_notifications_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotificationPreferenceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotificationPreferenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/growth/track/signup":{"post":{"tags":["growth"],"summary":"Track Developer Signup","operationId":"track_developer_signup_growth_track_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupTrackingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupTrackingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/growth/track/first-query":{"post":{"tags":["growth"],"summary":"Track First Query","operationId":"track_first_query_growth_track_first_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirstQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirstQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/growth/track/playground":{"post":{"tags":["growth"],"summary":"Track Playground Use","operationId":"track_playground_use_growth_track_playground_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/growth/track/docs-first":{"post":{"tags":["growth"],"summary":"Track Docs First","operationId":"track_docs_first_growth_track_docs_first_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/growth/metrics/daily":{"get":{"tags":["growth"],"summary":"Get Daily Metrics","operationId":"get_daily_metrics_growth_metrics_daily_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/app__routers__growth__MetricsResponse"},"title":"Response Get Daily Metrics Growth Metrics Daily Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/growth/metrics/experiments/{experiment_name}":{"get":{"tags":["growth"],"summary":"Get Experiment Metrics","operationId":"get_experiment_metrics_growth_metrics_experiments__experiment_name__get","parameters":[{"name":"experiment_name","in":"path","required":true,"schema":{"type":"string","title":"Experiment Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/growth/metrics/activation":{"get":{"tags":["growth"],"summary":"Get Activation Metrics","operationId":"get_activation_metrics_growth_metrics_activation_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/growth/drip/status":{"get":{"tags":["growth"],"summary":"Get Email Drip Status","operationId":"get_email_drip_status_growth_drip_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EmailDripStatusResponse"},"type":"array","title":"Response Get Email Drip Status Growth Drip Status Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/growth/experiments":{"get":{"tags":["growth"],"summary":"List Experiments","operationId":"list_experiments_growth_experiments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/growth/experiments/{experiment_name}/assign":{"get":{"tags":["growth"],"summary":"Get Assignment","operationId":"get_assignment_growth_experiments__experiment_name__assign_get","parameters":[{"name":"experiment_name","in":"path","required":true,"schema":{"type":"string","title":"Experiment Name"}},{"name":"identifier","in":"query","required":true,"schema":{"type":"string","description":"Email or developer ID to assign","title":"Identifier"},"description":"Email or developer ID to assign"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/growth/experiments/assign":{"post":{"tags":["growth"],"summary":"Record Assignment","operationId":"record_assignment_growth_experiments_assign_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentAssignmentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentAssignmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/growth/experiments/{experiment_name}/convert":{"post":{"tags":["growth"],"summary":"Record Conversion","operationId":"record_conversion_growth_experiments__experiment_name__convert_post","parameters":[{"name":"experiment_name","in":"path","required":true,"schema":{"type":"string","title":"Experiment Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentConversionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentConversionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/growth/track/cta":{"post":{"tags":["growth"],"summary":"Track Cta","operationId":"track_cta_growth_track_cta_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CTATrackingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CTATrackingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/growth/ab/{experiment_name}":{"get":{"tags":["growth"],"summary":"Get Ab Assignment","operationId":"get_ab_assignment_growth_ab__experiment_name__get","parameters":[{"name":"experiment_name","in":"path","required":true,"schema":{"type":"string","title":"Experiment Name"}},{"name":"identifier","in":"query","required":true,"schema":{"type":"string","description":"Visitor or developer ID for consistent assignment","title":"Identifier"},"description":"Visitor or developer ID for consistent assignment"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ABTestAssignmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/growth/track/session":{"post":{"tags":["growth"],"summary":"Track Directory Session","operationId":"track_directory_session_growth_track_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDirectorySessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDirectorySessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/growth/track/signup-start":{"post":{"tags":["growth"],"summary":"Track Signup Start","operationId":"track_signup_start_growth_track_signup_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupStartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/growth/track/mention":{"post":{"tags":["growth"],"summary":"Track Inbound Mention","operationId":"track_inbound_mention_growth_track_mention_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundMentionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundMentionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/growth/metrics/agent-directory":{"get":{"tags":["growth"],"summary":"Get Agent Directory Metrics","operationId":"get_agent_directory_metrics_growth_metrics_agent_directory_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDirectoryMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/growth/metrics/activation-funnel":{"get":{"tags":["growth"],"summary":"Get Activation Funnel","operationId":"get_activation_funnel_growth_metrics_activation_funnel_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":7,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivationFunnelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/growth/metrics/inbound-mentions":{"get":{"tags":["growth"],"summary":"Get Inbound Mention Metrics","operationId":"get_inbound_mention_metrics_growth_metrics_inbound_mentions_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundMentionMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/signup/email":{"post":{"tags":["signup"],"summary":"Store US waitlist email signup","description":"Store email addresses from the US waitlist signup form.\n\nBody: `{ email: string, source: \"us-waitlist\" }`\n\nReturns 409 Conflict if email already exists.\nRate limited to 10 signups per IP per hour.","operationId":"signup_email_v1_signup_email_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsletterSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stats/products-count":{"get":{"tags":["stats"],"summary":"Get US product count","description":"Returns the count of active products in the US catalog.\n\nUsed on the US signup page hero to display live product count.","operationId":"get_us_products_count_v1_stats_products_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Us Products Count V1 Stats Products Count Get"}}}}}}},"/v1/admin/agent-health-report":{"post":{"tags":["admin"],"summary":"Generate and post weekly agent utilization report","operationId":"generate_agent_health_report_v1_admin_agent_health_report_post","parameters":[{"name":"X-Paperclip-Run-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Paperclip-Run-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["admin"],"summary":"Preview weekly agent utilization report (no posting)","operationId":"preview_agent_health_report_v1_admin_agent_health_report_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/metrics":{"get":{"tags":["prometheus"],"summary":"Prometheus metrics endpoint","operationId":"prometheus_metrics_api_v1_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/chatgpt-openapi.json":{"get":{"tags":["integrations"],"summary":"ChatGPT-compatible OpenAPI spec for GPT Builder","operationId":"chatgpt_openapi_chatgpt_openapi_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/ai-plugin.json":{"get":{"tags":["integrations"],"summary":"AI agent plugin manifest for ChatGPT/GPT Builder discovery","operationId":"ai_plugin_manifest__well_known_ai_plugin_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1":{"get":{"tags":["system"],"summary":"Api Root","operationId":"api_root_v1_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dashboard":{"get":{"tags":["system"],"summary":"Dashboard","operationId":"dashboard_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/playground":{"get":{"tags":["system"],"summary":"Playground","operationId":"playground_playground_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/status":{"get":{"tags":["system"],"summary":"Status Page","operationId":"status_page_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/test/error":{"get":{"tags":["system"],"summary":"Test endpoint to verify Sentry error tracking","operationId":"test_error_endpoint_v1_test_error_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ABTestAssignmentResponse":{"properties":{"experiment":{"type":"string","title":"Experiment"},"variant":{"type":"string","title":"Variant"},"identifier":{"type":"string","title":"Identifier"},"variant_value":{"type":"string","title":"Variant Value"},"cookie_name":{"type":"string","title":"Cookie Name"},"cookie_max_age":{"type":"integer","title":"Cookie Max Age"},"datalayer_payload":{"additionalProperties":true,"type":"object","title":"Datalayer Payload"}},"type":"object","required":["experiment","variant","identifier","variant_value","cookie_name","cookie_max_age","datalayer_payload"],"title":"ABTestAssignmentResponse"},"AIModelCount":{"properties":{"model":{"type":"string","title":"Model"},"requests":{"type":"integer","title":"Requests"}},"type":"object","required":["model","requests"],"title":"AIModelCount"},"APIAnalyticsResponse":{"properties":{"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"total_requests":{"type":"integer","title":"Total Requests"},"unique_api_keys":{"type":"integer","title":"Unique Api Keys"},"ai_models":{"items":{"$ref":"#/components/schemas/AIModelCount"},"type":"array","title":"Ai Models"},"regions":{"items":{"$ref":"#/components/schemas/RegionCount"},"type":"array","title":"Regions"},"top_keywords":{"items":{"$ref":"#/components/schemas/TopKeyword"},"type":"array","title":"Top Keywords"},"top_categories":{"items":{"$ref":"#/components/schemas/TopCategory"},"type":"array","title":"Top Categories"},"mcp_tools":{"items":{"$ref":"#/components/schemas/MCPToolCount"},"type":"array","title":"Mcp Tools"},"daily_breakdown":{"items":{"$ref":"#/components/schemas/DailyAnalyticsSummary"},"type":"array","title":"Daily Breakdown"}},"type":"object","required":["period_start","period_end","total_requests","unique_api_keys","ai_models","regions","top_keywords","top_categories","mcp_tools","daily_breakdown"],"title":"APIAnalyticsResponse"},"APIResponseTimeHealth":{"properties":{"endpoint":{"type":"string","title":"Endpoint"},"latency_ms":{"type":"number","title":"Latency Ms"},"ok":{"type":"boolean","title":"Ok"}},"type":"object","required":["endpoint","latency_ms","ok"],"title":"APIResponseTimeHealth"},"ActivationFunnelResponse":{"properties":{"total_api_keys":{"type":"integer","title":"Total Api Keys"},"keys_with_first_query":{"type":"integer","title":"Keys With First Query"},"median_latency_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Latency Seconds"},"p25_latency_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P25 Latency Seconds"},"p75_latency_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P75 Latency Seconds"},"activation_rate_7d":{"type":"number","title":"Activation Rate 7D"},"signups_total":{"type":"integer","title":"Signups Total"},"signups_activated_7d":{"type":"integer","title":"Signups Activated 7D"}},"type":"object","required":["total_api_keys","keys_with_first_query","median_latency_seconds","p25_latency_seconds","p75_latency_seconds","activation_rate_7d","signups_total","signups_activated_7d"],"title":"ActivationFunnelResponse"},"AdminStatsResponse":{"properties":{"total_products":{"type":"integer","title":"Total Products"},"products_by_source":{"additionalProperties":{"type":"integer"},"type":"object","title":"Products By Source"},"products_by_category":{"items":{"$ref":"#/components/schemas/CategoryCount"},"type":"array","title":"Products By Category"},"total_api_keys":{"type":"integer","title":"Total Api Keys"},"active_keys_last_24h":{"type":"integer","title":"Active Keys Last 24H"},"total_clicks_today":{"type":"integer","title":"Total Clicks Today"},"total_clicks_week":{"type":"integer","title":"Total Clicks Week"},"top_clicked_products":{"items":{"$ref":"#/components/schemas/TopClickedProduct"},"type":"array","title":"Top Clicked Products"},"total_searches_today":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Searches Today"},"data_freshness":{"$ref":"#/components/schemas/DataFreshness"}},"type":"object","required":["total_products","products_by_source","products_by_category","total_api_keys","active_keys_last_24h","total_clicks_today","total_clicks_week","top_clicked_products","total_searches_today","data_freshness"],"title":"AdminStatsResponse"},"AffiliateLinkRequest":{"properties":{"product_url":{"type":"string","title":"Product Url","description":"Product URL to generate affiliate link for"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform","description":"Platform override if URL is ambiguous"},"product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Product Id","description":"Product ID for click tracking"}},"type":"object","required":["product_url"],"title":"AffiliateLinkRequest"},"AffiliateLinkResponse":{"properties":{"original_url":{"type":"string","title":"Original Url"},"affiliate_url":{"type":"string","title":"Affiliate Url"},"platform":{"type":"string","title":"Platform"},"tracking_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Id"},"is_tracked":{"type":"boolean","title":"Is Tracked","default":false}},"type":"object","required":["original_url","affiliate_url","platform"],"title":"AffiliateLinkResponse"},"AgentBatchLookupItem":{"properties":{"id":{"type":"integer","title":"Id"},"sku":{"type":"string","title":"Sku"},"source":{"type":"string","title":"Source"},"title":{"type":"string","title":"Title"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency","default":"SGD"},"price_sgd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price Sgd"},"url":{"type":"string","title":"Url"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"review_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Review Count"},"is_available":{"type":"boolean","title":"Is Available"},"in_stock":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In Stock"},"stock_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stock Level"},"confidence_score":{"type":"number","title":"Confidence Score","description":"Data confidence score (0-1)","default":1.0},"availability_prediction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Availability Prediction","description":"Predicted availability"},"competitor_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Competitor Count","description":"Number of sellers offering this product"},"buybox_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Buybox Price","description":"Current buybox price"},"affiliate_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Url","description":"Affiliate link for monetization"},"data_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Data Updated At","description":"When the product data was last updated"},"metadata_":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Product metadata"},"specs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Specs","description":"Product specifications"},"price_history":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Price History","description":"Recent price history"}},"type":"object","required":["id","sku","source","title","price","url","is_available"],"title":"AgentBatchLookupItem"},"AgentBatchLookupRequest":{"properties":{"product_ids":{"items":{"type":"integer"},"type":"array","title":"Product Ids","description":"List of product IDs to lookup"},"include_metadata":{"type":"boolean","title":"Include Metadata","description":"Include metadata and specs in response","default":true},"include_price_history":{"type":"boolean","title":"Include Price History","description":"Include recent price history","default":false},"target_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Currency","description":"Convert prices to target currency (USD, EUR, etc.)"},"affiliate_links":{"type":"boolean","title":"Affiliate Links","description":"Include affiliate URLs for monetization","default":true}},"type":"object","required":["product_ids"],"title":"AgentBatchLookupRequest","examples":[{"product_ids":[1,2,3]}]},"AgentBatchLookupResponse":{"properties":{"total":{"type":"integer","title":"Total"},"found":{"type":"integer","title":"Found"},"not_found":{"type":"integer","title":"Not Found"},"not_found_ids":{"items":{"type":"integer"},"type":"array","title":"Not Found Ids"},"products":{"items":{"$ref":"#/components/schemas/AgentBatchLookupItem"},"type":"array","title":"Products"},"errors":{"items":{"$ref":"#/components/schemas/BatchItemError"},"type":"array","title":"Errors","description":"Per-item errors for failed lookups with error codes and retry hints"},"cache_hit_rate":{"type":"number","title":"Cache Hit Rate","description":"Percentage of results served from cache (0-1)"},"query_time_ms":{"type":"number","title":"Query Time Ms","description":"Query execution time in milliseconds"},"requested_at":{"type":"string","format":"date-time","title":"Requested At"}},"type":"object","required":["total","found","not_found","products","cache_hit_rate","query_time_ms"],"title":"AgentBatchLookupResponse"},"AgentBulkCompareQuery":{"properties":{"query":{"type":"string","maxLength":500,"minLength":1,"title":"Query","description":"Product name or SKU to compare across platforms"},"limit":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Limit","description":"Max results per query","default":5}},"type":"object","required":["query"],"title":"AgentBulkCompareQuery"},"AgentBulkCompareQueryResult":{"properties":{"query":{"type":"string","title":"Query","description":"Original query string"},"total_results":{"type":"integer","title":"Total Results","default":0},"price_stats":{"additionalProperties":true,"type":"object","title":"Price Stats"},"results":{"items":{"$ref":"#/components/schemas/AgentBulkCompareResultItem"},"type":"array","title":"Results"},"best_deal":{"anyOf":[{"$ref":"#/components/schemas/AgentBulkCompareResultItem"},{"type":"null"}]}},"type":"object","required":["query"],"title":"AgentBulkCompareQueryResult"},"AgentBulkCompareRequest":{"properties":{"queries":{"items":{"$ref":"#/components/schemas/AgentBulkCompareQuery"},"type":"array","maxItems":10,"minItems":1,"title":"Queries","description":"List of product queries (names or SKUs) to compare"},"sources":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sources","description":"Specific sources to include (empty = all)"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Country code filter (SG, MY, etc.)"},"availability_only":{"type":"boolean","title":"Availability Only","description":"Only show products that are in stock","default":false}},"type":"object","required":["queries"],"title":"AgentBulkCompareRequest"},"AgentBulkCompareResponse":{"properties":{"total_queries":{"type":"integer","title":"Total Queries"},"successful_queries":{"type":"integer","title":"Successful Queries"},"failed_queries":{"type":"integer","title":"Failed Queries"},"results":{"items":{"$ref":"#/components/schemas/AgentBulkCompareQueryResult"},"type":"array","title":"Results"},"query_time_ms":{"type":"number","title":"Query Time Ms"},"requested_at":{"type":"string","format":"date-time","title":"Requested At"}},"type":"object","required":["total_queries","successful_queries","failed_queries","results","query_time_ms"],"title":"AgentBulkCompareResponse"},"AgentBulkCompareResultItem":{"properties":{"id":{"type":"integer","title":"Id"},"sku":{"type":"string","title":"Sku"},"source":{"type":"string","title":"Source"},"title":{"type":"string","title":"Title"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency","default":"SGD"},"price_sgd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price Sgd"},"url":{"type":"string","title":"Url"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"review_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Review Count"},"is_available":{"type":"boolean","title":"Is Available"},"in_stock":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In Stock"},"stock_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stock Level"},"confidence_score":{"type":"number","title":"Confidence Score","default":1.0},"price_rank":{"type":"integer","title":"Price Rank","default":0},"savings_vs_avg":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Savings Vs Avg"},"savings_vs_max":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Savings Vs Max"},"affiliate_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Url"},"competitor_count":{"type":"integer","title":"Competitor Count","default":0},"buybox_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Buybox Price"}},"type":"object","required":["id","sku","source","title","price","url","is_available"],"title":"AgentBulkCompareResultItem"},"AgentDirectoryMetricsResponse":{"properties":{"period_days":{"type":"integer","title":"Period Days"},"source":{"type":"string","title":"Source"},"total_sessions":{"type":"integer","title":"Total Sessions"},"qualified_sessions":{"type":"integer","title":"Qualified Sessions"},"total_signups":{"type":"integer","title":"Total Signups"},"signups_with_first_call":{"type":"integer","title":"Signups With First Call"},"visitor_to_signup_rate":{"type":"number","title":"Visitor To Signup Rate"},"pass_threshold":{"additionalProperties":true,"type":"object","title":"Pass Threshold"},"scale_threshold":{"additionalProperties":true,"type":"object","title":"Scale Threshold"}},"type":"object","required":["period_days","source","total_sessions","qualified_sessions","total_signups","signups_with_first_call","visitor_to_signup_rate","pass_threshold","scale_threshold"],"title":"AgentDirectoryMetricsResponse"},"AgentDirectorySessionRequest":{"properties":{"source":{"type":"string","title":"Source"},"session_id":{"type":"string","title":"Session Id"},"visitor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Id"},"developer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Developer Id"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Content"},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Term"},"referring_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referring Url"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"}},"type":"object","required":["source","session_id"],"title":"AgentDirectorySessionRequest"},"AgentDirectorySessionResponse":{"properties":{"tracked":{"type":"boolean","title":"Tracked"},"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["tracked","session_id"],"title":"AgentDirectorySessionResponse"},"AgentPriceComparisonItem":{"properties":{"id":{"type":"integer","title":"Id"},"sku":{"type":"string","title":"Sku"},"source":{"type":"string","title":"Source"},"title":{"type":"string","title":"Title"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency","default":"SGD"},"price_sgd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price Sgd"},"url":{"type":"string","title":"Url"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"review_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Review Count"},"is_available":{"type":"boolean","title":"Is Available"},"in_stock":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In Stock"},"stock_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stock Level"},"confidence_score":{"type":"number","title":"Confidence Score","description":"Confidence in product match (0-1)","default":1.0},"price_rank":{"type":"integer","title":"Price Rank","description":"Rank by price (1 = cheapest)"},"savings_vs_avg":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Savings Vs Avg","description":"Savings vs average price"},"savings_vs_max":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Savings Vs Max","description":"Savings vs most expensive"},"affiliate_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Url","description":"Affiliate link for monetization"},"buybox_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buybox Url","description":"Direct buybox/purchase URL if available"},"competitor_count":{"type":"integer","title":"Competitor Count","description":"Number of competitors selling the same SKU","default":0},"buybox_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Buybox Price","description":"Lowest price for this product across all sources"}},"type":"object","required":["id","sku","source","title","price","url","is_available","price_rank"],"title":"AgentPriceComparisonItem"},"AgentPriceComparisonResponse":{"properties":{"query":{"type":"string","title":"Query","description":"Original product name query"},"query_processed":{"type":"string","title":"Query Processed","description":"Normalized/search-optimized version of query"},"total_results":{"type":"integer","title":"Total Results"},"limit":{"type":"integer","title":"Limit"},"offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset"},"has_more":{"type":"boolean","title":"Has More"},"price_stats":{"additionalProperties":true,"type":"object","title":"Price Stats","description":"Price statistics: min, max, avg, median"},"results":{"items":{"$ref":"#/components/schemas/AgentPriceComparisonItem"},"type":"array","title":"Results"},"query_time_ms":{"type":"number","title":"Query Time Ms","description":"Query execution time in milliseconds"},"cache_hit":{"type":"boolean","title":"Cache Hit","description":"Whether result was served from cache","default":false},"best_deal":{"anyOf":[{"$ref":"#/components/schemas/AgentPriceComparisonItem"},{"type":"null"}],"description":"Best overall deal considering price, availability, and rating"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Cursor for pagination (base64-encoded integer offset)"}},"type":"object","required":["query","query_processed","total_results","limit","has_more","price_stats","results","query_time_ms"],"title":"AgentPriceComparisonResponse"},"AgentPriceHistoryItem":{"properties":{"price":{"type":"number","title":"Price"},"currency":{"type":"string","title":"Currency","default":"SGD"},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["price","timestamp"],"title":"AgentPriceHistoryItem"},"AgentSearchResponse":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset"},"has_more":{"type":"boolean","title":"Has More"},"query_processed":{"type":"string","title":"Query Processed","description":"Normalized/search-optimized version of query"},"results":{"items":{"$ref":"#/components/schemas/AgentSearchResult"},"type":"array","title":"Results"},"query_time_ms":{"type":"number","title":"Query Time Ms","description":"Query execution time in milliseconds"},"cache_hit":{"type":"boolean","title":"Cache Hit","description":"Whether result was served from cache","default":false},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Cursor for pagination (base64-encoded timestamp)"}},"type":"object","required":["total","limit","has_more","query_processed","results","query_time_ms"],"title":"AgentSearchResponse"},"AgentSearchResult":{"properties":{"id":{"type":"integer","title":"Id"},"sku":{"type":"string","title":"Sku"},"source":{"type":"string","title":"Source"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency","default":"SGD"},"price_sgd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price Sgd"},"url":{"type":"string","title":"Url"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"category_path":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Category Path"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"review_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Review Count"},"is_available":{"type":"boolean","title":"Is Available"},"in_stock":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In Stock"},"stock_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stock Level"},"confidence_score":{"type":"number","title":"Confidence Score","description":"Confidence in result relevance (0-1)","default":1.0},"availability_prediction":{"anyOf":[{"$ref":"#/components/schemas/AvailabilityPrediction"},{"type":"null"}],"description":"Predicted availability: in_stock, low_stock, out_of_stock, unknown"},"competitor_count":{"type":"integer","title":"Competitor Count","description":"Number of other sellers offering this product","default":0},"buybox_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Buybox Price","description":"Current buybox/winners price"},"buybox_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Buybox Confidence","description":"Confidence in buybox price prediction (0-1)"},"affiliate_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Url","description":"Affiliate link for monetization"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headline","description":"Highlighted snippet from search result"},"data_freshness":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Data Freshness","description":"When this product data was last updated"},"price_trend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Trend","description":"Price trend: rising, falling, stable"},"price_change_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Change Percentage","description":"Percentage price change over last 7 days"},"demand_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Demand Score","description":"Estimated demand score based on search/query volume (0-100)"},"seasonal_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Seasonal Factor","description":"Seasonal demand multiplier (0.0-2.0)"},"agent_insights":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent Insights","description":"Additional agent-specific insights and recommendations"},"price_history":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentPriceHistoryItem"},"type":"array"},{"type":"null"}],"title":"Price History"},"price_stats":{"anyOf":[{"$ref":"#/components/schemas/app__schemas__agent__search__PriceStats"},{"type":"null"}]}},"type":"object","required":["id","sku","source","title","price","url","is_available"],"title":"AgentSearchResult"},"AgentSession":{"properties":{"session_id":{"type":"string","title":"Session Id"},"api_key_id":{"type":"string","title":"Api Key Id"},"developer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Developer Email"},"started_at":{"type":"string","title":"Started At"},"ended_at":{"type":"string","title":"Ended At"},"duration_seconds":{"type":"number","title":"Duration Seconds"},"call_count":{"type":"integer","title":"Call Count"},"calls":{"items":{"$ref":"#/components/schemas/ApiCallEntry"},"type":"array","title":"Calls"},"paths_used":{"items":{"type":"string"},"type":"array","title":"Paths Used"},"error_count":{"type":"integer","title":"Error Count"}},"type":"object","required":["session_id","api_key_id","developer_email","started_at","ended_at","duration_seconds","call_count","calls","paths_used","error_count"],"title":"AgentSession"},"AlertConfigListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"configs":{"items":{"$ref":"#/components/schemas/ScraperAlertConfigResponse"},"type":"array","title":"Configs"}},"type":"object","required":["total","configs"],"title":"AlertConfigListResponse"},"AlertCreateRequest":{"properties":{"product_id":{"type":"integer","title":"Product Id","description":"Product ID to monitor"},"target_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Target Price","description":"Trigger alert when price crosses target in the specified direction"},"direction":{"type":"string","enum":["below","above"],"title":"Direction","description":"Direction: 'below' or 'above'","default":"below"},"currency":{"type":"string","title":"Currency","description":"Currency for target price","default":"SGD"},"callback_url":{"type":"string","minLength":1,"format":"uri","title":"Callback Url","description":"Webhook URL to call when price condition is met"}},"type":"object","required":["product_id","target_price","callback_url"],"title":"AlertCreateRequest"},"AlertEvaluationResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"alerts_triggered":{"type":"integer","title":"Alerts Triggered"},"alerts":{"items":{"$ref":"#/components/schemas/AlertEvaluationResult"},"type":"array","title":"Alerts"},"dispatch_results":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dispatch Results"}},"type":"object","required":["generated_at","alerts_triggered","alerts"],"title":"AlertEvaluationResponse"},"AlertEvaluationResult":{"properties":{"source":{"type":"string","title":"Source"},"alert_type":{"type":"string","title":"Alert Type"},"message":{"type":"string","title":"Message"},"severity":{"type":"string","title":"Severity"},"rows_inserted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Inserted"},"rows_updated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Updated"},"rows_failed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Failed"}},"type":"object","required":["source","alert_type","message","severity","rows_inserted","rows_updated","rows_failed"],"title":"AlertEvaluationResult"},"AlertInfo":{"properties":{"type":{"type":"string","title":"Type"},"severity":{"type":"string","title":"Severity"},"source":{"type":"string","title":"Source"},"message":{"type":"string","title":"Message"},"hours_since_last_run":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hours Since Last Run"},"quality_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quality Score"}},"type":"object","required":["type","severity","source","message"],"title":"AlertInfo"},"AlertListResponse":{"properties":{"alerts":{"items":{"$ref":"#/components/schemas/AlertResponse"},"type":"array","title":"Alerts"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit","default":100}},"type":"object","required":["alerts","total"],"title":"AlertListResponse"},"AlertLogListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"alerts":{"items":{"$ref":"#/components/schemas/ScraperAlertLogResponse"},"type":"array","title":"Alerts"}},"type":"object","required":["total","alerts"],"title":"AlertLogListResponse"},"AlertResponse":{"properties":{"id":{"type":"string","title":"Id"},"product_id":{"type":"integer","title":"Product Id"},"target_price":{"type":"number","title":"Target Price"},"direction":{"type":"string","title":"Direction"},"currency":{"type":"string","title":"Currency"},"callback_url":{"type":"string","title":"Callback Url"},"is_active":{"type":"boolean","title":"Is Active"},"triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Triggered At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","product_id","target_price","direction","currency","callback_url","is_active","created_at"],"title":"AlertResponse"},"AnswerCreateRequest":{"properties":{"answer":{"type":"string","maxLength":5000,"minLength":5,"title":"Answer","description":"The answer text"},"author_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Id","description":"ID of the answering agent or user"}},"type":"object","required":["answer"],"title":"AnswerCreateRequest"},"AnswerResponse":{"properties":{"id":{"type":"integer","title":"Id"},"question_id":{"type":"integer","title":"Question Id"},"answer":{"type":"string","title":"Answer"},"answered_by":{"type":"string","title":"Answered By"},"answered_at":{"type":"string","format":"date-time","title":"Answered At"}},"type":"object","required":["id","question_id","answer","answered_by","answered_at"],"title":"AnswerResponse"},"ApiCallEntry":{"properties":{"timestamp":{"type":"string","title":"Timestamp"},"request_id":{"type":"string","title":"Request Id"},"method":{"type":"string","title":"Method"},"path":{"type":"string","title":"Path"},"status_code":{"type":"integer","title":"Status Code"},"duration_ms":{"type":"number","title":"Duration Ms"}},"type":"object","required":["timestamp","request_id","method","path","status_code","duration_ms"],"title":"ApiCallEntry"},"ApiKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"tier":{"type":"string","title":"Tier"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Content"},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Term"}},"type":"object","required":["id","name","tier","is_active","created_at"],"title":"ApiKeyResponse"},"AttributionResult":{"properties":{"matched":{"type":"boolean","title":"Matched"},"match_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Method"},"agent_credited":{"type":"boolean","title":"Agent Credited"},"commission_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Commission Amount"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["matched","agent_credited"],"title":"AttributionResult"},"AuthMeResponse":{"properties":{"key_id":{"type":"string","title":"Key Id"},"tier":{"type":"string","title":"Tier"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"developer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Developer Id"},"rate_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["key_id","tier"],"title":"AuthMeResponse"},"AutocompleteResponse":{"properties":{"query":{"type":"string","title":"Query"},"suggestions":{"items":{},"type":"array","title":"Suggestions"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["query","suggestions","total"],"title":"AutocompleteResponse"},"AvailabilityPrediction":{"type":"string","enum":["in_stock","low_stock","out_of_stock","unknown"],"title":"AvailabilityPrediction"},"BatchEnrichRequest":{"properties":{"product_ids":{"items":{"type":"integer"},"type":"array","maxItems":100,"minItems":1,"title":"Product Ids"},"min_confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Min Confidence","default":0.7}},"type":"object","required":["product_ids"],"title":"BatchEnrichRequest"},"BatchEnrichResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EnrichmentResult"},"type":"array","title":"Results"},"total_products":{"type":"integer","title":"Total Products"},"total_fields_enriched":{"type":"integer","title":"Total Fields Enriched"}},"type":"object","required":["results","total_products","total_fields_enriched"],"title":"BatchEnrichResponse"},"BatchFlagUpdateRequest":{"properties":{"updates":{"items":{"$ref":"#/components/schemas/FeatureFlagUpdateRequest"},"type":"array","title":"Updates"}},"type":"object","required":["updates"],"title":"BatchFlagUpdateRequest"},"BatchFlagUpdateResponse":{"properties":{"updates":{"items":{"$ref":"#/components/schemas/FeatureFlagUpdateResponse"},"type":"array","title":"Updates"},"message":{"type":"string","title":"Message"}},"type":"object","required":["updates","message"],"title":"BatchFlagUpdateResponse"},"BatchItemError":{"properties":{"product_id":{"type":"integer","title":"Product Id","description":"Product ID that failed"},"error_code":{"$ref":"#/components/schemas/BatchLookupErrorCode","description":"Error code for the failure"},"error_message":{"type":"string","title":"Error Message","description":"Human-readable error message"},"retryable":{"type":"boolean","title":"Retryable","description":"Whether this error is retryable","default":true}},"type":"object","required":["product_id","error_code","error_message"],"title":"BatchItemError"},"BatchLookupErrorCode":{"type":"string","enum":["not_found","inactive","validation_error","database_error","price_conversion_error","partial_failure"],"title":"BatchLookupErrorCode"},"BatchProductRequest":{"properties":{"product_ids":{"items":{"type":"integer"},"type":"array","maxItems":100,"minItems":1,"title":"Product Ids","description":"List of product IDs to look up (max 100)"}},"type":"object","required":["product_ids"],"title":"BatchProductRequest"},"BatchProductResponse":{"properties":{"products":{"items":{"$ref":"#/components/schemas/ProductResponse"},"type":"array","title":"Products"},"total":{"type":"integer","title":"Total"},"found":{"type":"integer","title":"Found"},"not_found":{"type":"integer","title":"Not Found"}},"type":"object","required":["products","total","found","not_found"],"title":"BatchProductResponse"},"BillingStatusResponse":{"properties":{"tier":{"$ref":"#/components/schemas/BillingTier"},"requests_today":{"type":"integer","title":"Requests Today"},"requests_limit":{"type":"integer","title":"Requests Limit"},"requests_remaining":{"type":"integer","title":"Requests Remaining"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"}},"type":"object","required":["tier","requests_today","requests_limit","requests_remaining","subscription_status","current_period_end"],"title":"BillingStatusResponse"},"BillingTier":{"type":"string","enum":["free","starter","growth"],"title":"BillingTier"},"BillingWebhookResponse":{"properties":{"received":{"type":"boolean","title":"Received"},"event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","required":["received","event_id","event_type","customer_id","subscription_id","status"],"title":"BillingWebhookResponse"},"Body_import_csv_v1_import_csv_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"CSV file to import"}},"type":"object","required":["file"],"title":"Body_import_csv_v1_import_csv_post"},"BrandInfo":{"properties":{"name":{"type":"string","title":"Name"},"product_count":{"type":"integer","title":"Product Count"},"top_sources":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Top Sources"}},"type":"object","required":["name","product_count"],"title":"BrandInfo"},"BrandListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"has_more":{"type":"boolean","title":"Has More"},"items":{"items":{"$ref":"#/components/schemas/BrandInfo"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","has_more","items"],"title":"BrandListResponse"},"BulkAvailabilityRequest":{"properties":{"product_ids":{"items":{"type":"integer"},"type":"array","maxItems":100,"minItems":1,"title":"Product Ids","description":"List of product IDs to check (1-100)"}},"type":"object","required":["product_ids"],"title":"BulkAvailabilityRequest"},"BulkAvailabilityResponse":{"properties":{"results":{"items":{},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"},"available":{"type":"integer","title":"Available"},"unavailable":{"type":"integer","title":"Unavailable"}},"type":"object","required":["results","total","available","unavailable"],"title":"BulkAvailabilityResponse"},"BulkIdsRequest":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","maxItems":100,"minItems":1,"title":"Ids","description":"List of product IDs to look up (max 100)"}},"type":"object","required":["ids"],"title":"BulkIdsRequest"},"BulkIdsResponse":{"properties":{"products":{"items":{"$ref":"#/components/schemas/ProductResponse"},"type":"array","title":"Products"},"total":{"type":"integer","title":"Total"},"found":{"type":"integer","title":"Found"},"not_found":{"type":"integer","title":"Not Found"}},"type":"object","required":["products","total","found","not_found"],"title":"BulkIdsResponse"},"BulkImportRequest":{"properties":{"source":{"type":"string","title":"Source","description":"Source platform (e.g., merchant_own, shopee_sg)"},"products":{"items":{},"type":"array","maxItems":1000,"minItems":1,"title":"Products","description":"Products to import"}},"type":"object","required":["source","products"],"title":"BulkImportRequest"},"BulkImportResponse":{"properties":{"imported":{"type":"integer","title":"Imported"},"failed":{"type":"integer","title":"Failed"},"errors":{"items":{},"type":"array","title":"Errors"}},"type":"object","required":["imported","failed","errors"],"title":"BulkImportResponse"},"BulkLookupRequest":{"properties":{"identifiers":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Identifiers","description":"List of SKU, UPC, or product URL to look up (max 100)"}},"type":"object","required":["identifiers"],"title":"BulkLookupRequest"},"BulkLookupResponse":{"properties":{"results":{"items":{},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"},"found":{"type":"integer","title":"Found"},"not_found":{"type":"integer","title":"Not Found"},"multiple":{"type":"integer","title":"Multiple"}},"type":"object","required":["results","total","found","not_found","multiple"],"title":"BulkLookupResponse"},"BundleResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"savings":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Savings"},"savings_pct":{"type":"number","title":"Savings Pct"},"products":{"items":{},"type":"array","title":"Products"},"total_products":{"type":"integer","title":"Total Products"}},"type":"object","required":["id","name","price","currency","savings","savings_pct","products","total_products"],"title":"BundleResponse"},"CSVImportError":{"properties":{"row":{"type":"integer","title":"Row"},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"error":{"type":"string","title":"Error"}},"type":"object","required":["row","field","value","error"],"title":"CSVImportError"},"CSVImportReport":{"properties":{"status":{"type":"string","title":"Status"},"rows_processed":{"type":"integer","title":"Rows Processed"},"rows_imported":{"type":"integer","title":"Rows Imported"},"rows_updated":{"type":"integer","title":"Rows Updated"},"rows_failed":{"type":"integer","title":"Rows Failed"},"errors":{"items":{"$ref":"#/components/schemas/CSVImportError"},"type":"array","title":"Errors"}},"type":"object","required":["status","rows_processed","rows_imported","rows_updated","rows_failed","errors"],"title":"CSVImportReport"},"CTATrackingRequest":{"properties":{"experiment":{"type":"string","title":"Experiment"},"cta_label":{"type":"string","title":"Cta Label"},"identifier":{"type":"string","title":"Identifier"},"variant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant"}},"type":"object","required":["experiment","cta_label","identifier"],"title":"CTATrackingRequest"},"CTATrackingResponse":{"properties":{"tracked":{"type":"boolean","title":"Tracked"},"experiment":{"type":"string","title":"Experiment"},"variant":{"type":"string","title":"Variant"},"cta_label":{"type":"string","title":"Cta Label"},"identifier":{"type":"string","title":"Identifier"},"assignment_id":{"type":"string","title":"Assignment Id"},"tracked_at":{"type":"string","title":"Tracked At"}},"type":"object","required":["tracked","experiment","variant","cta_label","identifier","assignment_id","tracked_at"],"title":"CTATrackingResponse"},"CatalogFreshnessMonitorReport":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"source":{"type":"string","title":"Source"},"flat_threshold_hours":{"type":"integer","title":"Flat Threshold Hours"},"min_product_count_change":{"type":"integer","title":"Min Product Count Change"},"latest_snapshot":{"anyOf":[{"$ref":"#/components/schemas/ProductCountSnapshot"},{"type":"null"}]},"trend":{"$ref":"#/components/schemas/ProductCountTrend"},"stalled_ingestion":{"anyOf":[{"$ref":"#/components/schemas/StalledIngestionAlert"},{"type":"null"}]},"unprocessed_ndjson_files":{"items":{"$ref":"#/components/schemas/UnprocessedNdjsonFile"},"type":"array","title":"Unprocessed Ndjson Files"},"unprocessed_ndjson_count":{"type":"integer","title":"Unprocessed Ndjson Count"}},"type":"object","required":["generated_at","source","flat_threshold_hours","min_product_count_change","trend","unprocessed_ndjson_files","unprocessed_ndjson_count"],"title":"CatalogFreshnessMonitorReport"},"CatalogHealthReport":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"total_indexed":{"type":"integer","title":"Total Indexed"},"by_platform":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Platform"},"compliance":{"$ref":"#/components/schemas/SchemaComplianceReport"},"deduplication":{"$ref":"#/components/schemas/DeduplicationReport"},"freshness":{"$ref":"#/components/schemas/FreshnessReport"},"freshness_monitor":{"anyOf":[{"$ref":"#/components/schemas/CatalogFreshnessMonitorReport"},{"type":"null"}]}},"type":"object","required":["generated_at","total_indexed","by_platform","compliance","deduplication","freshness"],"title":"CatalogHealthReport"},"CatalogImageIssueSample":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"source":{"type":"string","title":"Source"},"region":{"type":"string","title":"Region"},"category":{"type":"string","title":"Category"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["product_id","source","region","category","title","url","reason"],"title":"CatalogImageIssueSample"},"CatalogImageIssueSummary":{"properties":{"count":{"type":"integer","title":"Count"},"sample":{"items":{"$ref":"#/components/schemas/CatalogImageIssueSample"},"type":"array","title":"Sample"}},"type":"object","required":["count","sample"],"title":"CatalogImageIssueSummary"},"CatalogImageIssues":{"properties":{"missing":{"$ref":"#/components/schemas/CatalogImageIssueSummary"},"broken":{"$ref":"#/components/schemas/CatalogImageIssueSummary"}},"type":"object","required":["missing","broken"],"title":"CatalogImageIssues"},"CatalogQualityAggregate":{"properties":{"name":{"type":"string","title":"Name"},"product_count":{"type":"integer","title":"Product Count"},"stale_products":{"type":"integer","title":"Stale Products"},"stale_rate":{"type":"number","title":"Stale Rate"},"avg_freshness_score":{"type":"number","title":"Avg Freshness Score"},"avg_completeness_score":{"type":"number","title":"Avg Completeness Score"},"avg_price_accuracy_score":{"type":"number","title":"Avg Price Accuracy Score"},"avg_overall_score":{"type":"number","title":"Avg Overall Score"}},"type":"object","required":["name","product_count","stale_products","stale_rate","avg_freshness_score","avg_completeness_score","avg_price_accuracy_score","avg_overall_score"],"title":"CatalogQualityAggregate"},"CatalogQualityAggregates":{"properties":{"by_source":{"items":{"$ref":"#/components/schemas/CatalogQualityAggregate"},"type":"array","title":"By Source"},"by_region":{"items":{"$ref":"#/components/schemas/CatalogQualityAggregate"},"type":"array","title":"By Region"},"by_category":{"items":{"$ref":"#/components/schemas/CatalogQualityAggregate"},"type":"array","title":"By Category"}},"type":"object","required":["by_source","by_region","by_category"],"title":"CatalogQualityAggregates"},"CatalogQualityOverview":{"properties":{"total_products":{"type":"integer","title":"Total Products"},"overall_quality_score":{"type":"number","title":"Overall Quality Score"},"avg_freshness_score":{"type":"number","title":"Avg Freshness Score"},"avg_completeness_score":{"type":"number","title":"Avg Completeness Score"},"avg_price_accuracy_score":{"type":"number","title":"Avg Price Accuracy Score"},"stale_products":{"type":"integer","title":"Stale Products"},"stale_rate":{"type":"number","title":"Stale Rate"},"field_completeness":{"$ref":"#/components/schemas/FieldCompletenessSummary"},"image_validation":{"anyOf":[{"$ref":"#/components/schemas/ImageValidationSummary"},{"type":"null"}]}},"type":"object","required":["total_products","overall_quality_score","avg_freshness_score","avg_completeness_score","avg_price_accuracy_score","stale_products","stale_rate","field_completeness"],"title":"CatalogQualityOverview"},"CatalogQualityProductSample":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"source":{"type":"string","title":"Source"},"region":{"type":"string","title":"Region"},"category":{"type":"string","title":"Category"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"overall_score":{"type":"number","title":"Overall Score"},"missing_fields":{"items":{"type":"string"},"type":"array","title":"Missing Fields"}},"type":"object","required":["product_id","source","region","category","title","url","overall_score","missing_fields"],"title":"CatalogQualityProductSample"},"CatalogQualityReport":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"snapshot_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}],"title":"Snapshot Date"},"thresholds":{"$ref":"#/components/schemas/CatalogQualityThresholds"},"overview":{"$ref":"#/components/schemas/CatalogQualityOverview"},"aggregates":{"$ref":"#/components/schemas/CatalogQualityAggregates"},"re_scrape_recommendations":{"$ref":"#/components/schemas/CatalogRescrapeSummary"},"stale_products":{"$ref":"#/components/schemas/CatalogStaleProductSummary"},"image_issues":{"anyOf":[{"$ref":"#/components/schemas/CatalogImageIssues"},{"type":"null"}]},"low_quality_products":{"items":{"$ref":"#/components/schemas/LowQualityProductSample"},"type":"array","title":"Low Quality Products"}},"type":"object","required":["generated_at","snapshot_date","thresholds","overview","aggregates","re_scrape_recommendations","stale_products","low_quality_products"],"title":"CatalogQualityReport"},"CatalogQualityThresholds":{"properties":{"stale_after_days":{"type":"integer","title":"Stale After Days"},"low_quality_score":{"type":"number","title":"Low Quality Score"},"price_history_lookback_days":{"type":"integer","title":"Price History Lookback Days"}},"type":"object","required":["stale_after_days","low_quality_score","price_history_lookback_days"],"title":"CatalogQualityThresholds"},"CatalogRescrapeRecommendation":{"properties":{"name":{"type":"string","title":"Name"},"product_count":{"type":"integer","title":"Product Count"},"stale_products":{"type":"integer","title":"Stale Products"},"stale_rate":{"type":"number","title":"Stale Rate"},"avg_freshness_score":{"type":"number","title":"Avg Freshness Score"},"avg_completeness_score":{"type":"number","title":"Avg Completeness Score"},"avg_price_accuracy_score":{"type":"number","title":"Avg Price Accuracy Score"},"avg_overall_score":{"type":"number","title":"Avg Overall Score"}},"type":"object","required":["name","product_count","stale_products","stale_rate","avg_freshness_score","avg_completeness_score","avg_price_accuracy_score","avg_overall_score"],"title":"CatalogRescrapeRecommendation"},"CatalogRescrapeSummary":{"properties":{"count":{"type":"integer","title":"Count"},"sources":{"items":{"$ref":"#/components/schemas/CatalogRescrapeRecommendation"},"type":"array","title":"Sources"}},"type":"object","required":["count","sources"],"title":"CatalogRescrapeSummary"},"CatalogStaleProductSummary":{"properties":{"count":{"type":"integer","title":"Count"},"sample":{"items":{"$ref":"#/components/schemas/CatalogQualityProductSample"},"type":"array","title":"Sample"}},"type":"object","required":["count","sample"],"title":"CatalogStaleProductSummary"},"CatalogStats":{"properties":{"total_products":{"type":"integer","title":"Total Products","description":"Total number of active products in catalog"},"by_source":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Source","description":"Product count per source platform"},"by_category":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Category","description":"Product count per category"},"avg_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Price","description":"Average price across all products (in SGD)"},"min_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Price","description":"Minimum product price (in SGD)"},"max_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Price","description":"Maximum product price (in SGD)"}},"type":"object","required":["total_products","by_source","by_category"],"title":"CatalogStats"},"CatalogStatsReport":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"total_products":{"type":"integer","title":"Total Products"},"by_platform":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Platform"},"by_category":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Category"}},"type":"object","required":["generated_at","total_products","by_platform","by_category"],"title":"CatalogStatsReport"},"CatalogStatus":{"properties":{"total_unique_products":{"type":"integer","title":"Total Unique Products"},"platforms":{"items":{"$ref":"#/components/schemas/PlatformProductCount"},"type":"array","title":"Platforms"},"ingestion_runs":{"items":{"$ref":"#/components/schemas/app__schemas__status__IngestionRunInfo"},"type":"array","title":"Ingestion Runs"},"goal_million":{"type":"number","title":"Goal Million","default":1.0},"progress_percent":{"type":"number","title":"Progress Percent"}},"type":"object","required":["total_unique_products","platforms","ingestion_runs","progress_percent"],"title":"CatalogStatus"},"CatalogUpdateResponse":{"properties":{"accepted":{"type":"integer","title":"Accepted","description":"Number of updates accepted for processing"},"rejected":{"type":"integer","title":"Rejected","description":"Number of updates rejected"},"batch_id":{"type":"string","title":"Batch Id","description":"Unique batch identifier for this webhook call"},"status":{"type":"string","enum":["accepted","partial","rejected"],"title":"Status","description":"Overall batch status"},"errors":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Errors","description":"Error details for rejected items"},"message":{"type":"string","title":"Message","description":"Human-readable status message"}},"type":"object","required":["accepted","rejected","batch_id","status","message"],"title":"CatalogUpdateResponse"},"CategoryCount":{"properties":{"category":{"type":"string","title":"Category"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["category","count"],"title":"CategoryCount"},"CategoryNode":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"count":{"type":"integer","title":"Count"},"children":{"items":{"$ref":"#/components/schemas/CategoryNode"},"type":"array","title":"Children"}},"type":"object","required":["id","name","slug","count"],"title":"CategoryNode"},"CategoryResponse":{"properties":{"categories":{"items":{"$ref":"#/components/schemas/CategoryNode"},"type":"array","title":"Categories"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["categories","total"],"title":"CategoryResponse"},"ChangelogChange":{"properties":{"category":{"type":"string","title":"Category"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"description":{"type":"string","title":"Description"}},"type":"object","required":["category","description"],"title":"ChangelogChange"},"ChangelogRelease":{"properties":{"version":{"type":"string","title":"Version"},"date":{"type":"string","title":"Date"},"changes":{"items":{"$ref":"#/components/schemas/ChangelogChange"},"type":"array","title":"Changes"}},"type":"object","required":["version","date","changes"],"title":"ChangelogRelease"},"ChangelogResponse":{"properties":{"api_version":{"type":"string","title":"Api Version"},"releases":{"items":{"$ref":"#/components/schemas/ChangelogRelease"},"type":"array","title":"Releases"}},"type":"object","required":["api_version","releases"],"title":"ChangelogResponse"},"ClickAnalyticsResponse":{"properties":{"total_clicks":{"type":"integer","title":"Total Clicks"},"daily_clicks":{"items":{"$ref":"#/components/schemas/ClickCount"},"type":"array","title":"Daily Clicks"},"weekly_clicks":{"items":{"$ref":"#/components/schemas/ClickCount"},"type":"array","title":"Weekly Clicks"},"top_products":{"items":{"$ref":"#/components/schemas/TopProduct"},"type":"array","title":"Top Products"}},"type":"object","required":["total_clicks","daily_clicks","weekly_clicks","top_products"],"title":"ClickAnalyticsResponse"},"ClickCount":{"properties":{"date":{"type":"string","title":"Date"},"clicks":{"type":"integer","title":"Clicks"}},"type":"object","required":["date","clicks"],"title":"ClickCount"},"ClickEventsResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/RawClickEvent"},"type":"array","title":"Events"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["events","total","page","page_size","pages"],"title":"ClickEventsResponse"},"CommissionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/app__routers__linkless_attribution__CommissionResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},"type":"object","required":["items","total"],"title":"CommissionListResponse"},"CompareDiffRequest":{"properties":{"product_ids":{"items":{"type":"integer"},"type":"array","title":"Product Ids"},"include_image_similarity":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Image Similarity"}},"type":"object","required":["product_ids"],"title":"CompareDiffRequest"},"CompareDiffResponse":{"properties":{"products":{"items":{},"type":"array","title":"Products"},"field_diffs":{"items":{},"type":"array","title":"Field Diffs"},"identical_fields":{"items":{"type":"string"},"type":"array","title":"Identical Fields"},"cheapest_product_id":{"type":"integer","title":"Cheapest Product Id"},"most_expensive_product_id":{"type":"integer","title":"Most Expensive Product Id"},"price_spread":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price Spread"},"price_spread_pct":{"type":"number","title":"Price Spread Pct"}},"type":"object","required":["products","field_diffs","identical_fields","cheapest_product_id","most_expensive_product_id","price_spread","price_spread_pct"],"title":"CompareDiffResponse"},"CompareHighlights":{"properties":{"cheapest":{"anyOf":[{"$ref":"#/components/schemas/CompareMatch"},{"type":"null"}]},"best_rated":{"anyOf":[{"$ref":"#/components/schemas/CompareMatch"},{"type":"null"}]},"fastest_shipping":{"anyOf":[{"$ref":"#/components/schemas/CompareMatch"},{"type":"null"}]}},"type":"object","title":"CompareHighlights"},"CompareMatch":{"properties":{"id":{"type":"integer","title":"Id"},"sku":{"type":"string","title":"Sku"},"source":{"type":"string","title":"Source"},"merchant_id":{"type":"string","title":"Merchant Id"},"merchant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Name","description":"Human-readable merchant/store name"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"buy_url":{"type":"string","title":"Buy Url"},"affiliate_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"category_path":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Category Path"},"rating":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rating"},"is_available":{"type":"boolean","title":"Is Available"},"last_checked":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked"},"metadata":{"anyOf":[{},{"type":"null"}],"title":"Metadata"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"match_score":{"type":"number","title":"Match Score"},"savings_vs_most_expensive":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Savings Vs Most Expensive"},"savings_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Savings Pct"},"price_missing":{"type":"boolean","title":"Price Missing","description":"True when price is not available from this retailer","default":false},"price_missing_reason":{"anyOf":[{"$ref":"#/components/schemas/PriceMissingReason"},{"type":"null"}],"description":"Reason why price is missing"},"zero_price":{"type":"boolean","title":"Zero Price","description":"True when product is free (price is 0)","default":false},"data_freshness":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Freshness","description":"Data freshness tier: fresh (<24h), recent (24h-7d), stale (7-30d), very_stale (>30d)"},"low_confidence":{"type":"boolean","title":"Low Confidence","description":"True when the listing matched below the compare confidence audit threshold","default":false},"confidence_audit_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Audit Threshold","description":"Threshold used to determine whether low_confidence is set"},"merchant_edge_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Edge Case","description":"Edge case flag for merchant issues: 'duplicate_merchant', 'empty_merchant_id', 'unknown_merchant', 'cross_border_merchant', or null if no issues"}},"type":"object","required":["id","sku","source","merchant_id","name","price","currency","buy_url","is_available","updated_at","match_score"],"title":"CompareMatch"},"CompareMatrixRequest":{"properties":{"product_ids":{"items":{"type":"integer"},"type":"array","title":"Product Ids"},"min_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Price"},"max_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Price"}},"type":"object","required":["product_ids"],"title":"CompareMatrixRequest"},"CompareMatrixResponse":{"properties":{"comparisons":{"items":{},"type":"array","title":"Comparisons"},"total_products":{"type":"integer","title":"Total Products"},"highlights":{"anyOf":[{},{"type":"null"}],"title":"Highlights"}},"type":"object","required":["comparisons","total_products"],"title":"CompareMatrixResponse"},"CompareResponse":{"properties":{"source_product_id":{"type":"integer","title":"Source Product Id"},"source_product_name":{"type":"string","title":"Source Product Name"},"matches":{"items":{},"type":"array","title":"Matches"},"total_matches":{"type":"integer","title":"Total Matches"},"highlights":{"anyOf":[{"$ref":"#/components/schemas/CompareHighlights"},{"type":"null"}],"description":"Highlighted matches (cheapest, best rated, fastest shipping)"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta","description":"Metadata including price_coverage_pct, stale_count, very_stale_count"}},"type":"object","required":["source_product_id","source_product_name","matches","total_matches"],"title":"CompareResponse"},"CompareSearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"items":{"items":{},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"cheapest_product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cheapest Product Id"},"best_rated_product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Rated Product Id"},"fastest_shipping_product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fastest Shipping Product Id"}},"type":"object","required":["query","items","total"],"title":"CompareSearchResponse"},"CompletenessResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"total_products":{"type":"integer","title":"Total Products"},"platform_count":{"type":"integer","title":"Platform Count"},"overall_completeness_pct":{"type":"number","title":"Overall Completeness Pct"},"platforms":{"items":{"$ref":"#/components/schemas/PlatformCompleteness"},"type":"array","title":"Platforms"}},"type":"object","required":["generated_at","total_products","platform_count","overall_completeness_pct","platforms"],"title":"CompletenessResponse"},"ComprehensiveHealthReport":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"overall_status":{"type":"string","title":"Overall Status","description":"Overall status: healthy, degraded, or unhealthy"},"db":{"$ref":"#/components/schemas/DBHealthReport"},"disk":{"$ref":"#/components/schemas/DiskSpaceHealth"},"api_self_test":{"$ref":"#/components/schemas/APIResponseTimeHealth"},"scrapers":{"$ref":"#/components/schemas/ScraperHealthReport"}},"type":"object","required":["generated_at","overall_status","db","disk","api_self_test","scrapers"],"title":"ComprehensiveHealthReport"},"ConflictGroupResponse":{"properties":{"product_ids":{"items":{"type":"integer"},"type":"array","title":"Product Ids"},"conflicting_canonical_ids":{"items":{"type":"integer"},"type":"array","title":"Conflicting Canonical Ids"},"resolved_canonical_id":{"type":"integer","title":"Resolved Canonical Id"},"match_paths":{"items":{"prefixItems":[{"type":"integer"},{"type":"integer"},{"type":"string"}],"type":"array","maxItems":3,"minItems":3},"type":"array","title":"Match Paths"}},"type":"object","required":["product_ids","conflicting_canonical_ids","resolved_canonical_id","match_paths"],"title":"ConflictGroupResponse"},"ConflictResolutionResponse":{"properties":{"conflicts_resolved":{"type":"integer","title":"Conflicts Resolved"},"conflicts":{"items":{"$ref":"#/components/schemas/ConflictGroupResponse"},"type":"array","title":"Conflicts"}},"type":"object","required":["conflicts_resolved","conflicts"],"title":"ConflictResolutionResponse"},"ConversionResponse":{"properties":{"id":{"type":"string","title":"Id"},"order_id":{"type":"string","title":"Order Id"},"subtotal":{"type":"number","title":"Subtotal"},"currency":{"type":"string","title":"Currency"},"attribution":{"$ref":"#/components/schemas/AttributionResult"}},"type":"object","required":["id","order_id","subtotal","currency","attribution"],"title":"ConversionResponse"},"CountryInfo":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"product_count":{"type":"integer","title":"Product Count"}},"type":"object","required":["code","name","product_count"],"title":"CountryInfo"},"CountryListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"countries":{"items":{"$ref":"#/components/schemas/CountryInfo"},"type":"array","title":"Countries"}},"type":"object","required":["total","countries"],"title":"CountryListResponse"},"CouponItem":{"properties":{"code":{"type":"string","title":"Code"},"description":{"type":"string","title":"Description"},"discount_type":{"type":"string","title":"Discount Type"},"discount_value":{"type":"number","title":"Discount Value"},"currency":{"type":"string","title":"Currency","default":"SGD"},"minimum_purchase":{"type":"number","title":"Minimum Purchase","default":0.0},"expiry_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiry Date"},"retailer_id":{"type":"string","title":"Retailer Id"},"retailer_name":{"type":"string","title":"Retailer Name"},"url":{"type":"string","title":"Url"},"terms":{"type":"string","title":"Terms","default":""},"category":{"type":"string","title":"Category","default":"general"},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"is_active":{"type":"boolean","title":"Is Active","default":true},"source":{"type":"string","title":"Source","default":"coupons"},"scraped_at":{"type":"string","title":"Scraped At"}},"type":"object","required":["code","description","discount_type","discount_value","retailer_id","retailer_name","url","scraped_at"],"title":"CouponItem"},"CouponsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/CouponItem"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","items"],"title":"CouponsResponse"},"CouponsStatsResponse":{"properties":{"total_coupons":{"type":"integer","title":"Total Coupons"},"by_retailer":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Retailer"},"by_discount_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Discount Type"},"verified_count":{"type":"integer","title":"Verified Count"},"active_count":{"type":"integer","title":"Active Count"}},"type":"object","required":["total_coupons","by_retailer","by_discount_type","verified_count","active_count"],"title":"CouponsStatsResponse"},"CreateIntentRequest":{"properties":{"merchant_id":{"type":"string","title":"Merchant Id"},"product_ids":{"items":{"type":"integer"},"type":"array","title":"Product Ids"},"channel":{"type":"string","title":"Channel","default":"api"},"promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code"},"user_session_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Session Hash"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["merchant_id","product_ids"],"title":"CreateIntentRequest"},"DBConnectionHealth":{"properties":{"ok":{"type":"boolean","title":"Ok"},"latency_ms":{"type":"number","title":"Latency Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok","latency_ms"],"title":"DBConnectionHealth"},"DBHealthReport":{"properties":{"ok":{"type":"boolean","title":"Ok"},"connection":{"$ref":"#/components/schemas/DBConnectionHealth"},"pool":{"$ref":"#/components/schemas/DBPoolHealth"},"checked_at":{"type":"string","format":"date-time","title":"Checked At"}},"type":"object","required":["ok","connection","pool","checked_at"],"title":"DBHealthReport"},"DBPoolHealth":{"properties":{"size":{"type":"integer","title":"Size"},"checked_in":{"type":"integer","title":"Checked In"},"checked_out":{"type":"integer","title":"Checked Out"},"overflow":{"type":"integer","title":"Overflow"},"invalid":{"type":"integer","title":"Invalid","default":0}},"type":"object","required":["size","checked_in","checked_out","overflow"],"title":"DBPoolHealth"},"DailyAnalyticsSummary":{"properties":{"date":{"type":"string","title":"Date"},"total_requests":{"type":"integer","title":"Total Requests"},"unique_api_keys":{"type":"integer","title":"Unique Api Keys"}},"type":"object","required":["date","total_requests","unique_api_keys"],"title":"DailyAnalyticsSummary"},"DailyQueryBreakdown":{"properties":{"date":{"type":"string","title":"Date"},"query_count":{"type":"integer","title":"Query Count"},"unique_api_keys":{"type":"integer","title":"Unique Api Keys"}},"type":"object","required":["date","query_count","unique_api_keys"],"title":"DailyQueryBreakdown"},"DailyQueryCount":{"properties":{"date":{"type":"string","title":"Date"},"queries":{"type":"integer","title":"Queries"}},"type":"object","required":["date","queries"],"title":"DailyQueryCount"},"DailyRevenue":{"properties":{"date":{"type":"string","title":"Date"},"clicks":{"type":"integer","title":"Clicks"},"conversions":{"type":"integer","title":"Conversions"},"conversion_rate":{"type":"number","title":"Conversion Rate"},"revenue":{"type":"number","title":"Revenue"},"currency":{"type":"string","title":"Currency","default":"SGD"}},"type":"object","required":["date","clicks","conversions","conversion_rate","revenue"],"title":"DailyRevenue"},"DailyUsage":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"request_count":{"type":"integer","title":"Request Count"}},"type":"object","required":["date","request_count"],"title":"DailyUsage"},"DataFreshness":{"properties":{"oldest_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest Updated At"},"newest_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest Updated At"}},"type":"object","required":["oldest_updated_at","newest_updated_at"],"title":"DataFreshness"},"DealItem":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"original_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Original Price"},"discount_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount Pct"},"currency":{"type":"string","title":"Currency"},"source":{"type":"string","title":"Source"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"buy_url":{"type":"string","title":"Buy Url"},"affiliate_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"metadata":{"anyOf":[{},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","name","price","original_price","discount_pct","currency","source","category","buy_url","affiliate_url","image_url","metadata"],"title":"DealItem"},"DealsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/DealItem"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","items"],"title":"DealsResponse"},"DedupAuditResponse":{"properties":{"total_groups":{"type":"integer","title":"Total Groups"},"total_canonical_ids":{"type":"integer","title":"Total Canonical Ids"},"products_with_conflicts":{"type":"integer","title":"Products With Conflicts"},"conflicting_groups":{"items":{"$ref":"#/components/schemas/ConflictGroupResponse"},"type":"array","title":"Conflicting Groups"},"false_positive_groups":{"items":{"$ref":"#/components/schemas/ConflictGroupResponse"},"type":"array","title":"False Positive Groups"},"false_negative_groups":{"items":{"$ref":"#/components/schemas/ConflictGroupResponse"},"type":"array","title":"False Negative Groups"},"orphan_products":{"items":{"type":"integer"},"type":"array","title":"Orphan Products"},"inconsistent_groups":{"type":"integer","title":"Inconsistent Groups"}},"type":"object","required":["total_groups","total_canonical_ids","products_with_conflicts","conflicting_groups","false_positive_groups","false_negative_groups","orphan_products","inconsistent_groups"],"title":"DedupAuditResponse"},"DedupPipelineResponse":{"properties":{"total_products_scanned":{"type":"integer","title":"Total Products Scanned"},"url_matches":{"type":"integer","title":"Url Matches"},"barcode_matches":{"type":"integer","title":"Barcode Matches"},"sku_matches":{"type":"integer","title":"Sku Matches"},"brand_model_matches":{"type":"integer","title":"Brand Model Matches"},"title_matches":{"type":"integer","title":"Title Matches"},"new_canonical_links":{"type":"integer","title":"New Canonical Links"},"metadata_merges":{"type":"integer","title":"Metadata Merges"},"price_updates":{"type":"integer","title":"Price Updates"},"groups_merged":{"type":"integer","title":"Groups Merged"},"conflicts_resolved":{"type":"integer","title":"Conflicts Resolved"},"elapsed_seconds":{"type":"number","title":"Elapsed Seconds"}},"type":"object","required":["total_products_scanned","url_matches","barcode_matches","sku_matches","brand_model_matches","title_matches","new_canonical_links","metadata_merges","price_updates","groups_merged","conflicts_resolved","elapsed_seconds"],"title":"DedupPipelineResponse"},"DeduplicationReport":{"properties":{"total_products":{"type":"integer","title":"Total Products"},"products_with_canonical":{"type":"integer","title":"Products With Canonical"},"duplicate_rate":{"type":"number","title":"Duplicate Rate"},"duplicate_groups":{"type":"integer","title":"Duplicate Groups"},"sample_duplicates":{"items":{"$ref":"#/components/schemas/DuplicateGroup"},"type":"array","title":"Sample Duplicates"}},"type":"object","required":["total_products","products_with_canonical","duplicate_rate","duplicate_groups","sample_duplicates"],"title":"DeduplicationReport"},"DeepLinkCompareResponse":{"properties":{"products":{"items":{"$ref":"#/components/schemas/DeepLinkProduct"},"type":"array","title":"Products"},"total":{"type":"integer","title":"Total"},"canonical_url":{"type":"string","title":"Canonical Url"},"og_title":{"type":"string","title":"Og Title"},"og_description":{"type":"string","title":"Og Description"},"og_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Og Image"}},"type":"object","required":["products","total","canonical_url","og_title","og_description"],"title":"DeepLinkCompareResponse"},"DeepLinkProduct":{"properties":{"id":{"type":"integer","title":"Id"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"source":{"type":"string","title":"Source"},"merchant_id":{"type":"string","title":"Merchant Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"buy_url":{"type":"string","title":"Buy Url"},"affiliate_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"category_path":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Category Path"},"rating":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rating"},"is_available":{"type":"boolean","title":"Is Available"},"last_checked":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","source","merchant_id","name","price","currency","buy_url","is_available","updated_at"],"title":"DeepLinkProduct"},"DependencyHealth":{"properties":{"ok":{"type":"boolean","title":"Ok"},"latency_ms":{"type":"number","title":"Latency Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok","latency_ms"],"title":"DependencyHealth"},"DetailedHealthResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Overall status: ok, degraded, or unhealthy"},"db":{"$ref":"#/components/schemas/DependencyHealth"},"cache":{"$ref":"#/components/schemas/DependencyHealth"},"uptime_seconds":{"type":"number","title":"Uptime Seconds","description":"Process uptime in seconds"},"version":{"type":"string","title":"Version","description":"Application version"},"product_count":{"type":"integer","title":"Product Count","description":"Total active product count"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["status","db","cache","uptime_seconds","version","product_count","generated_at"],"title":"DetailedHealthResponse"},"DeveloperActivity":{"properties":{"developer_id":{"type":"string","title":"Developer Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"queries":{"type":"integer","title":"Queries"},"last_active":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Active"}},"type":"object","required":["developer_id","email","queries","last_active"],"title":"DeveloperActivity"},"DeveloperMeResponse":{"properties":{"developer":{"$ref":"#/components/schemas/DeveloperResponse"},"api_keys":{"items":{"$ref":"#/components/schemas/ApiKeyResponse"},"type":"array","title":"Api Keys"},"total_keys":{"type":"integer","title":"Total Keys"},"requests_today":{"type":"integer","title":"Requests Today"},"daily_limit":{"type":"integer","title":"Daily Limit"},"requests_this_month":{"type":"integer","title":"Requests This Month"},"monthly_limit":{"type":"integer","title":"Monthly Limit"},"reset_at":{"type":"string","format":"date-time","title":"Reset At"}},"type":"object","required":["developer","api_keys","total_keys","requests_today","daily_limit","requests_this_month","monthly_limit","reset_at"],"title":"DeveloperMeResponse"},"DeveloperResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"plan":{"type":"string","title":"Plan"},"email_verified":{"type":"boolean","title":"Email Verified","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","plan","created_at"],"title":"DeveloperResponse"},"DeveloperSignupRequest":{"properties":{"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"experiment_variant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Variant"},"discovery_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discovery Path"},"referrer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Content"},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Term"}},"type":"object","required":["email","name"],"title":"DeveloperSignupRequest"},"DeveloperSignupResponse":{"properties":{"developer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Developer Id"},"email":{"type":"string","title":"Email"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Id"},"raw_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Key"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"},"message":{"type":"string","title":"Message","default":""},"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Url"}},"type":"object","required":["email"],"title":"DeveloperSignupResponse"},"DeveloperUsageResponse":{"properties":{"requests_today":{"type":"integer","title":"Requests Today"},"requests_this_month":{"type":"integer","title":"Requests This Month"},"rate_limit_hits":{"type":"integer","title":"Rate Limit Hits"},"top_5_queries":{"items":{"$ref":"#/components/schemas/TopQueryUsage"},"type":"array","title":"Top 5 Queries"}},"type":"object","required":["requests_today","requests_this_month","rate_limit_hits","top_5_queries"],"title":"DeveloperUsageResponse"},"DiskSpaceHealth":{"properties":{"total_bytes":{"type":"integer","title":"Total Bytes"},"used_bytes":{"type":"integer","title":"Used Bytes"},"available_bytes":{"type":"integer","title":"Available Bytes"},"usage_percent":{"type":"number","title":"Usage Percent"},"ok":{"type":"boolean","title":"Ok"}},"type":"object","required":["total_bytes","used_bytes","available_bytes","usage_percent","ok"],"title":"DiskSpaceHealth"},"DuplicateCheckRequest":{"properties":{"title":{"type":"string","minLength":1,"title":"Title","description":"Product title to check for duplicates"},"price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Price","description":"Product price"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand","description":"Product brand"},"source":{"type":"string","title":"Source","description":"Source platform of the product being checked"}},"type":"object","required":["title","price","source"],"title":"DuplicateCheckRequest"},"DuplicateCheckResponse":{"properties":{"is_duplicate":{"type":"boolean","title":"Is Duplicate"},"canonical_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Canonical Id"},"duplicates":{"items":{"$ref":"#/components/schemas/DuplicateMatchResponse"},"type":"array","title":"Duplicates","default":[]},"total_duplicates":{"type":"integer","title":"Total Duplicates"}},"type":"object","required":["is_duplicate","total_duplicates"],"title":"DuplicateCheckResponse"},"DuplicateGroup":{"properties":{"canonical_id":{"type":"integer","title":"Canonical Id"},"product_ids":{"items":{"type":"integer"},"type":"array","title":"Product Ids"},"source_count":{"type":"integer","title":"Source Count"},"sources":{"items":{"type":"string"},"type":"array","title":"Sources"},"sample_title":{"type":"string","title":"Sample Title"},"price_min":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price Min"},"price_max":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price Max"}},"type":"object","required":["canonical_id","product_ids","source_count","sources","sample_title","price_min","price_max"],"title":"DuplicateGroup"},"DuplicateMatchResponse":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"sku":{"type":"string","title":"Sku"},"source":{"type":"string","title":"Source"},"name":{"type":"string","title":"Name"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"confidence_score":{"type":"number","title":"Confidence Score"},"title_similarity":{"type":"number","title":"Title Similarity"}},"type":"object","required":["product_id","sku","source","name","price","currency","brand","confidence_score","title_similarity"],"title":"DuplicateMatchResponse"},"EarningsEntry":{"properties":{"platform":{"type":"string","title":"Platform"},"click_count":{"type":"integer","title":"Click Count"},"estimated_earnings":{"type":"number","title":"Estimated Earnings"},"currency":{"type":"string","title":"Currency","default":"SGD"}},"type":"object","required":["platform","click_count","estimated_earnings"],"title":"EarningsEntry"},"EarningsResponse":{"properties":{"api_key_id":{"type":"string","title":"Api Key Id"},"total_clicks":{"type":"integer","title":"Total Clicks"},"total_estimated_earnings":{"type":"number","title":"Total Estimated Earnings"},"currency":{"type":"string","title":"Currency","default":"SGD"},"earnings_by_platform":{"items":{"$ref":"#/components/schemas/EarningsEntry"},"type":"array","title":"Earnings By Platform"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"}},"type":"object","required":["api_key_id","total_clicks","total_estimated_earnings","earnings_by_platform","period_start","period_end"],"title":"EarningsResponse"},"EmailDripStatusResponse":{"properties":{"email_type":{"type":"string","title":"Email Type"},"sequence_day":{"type":"integer","title":"Sequence Day"},"scheduled_for":{"type":"string","format":"date-time","title":"Scheduled For"},"status":{"type":"string","title":"Status"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["email_type","sequence_day","scheduled_for","status","sent_at"],"title":"EmailDripStatusResponse"},"EndpointStat":{"properties":{"path":{"type":"string","title":"Path"},"requests":{"type":"integer","title":"Requests"}},"type":"object","required":["path","requests"],"title":"EndpointStat"},"EnrichmentApplyResult":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"enriched_fields":{"additionalProperties":true,"type":"object","title":"Enriched Fields"},"fields_enriched":{"type":"integer","title":"Fields Enriched"},"enrichment_log":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Enrichment Log"},"updated":{"type":"boolean","title":"Updated"}},"type":"object","required":["product_id","enriched_fields","fields_enriched","enrichment_log","updated"],"title":"EnrichmentApplyResult"},"EnrichmentResult":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"enriched_fields":{"additionalProperties":true,"type":"object","title":"Enriched Fields"},"fields_enriched":{"type":"integer","title":"Fields Enriched"},"enrichment_log":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Enrichment Log"}},"type":"object","required":["product_id","enriched_fields","fields_enriched","enrichment_log"],"title":"EnrichmentResult"},"EnrichmentStats":{"properties":{"total_active_products":{"type":"integer","title":"Total Active Products"},"missing_image_count":{"type":"integer","title":"Missing Image Count"},"missing_description_count":{"type":"integer","title":"Missing Description Count"},"missing_brand_count":{"type":"integer","title":"Missing Brand Count"},"products_with_matches":{"type":"integer","title":"Products With Matches"},"enrichable_products":{"type":"integer","title":"Enrichable Products"}},"type":"object","required":["total_active_products","missing_image_count","missing_description_count","missing_brand_count","products_with_matches","enrichable_products"],"title":"EnrichmentStats"},"ExperimentAssignmentRequest":{"properties":{"experiment":{"type":"string","title":"Experiment"},"variant":{"type":"string","title":"Variant"},"developer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Developer Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["experiment","variant"],"title":"ExperimentAssignmentRequest"},"ExperimentAssignmentResponse":{"properties":{"recorded":{"type":"boolean","title":"Recorded"},"assignment_id":{"type":"string","title":"Assignment Id"},"experiment":{"type":"string","title":"Experiment"},"variant":{"type":"string","title":"Variant"}},"type":"object","required":["recorded","assignment_id","experiment","variant"],"title":"ExperimentAssignmentResponse"},"ExperimentConversionRequest":{"properties":{"developer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Developer Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"ExperimentConversionRequest"},"ExperimentConversionResponse":{"properties":{"recorded":{"type":"boolean","title":"Recorded"}},"type":"object","required":["recorded"],"title":"ExperimentConversionResponse"},"ExperimentMetricsResponse":{"properties":{"experiment":{"type":"string","title":"Experiment"},"variant_a_signups":{"type":"integer","title":"Variant A Signups"},"variant_b_signups":{"type":"integer","title":"Variant B Signups"},"variant_a_converted":{"type":"integer","title":"Variant A Converted"},"variant_b_converted":{"type":"integer","title":"Variant B Converted"},"variant_a_conversion_rate":{"type":"number","title":"Variant A Conversion Rate"},"variant_b_conversion_rate":{"type":"number","title":"Variant B Conversion Rate"}},"type":"object","required":["experiment","variant_a_signups","variant_b_signups","variant_a_converted","variant_b_converted","variant_a_conversion_rate","variant_b_conversion_rate"],"title":"ExperimentMetricsResponse"},"FeatureFlagHistoryEntry":{"properties":{"flag":{"type":"string","title":"Flag"},"old_value":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Old Value"},"new_value":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"New Value"},"source":{"type":"string","title":"Source"},"timestamp":{"type":"string","title":"Timestamp"},"actor":{"type":"string","title":"Actor"}},"type":"object","required":["flag","old_value","new_value","source","timestamp","actor"],"title":"FeatureFlagHistoryEntry"},"FeatureFlagHistoryResponse":{"properties":{"flag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flag"},"history":{"items":{"$ref":"#/components/schemas/FeatureFlagHistoryEntry"},"type":"array","title":"History"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["history","total_count"],"title":"FeatureFlagHistoryResponse"},"FeatureFlagStatus":{"properties":{"flag":{"type":"string","title":"Flag"},"enabled":{"type":"boolean","title":"Enabled"},"source":{"type":"string","title":"Source"},"override":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Override"}},"type":"object","required":["flag","enabled","source"],"title":"FeatureFlagStatus"},"FeatureFlagUpdateRequest":{"properties":{"flag":{"type":"string","title":"Flag"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["flag","enabled"],"title":"FeatureFlagUpdateRequest"},"FeatureFlagUpdateResponse":{"properties":{"flag":{"type":"string","title":"Flag"},"enabled":{"type":"boolean","title":"Enabled"},"message":{"type":"string","title":"Message"},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["flag","enabled","message","timestamp"],"title":"FeatureFlagUpdateResponse"},"FeatureFlagWithHistory":{"properties":{"flag":{"type":"string","title":"Flag"},"enabled":{"type":"boolean","title":"Enabled"},"source":{"type":"string","title":"Source"},"override":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Override"},"recent_changes":{"items":{"$ref":"#/components/schemas/FeatureFlagHistoryEntry"},"type":"array","title":"Recent Changes","default":[]}},"type":"object","required":["flag","enabled","source"],"title":"FeatureFlagWithHistory"},"FeatureFlagsResponse":{"properties":{"flags":{"items":{"$ref":"#/components/schemas/FeatureFlagStatus"},"type":"array","title":"Flags"},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["flags","timestamp"],"title":"FeatureFlagsResponse"},"FieldCompleteness":{"properties":{"field":{"type":"string","title":"Field"},"total_count":{"type":"integer","title":"Total Count"},"completeness_pct":{"type":"number","title":"Completeness Pct"}},"type":"object","required":["field","total_count","completeness_pct"],"title":"FieldCompleteness"},"FieldCompletenessSummary":{"properties":{"image_url_pct":{"type":"number","title":"Image Url Pct"},"description_pct":{"type":"number","title":"Description Pct"},"price_pct":{"type":"number","title":"Price Pct"},"brand_pct":{"type":"number","title":"Brand Pct"}},"type":"object","required":["image_url_pct","description_pct","price_pct","brand_pct"],"title":"FieldCompletenessSummary"},"FirstQueryRequest":{"properties":{"latency_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Seconds"}},"type":"object","title":"FirstQueryRequest"},"FirstQueryResponse":{"properties":{"tracked":{"type":"boolean","title":"Tracked"},"activated_24h":{"type":"boolean","title":"Activated 24H"},"activated_7d":{"type":"boolean","title":"Activated 7D"}},"type":"object","required":["tracked","activated_24h","activated_7d"],"title":"FirstQueryResponse"},"FreshnessReport":{"properties":{"total_products":{"type":"integer","title":"Total Products"},"stale_products":{"type":"integer","title":"Stale Products"},"stale_rate":{"type":"number","title":"Stale Rate"},"re_scrape_count":{"type":"integer","title":"Re Scrape Count"},"by_platform":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Platform"},"sample_stale":{"items":{"$ref":"#/components/schemas/StaleProductInfo"},"type":"array","title":"Sample Stale"}},"type":"object","required":["total_products","stale_products","stale_rate","re_scrape_count","by_platform","sample_stale"],"title":"FreshnessReport"},"GrowthRateResponse":{"properties":{"period_days":{"type":"integer","title":"Period Days"},"growth_rates":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Growth Rates"},"snapshots":{"additionalProperties":{"items":{},"type":"array"},"type":"object","title":"Snapshots"}},"type":"object","required":["period_days","growth_rates","snapshots"],"title":"GrowthRateResponse"},"GrowthSnapshotResponse":{"properties":{"total":{"type":"integer","title":"Total"},"by_source":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Source"},"snapshot_date":{"type":"string","title":"Snapshot Date"}},"type":"object","required":["total","by_source","snapshot_date"],"title":"GrowthSnapshotResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageSearchMatch":{"properties":{"id":{"type":"integer","title":"Id"},"sku":{"type":"string","title":"Sku"},"source":{"type":"string","title":"Source"},"merchant_id":{"type":"string","title":"Merchant Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"buy_url":{"type":"string","title":"Buy Url"},"affiliate_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"similarity_score":{"type":"number","title":"Similarity Score"}},"type":"object","required":["id","sku","source","merchant_id","name","price","currency","buy_url","similarity_score"],"title":"ImageSearchMatch"},"ImageSearchRequest":{"properties":{"image_url":{"type":"string","title":"Image Url","description":"URL of the image to search with"},"min_similarity":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Min Similarity","description":"Minimum similarity score (0-1)","default":0.8},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","description":"Maximum number of results","default":20}},"type":"object","required":["image_url"],"title":"ImageSearchRequest"},"ImageSearchResponse":{"properties":{"query_image_url":{"type":"string","title":"Query Image Url"},"total_matches":{"type":"integer","title":"Total Matches"},"matches":{"items":{"$ref":"#/components/schemas/ImageSearchMatch"},"type":"array","title":"Matches"}},"type":"object","required":["query_image_url","total_matches","matches"],"title":"ImageSearchResponse"},"ImageValidationSummary":{"properties":{"missing_images":{"type":"integer","title":"Missing Images","default":0},"broken_images":{"type":"integer","title":"Broken Images","default":0},"valid_images":{"type":"integer","title":"Valid Images","default":0},"invalid_format_images":{"type":"integer","title":"Invalid Format Images","default":0},"unknown_images":{"type":"integer","title":"Unknown Images","default":0},"cdn_hosted_images":{"type":"integer","title":"Cdn Hosted Images","default":0},"merchant_hosted_images":{"type":"integer","title":"Merchant Hosted Images","default":0},"direct_hosted_images":{"type":"integer","title":"Direct Hosted Images","default":0},"missing_rate":{"type":"number","title":"Missing Rate","default":0.0},"broken_rate":{"type":"number","title":"Broken Rate","default":0.0},"valid_rate":{"type":"number","title":"Valid Rate","default":0.0},"unknown_rate":{"type":"number","title":"Unknown Rate","default":0.0}},"type":"object","title":"ImageValidationSummary"},"InboundMentionMetricsResponse":{"properties":{"period_days":{"type":"integer","title":"Period Days"},"source":{"type":"string","title":"Source"},"total_mentions":{"type":"integer","title":"Total Mentions"},"by_type":{"additionalProperties":true,"type":"object","title":"By Type"},"by_status":{"additionalProperties":true,"type":"object","title":"By Status"},"by_intent":{"additionalProperties":true,"type":"object","title":"By Intent"},"high_intent_mentions":{"type":"integer","title":"High Intent Mentions"}},"type":"object","required":["period_days","source","total_mentions","by_type","by_status","by_intent","high_intent_mentions"],"title":"InboundMentionMetricsResponse"},"InboundMentionRequest":{"properties":{"source":{"type":"string","title":"Source"},"mention_type":{"type":"string","title":"Mention Type"},"developer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Developer Id"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"intent_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent Level"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"referred_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referred By"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["source","mention_type"],"title":"InboundMentionRequest"},"InboundMentionResponse":{"properties":{"tracked":{"type":"boolean","title":"Tracked"},"mention_id":{"type":"string","title":"Mention Id"}},"type":"object","required":["tracked","mention_id"],"title":"InboundMentionResponse"},"IngestDedupRequest":{"properties":{"source":{"type":"string","title":"Source","description":"Source platform"},"products":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":1000,"minItems":1,"title":"Products"}},"type":"object","required":["source","products"],"title":"IngestDedupRequest"},"IngestDedupResponse":{"properties":{"total_products":{"type":"integer","title":"Total Products"},"duplicates_found":{"type":"integer","title":"Duplicates Found"},"unique_products":{"type":"integer","title":"Unique Products"},"results":{"items":{"$ref":"#/components/schemas/IngestDedupResult"},"type":"array","title":"Results"}},"type":"object","required":["total_products","duplicates_found","unique_products","results"],"title":"IngestDedupResponse"},"IngestDedupResult":{"properties":{"sku":{"type":"string","title":"Sku"},"url":{"type":"string","title":"Url"},"is_duplicate":{"type":"boolean","title":"Is Duplicate"},"canonical_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Canonical Id"},"duplicate_of":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duplicate Of"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"duplicates_found":{"type":"integer","title":"Duplicates Found"}},"type":"object","required":["sku","url","is_duplicate","canonical_id","duplicate_of","confidence","duplicates_found"],"title":"IngestDedupResult"},"IngestError":{"properties":{"index":{"type":"integer","title":"Index"},"sku":{"type":"string","title":"Sku"},"error":{"type":"string","title":"Error"},"code":{"type":"string","title":"Code","description":"Machine-readable error code","default":"UNKNOWN_ERROR"}},"type":"object","required":["index","sku","error"],"title":"IngestError"},"IngestResponse":{"properties":{"run_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Run Id","description":"Ingestion run ID"},"status":{"type":"string","title":"Status","description":"Status: completed, failed, or running"},"rows_inserted":{"type":"integer","title":"Rows Inserted","description":"Number of new rows inserted","default":0},"rows_updated":{"type":"integer","title":"Rows Updated","description":"Number of existing rows updated","default":0},"rows_failed":{"type":"integer","title":"Rows Failed","description":"Number of rows that failed","default":0},"errors":{"items":{"$ref":"#/components/schemas/IngestError"},"type":"array","title":"Errors","description":"Error details for failed rows"}},"type":"object","required":["status"],"title":"IngestResponse"},"IngestionRunComplete":{"properties":{"status":{"$ref":"#/components/schemas/IngestionStatus","description":"Final status: completed, failed, or cancelled"},"rows_inserted":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Rows Inserted"},"rows_updated":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Rows Updated"},"rows_failed":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Rows Failed"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["status"],"title":"IngestionRunComplete"},"IngestionRunCreate":{"properties":{"source":{"type":"string","title":"Source","description":"Source platform (e.g., lazada_sg, shopee_sg)"}},"type":"object","required":["source"],"title":"IngestionRunCreate"},"IngestionRunResponse":{"properties":{"id":{"type":"integer","title":"Id"},"source":{"type":"string","title":"Source"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"rows_inserted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Inserted"},"rows_updated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Updated"},"rows_failed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Failed"},"status":{"$ref":"#/components/schemas/IngestionStatus"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["id","source","started_at","status"],"title":"IngestionRunResponse"},"IngestionRunUpdate":{"properties":{"rows_inserted":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Rows Inserted"},"rows_updated":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Rows Updated"},"rows_failed":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Rows Failed"},"status":{"anyOf":[{"$ref":"#/components/schemas/IngestionStatus"},{"type":"null"}]},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","title":"IngestionRunUpdate"},"IngestionSourceDlqDepth":{"properties":{"source":{"type":"string","title":"Source"},"dead_letter_queue_depth":{"type":"integer","title":"Dead Letter Queue Depth"}},"type":"object","required":["source","dead_letter_queue_depth"],"title":"IngestionSourceDlqDepth"},"IngestionStats":{"properties":{"total_runs":{"type":"integer","title":"Total Runs"},"completed_runs":{"type":"integer","title":"Completed Runs"},"failed_runs":{"type":"integer","title":"Failed Runs"},"running_runs":{"type":"integer","title":"Running Runs"},"total_rows_inserted":{"type":"integer","title":"Total Rows Inserted"},"total_rows_updated":{"type":"integer","title":"Total Rows Updated"},"total_rows_failed":{"type":"integer","title":"Total Rows Failed"}},"type":"object","required":["total_runs","completed_runs","failed_runs","running_runs","total_rows_inserted","total_rows_updated","total_rows_failed"],"title":"IngestionStats"},"IngestionStatus":{"type":"string","enum":["running","completed","failed","cancelled"],"title":"IngestionStatus"},"IngestionStatusResponse":{"properties":{"total_dead_letter_queue_depth":{"type":"integer","title":"Total Dead Letter Queue Depth"},"dead_letter_queue_by_source":{"items":{"$ref":"#/components/schemas/IngestionSourceDlqDepth"},"type":"array","title":"Dead Letter Queue By Source"}},"type":"object","required":["total_dead_letter_queue_depth","dead_letter_queue_by_source"],"title":"IngestionStatusResponse"},"IntentResponse":{"properties":{"id":{"type":"string","title":"Id"},"referral_token":{"type":"string","title":"Referral Token"},"token_expires_at":{"type":"string","title":"Token Expires At"},"promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code"},"merchant_id":{"type":"string","title":"Merchant Id"},"product_ids":{"items":{"type":"integer"},"type":"array","title":"Product Ids"},"channel":{"type":"string","title":"Channel"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","referral_token","token_expires_at","merchant_id","product_ids","channel","created_at"],"title":"IntentResponse"},"KpiSnapshotResponse":{"properties":{"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"new_api_keys":{"type":"integer","title":"New Api Keys"},"total_api_keys":{"type":"integer","title":"Total Api Keys"},"activated_developers":{"type":"integer","title":"Activated Developers"},"total_developers":{"type":"integer","title":"Total Developers"},"total_queries":{"type":"integer","title":"Total Queries"},"queries_per_day":{"items":{"$ref":"#/components/schemas/DailyQueryCount"},"type":"array","title":"Queries Per Day"},"avg_queries_per_day":{"type":"number","title":"Avg Queries Per Day"},"avg_queries_per_developer":{"type":"number","title":"Avg Queries Per Developer"},"useful_result_rate":{"type":"number","title":"Useful Result Rate"},"top_developers":{"items":{"$ref":"#/components/schemas/DeveloperActivity"},"type":"array","title":"Top Developers"}},"type":"object","required":["period_start","period_end","new_api_keys","total_api_keys","activated_developers","total_developers","total_queries","queries_per_day","avg_queries_per_day","avg_queries_per_developer","useful_result_rate","top_developers"],"title":"KpiSnapshotResponse"},"LaunchWindowResponse":{"properties":{"total":{"type":"integer","title":"Total"},"agent_count":{"type":"integer","title":"Agent Count"},"success_count":{"type":"integer","title":"Success Count"},"error_count":{"type":"integer","title":"Error Count"},"error_rate":{"type":"number","title":"Error Rate"},"first_query_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Query At"},"first_external_query_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First External Query At"},"registrations":{"type":"integer","title":"Registrations"},"unique_keys":{"type":"integer","title":"Unique Keys"}},"type":"object","required":["total","agent_count","success_count","error_count","error_rate","registrations","unique_keys"],"title":"LaunchWindowResponse"},"LegacyRegisterRequest":{"properties":{"agent_name":{"type":"string","title":"Agent Name"},"contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact"},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"}},"type":"object","required":["agent_name"],"title":"LegacyRegisterRequest"},"LineItem":{"properties":{"product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Product Id"},"quantity":{"type":"integer","title":"Quantity","default":1},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"}},"type":"object","required":["amount"],"title":"LineItem"},"LinklessConversionRequest":{"properties":{"order_id":{"type":"string","title":"Order Id"},"line_items":{"items":{"$ref":"#/components/schemas/LineItem"},"type":"array","title":"Line Items"},"subtotal":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Subtotal"},"currency":{"type":"string","title":"Currency","default":"SGD"},"discount_amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Discount Amount","default":"0"},"promo_codes_used":{"items":{"type":"string"},"type":"array","title":"Promo Codes Used"},"referral_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Token"},"merchant_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Session Id"},"customer_status":{"type":"string","title":"Customer Status","default":"unknown"},"converted_at":{"type":"string","title":"Converted At"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["order_id","line_items","subtotal","converted_at"],"title":"LinklessConversionRequest"},"LogEntry":{"properties":{"timestamp":{"type":"string","title":"Timestamp"},"method":{"type":"string","title":"Method"},"path":{"type":"string","title":"Path"},"query_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Query Params"},"api_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Id"},"response_status":{"type":"integer","title":"Response Status"},"response_time_ms":{"type":"number","title":"Response Time Ms"},"ip":{"type":"string","title":"Ip"}},"type":"object","required":["timestamp","method","path","response_status","response_time_ms","ip"],"title":"LogEntry"},"LogQueryResponse":{"properties":{"logs":{"items":{"$ref":"#/components/schemas/LogEntry"},"type":"array","title":"Logs"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["logs","total"],"title":"LogQueryResponse"},"LowQualityProductSample":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"source":{"type":"string","title":"Source"},"region":{"type":"string","title":"Region"},"category":{"type":"string","title":"Category"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"overall_score":{"type":"number","title":"Overall Score"},"missing_fields":{"items":{"type":"string"},"type":"array","title":"Missing Fields"},"freshness_score":{"type":"number","title":"Freshness Score"},"completeness_score":{"type":"number","title":"Completeness Score"},"price_accuracy_score":{"type":"number","title":"Price Accuracy Score"},"is_stale":{"type":"boolean","title":"Is Stale"}},"type":"object","required":["product_id","source","region","category","title","url","overall_score","missing_fields","freshness_score","completeness_score","price_accuracy_score","is_stale"],"title":"LowQualityProductSample"},"MCPToolCount":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"calls":{"type":"integer","title":"Calls"}},"type":"object","required":["tool_name","calls"],"title":"MCPToolCount"},"MerchantAnalyticsResponse":{"properties":{"merchant_id":{"type":"string","title":"Merchant Id"},"period_days":{"type":"integer","title":"Period Days"},"total_products":{"type":"integer","title":"Total Products"},"search_impressions":{"type":"integer","title":"Search Impressions"},"total_clicks":{"type":"integer","title":"Total Clicks"},"click_through_rate":{"type":"number","title":"Click Through Rate"},"conversion_rate":{"type":"number","title":"Conversion Rate"},"top_products":{"items":{"$ref":"#/components/schemas/MerchantTopProduct"},"type":"array","title":"Top Products"},"daily_stats":{"items":{"$ref":"#/components/schemas/MerchantDailyStat"},"type":"array","title":"Daily Stats"}},"type":"object","required":["merchant_id","period_days","total_products","search_impressions","total_clicks","click_through_rate","conversion_rate","top_products","daily_stats"],"title":"MerchantAnalyticsResponse"},"MerchantCommission":{"properties":{"merchant":{"type":"string","title":"Merchant"},"platform":{"type":"string","title":"Platform"},"clicks":{"type":"integer","title":"Clicks"},"conversions":{"type":"integer","title":"Conversions"},"sale_amount":{"type":"number","title":"Sale Amount"},"commission_rate":{"type":"number","title":"Commission Rate"},"commission_amount":{"type":"number","title":"Commission Amount"},"currency":{"type":"string","title":"Currency","default":"SGD"}},"type":"object","required":["merchant","platform","clicks","conversions","sale_amount","commission_rate","commission_amount"],"title":"MerchantCommission"},"MerchantDailyStat":{"properties":{"date":{"type":"string","title":"Date"},"impressions":{"type":"integer","title":"Impressions"},"clicks":{"type":"integer","title":"Clicks"},"ctr":{"type":"number","title":"Ctr"}},"type":"object","required":["date","impressions","clicks","ctr"],"title":"MerchantDailyStat"},"MerchantDetail":{"properties":{"merchant_id":{"type":"string","title":"Merchant Id","description":"Unique merchant identifier"},"merchant_name":{"type":"string","title":"Merchant Name","description":"Merchant/store name"},"platform":{"type":"string","title":"Platform","description":"Source platform (e.g. shopee_sg, lazada_sg)"},"product_count":{"type":"integer","title":"Product Count","description":"Number of active products from this merchant"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","description":"Distinct product categories from this merchant"},"avg_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Rating","description":"Average product rating across merchant's products (0-5 scale)"},"last_scraped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Scraped At","description":"Timestamp of most recently scraped product from this merchant"},"sample_products":{"items":{"$ref":"#/components/schemas/ProductSummaryForMerchant"},"type":"array","title":"Sample Products","description":"Sample of active products from this merchant"}},"type":"object","required":["merchant_id","merchant_name","platform","product_count"],"title":"MerchantDetail"},"MerchantDetailResponse":{"properties":{"merchant":{"$ref":"#/components/schemas/MerchantDetail"}},"type":"object","required":["merchant"],"title":"MerchantDetailResponse"},"MerchantListResponse":{"properties":{"merchants":{"items":{"$ref":"#/components/schemas/MerchantSummary"},"type":"array","title":"Merchants"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["merchants","total","limit","offset"],"title":"MerchantListResponse"},"MerchantSummary":{"properties":{"merchant_id":{"type":"string","title":"Merchant Id","description":"Unique merchant identifier"},"merchant_name":{"type":"string","title":"Merchant Name","description":"Merchant/store name"},"platform":{"type":"string","title":"Platform","description":"Source platform (e.g. shopee_sg, lazada_sg)"},"product_count":{"type":"integer","title":"Product Count","description":"Number of active products from this merchant"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","description":"Distinct product categories from this merchant"},"avg_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Rating","description":"Average product rating across merchant's products (0-5 scale)"},"last_scraped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Scraped At","description":"Timestamp of most recently scraped product from this merchant"}},"type":"object","required":["merchant_id","merchant_name","platform","product_count"],"title":"MerchantSummary"},"MerchantTopProduct":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"title":{"type":"string","title":"Title"},"impressions":{"type":"integer","title":"Impressions"},"clicks":{"type":"integer","title":"Clicks"},"ctr":{"type":"number","title":"Ctr"}},"type":"object","required":["product_id","title","impressions","clicks","ctr"],"title":"MerchantTopProduct"},"NewsletterSubscriptionCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["email"],"title":"NewsletterSubscriptionCreate"},"NewsletterSubscriptionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"subscribed_at":{"type":"string","format":"date-time","title":"Subscribed At"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["id","email","is_active","subscribed_at"],"title":"NewsletterSubscriptionResponse"},"PeakHour":{"properties":{"hour":{"type":"integer","title":"Hour"},"requests":{"type":"integer","title":"Requests"}},"type":"object","required":["hour","requests"],"title":"PeakHour"},"PeriodBreakdown":{"properties":{"period":{"type":"string","title":"Period"},"total_clicks":{"type":"integer","title":"Total Clicks"},"total_conversions":{"type":"integer","title":"Total Conversions"},"total_sale_amount":{"type":"number","title":"Total Sale Amount"},"total_commission":{"type":"number","title":"Total Commission"},"currency":{"type":"string","title":"Currency","default":"SGD"},"by_merchant":{"items":{"$ref":"#/components/schemas/MerchantCommission"},"type":"array","title":"By Merchant"}},"type":"object","required":["period","total_clicks","total_conversions","total_sale_amount","total_commission","by_merchant"],"title":"PeriodBreakdown"},"PlatformCompleteness":{"properties":{"source":{"type":"string","title":"Source"},"total_products":{"type":"integer","title":"Total Products"},"overall_completeness_pct":{"type":"number","title":"Overall Completeness Pct"},"field_breakdown":{"items":{"$ref":"#/components/schemas/FieldCompleteness"},"type":"array","title":"Field Breakdown"}},"type":"object","required":["source","total_products","overall_completeness_pct","field_breakdown"],"title":"PlatformCompleteness"},"PlatformCompliance":{"properties":{"source":{"type":"string","title":"Source"},"total":{"type":"integer","title":"Total"},"compliant":{"type":"integer","title":"Compliant"},"compliance_rate":{"type":"number","title":"Compliance Rate"}},"type":"object","required":["source","total","compliant","compliance_rate"],"title":"PlatformCompliance"},"PlatformMetrics":{"properties":{"source":{"type":"string","title":"Source"},"total_products":{"type":"integer","title":"Total Products"},"active_products":{"type":"integer","title":"Active Products"},"compliant_products":{"type":"integer","title":"Compliant Products"},"products_with_image":{"type":"integer","title":"Products With Image"},"stale_products":{"type":"integer","title":"Stale Products"},"quality_score":{"type":"number","title":"Quality Score"},"error_rate":{"type":"number","title":"Error Rate"},"is_stale":{"type":"boolean","title":"Is Stale"},"is_low_quality":{"type":"boolean","title":"Is Low Quality"},"hours_since_last_run":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hours Since Last Run"},"last_run":{"anyOf":[{"$ref":"#/components/schemas/app__routers__metrics__IngestionRunInfo"},{"type":"null"}]},"trend":{"$ref":"#/components/schemas/PlatformTrend"}},"type":"object","required":["source","total_products","active_products","compliant_products","products_with_image","stale_products","quality_score","error_rate","is_stale","is_low_quality","trend"],"title":"PlatformMetrics"},"PlatformProductCount":{"properties":{"source":{"type":"string","title":"Source"},"product_count":{"type":"integer","title":"Product Count"},"last_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Updated"}},"type":"object","required":["source","product_count"],"title":"PlatformProductCount"},"PlatformTrend":{"properties":{"current_count":{"type":"integer","title":"Current Count"},"change_24h":{"type":"integer","title":"Change 24H"},"change_168h":{"type":"integer","title":"Change 168H"}},"type":"object","required":["current_count","change_24h","change_168h"],"title":"PlatformTrend"},"PreferenceCreateRequest":{"properties":{"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories","description":"Categories to notify about"},"price_min":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Min","description":"Minimum price threshold"},"price_max":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Max","description":"Maximum price threshold"},"price_threshold":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Threshold","description":"Price drop threshold percentage to trigger notification"},"frequency":{"type":"string","title":"Frequency","description":"Notification frequency: realtime, hourly, daily","default":"realtime"},"sources":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sources","description":"Product sources to filter (e.g., shopee_sg, lazada_sg)"},"brands":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Brands","description":"Brands to notify about"},"notification_enabled":{"type":"boolean","title":"Notification Enabled","description":"Enable/disable notifications","default":true},"notification_channel":{"type":"string","title":"Notification Channel","description":"Notification channel: email, push, or webhook","default":"webhook"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email address for email notifications"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Webhook URL for notifications"}},"type":"object","title":"PreferenceCreateRequest"},"PreferenceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"developer_id":{"type":"string","title":"Developer Id"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"price_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Min"},"price_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Max"},"price_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Threshold"},"frequency":{"type":"string","title":"Frequency"},"sources":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sources"},"brands":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Brands"},"notification_enabled":{"type":"boolean","title":"Notification Enabled"},"notification_channel":{"type":"string","title":"Notification Channel"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","developer_id","frequency","notification_enabled","notification_channel","is_active","created_at","updated_at"],"title":"PreferenceResponse"},"PreferenceUpdateRequest":{"properties":{"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"price_min":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Min"},"price_max":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Max"},"price_threshold":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Threshold"},"frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Frequency"},"sources":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sources"},"brands":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Brands"},"notification_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Notification Enabled"},"notification_channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Channel"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"}},"type":"object","title":"PreferenceUpdateRequest"},"PriceComparisonResponse":{"properties":{"source_product_id":{"type":"integer","title":"Source Product Id"},"source_product_name":{"type":"string","title":"Source Product Name"},"items":{"items":{},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"cheapest_product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cheapest Product Id"},"fastest_delivery_product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fastest Delivery Product Id"},"best_rated_product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Rated Product Id"}},"type":"object","required":["source_product_id","source_product_name","items","total"],"title":"PriceComparisonResponse"},"PriceDropItem":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"title":{"type":"string","title":"Title"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"previous_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Previous Price"},"current_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Current Price"},"pct_drop":{"type":"number","title":"Pct Drop"},"retailer":{"type":"string","title":"Retailer"}},"type":"object","required":["product_id","title","image","previous_price","current_price","pct_drop","retailer"],"title":"PriceDropItem"},"PriceDropsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PriceDropItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"cached_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cached At"}},"type":"object","required":["items","total"],"title":"PriceDropsResponse"},"PriceHistoryAggregationEntry":{"properties":{"date":{"type":"string","title":"Date","description":"Date in YYYY-MM-DD format"},"min_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Min Price"},"max_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Max Price"},"avg_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Avg Price"},"price_count":{"type":"integer","title":"Price Count","description":"Number of price records on this date"},"currency":{"type":"string","title":"Currency"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform","description":"Source platform if aggregated by platform, else null for all platforms"}},"type":"object","required":["date","min_price","max_price","avg_price","price_count","currency"],"title":"PriceHistoryAggregationEntry"},"PriceHistoryEntry":{"properties":{"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"platform":{"type":"string","title":"Platform","description":"Source platform (e.g. shopee_sg, lazada_sg)"},"scraped_at":{"type":"string","format":"date-time","title":"Scraped At","description":"Timestamp when price was scraped"}},"type":"object","required":["price","currency","platform","scraped_at"],"title":"PriceHistoryEntry"},"PriceHistoryResponse":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"entries":{"items":{"$ref":"#/components/schemas/PriceHistoryEntry"},"type":"array","title":"Entries"},"aggregated_entries":{"items":{"$ref":"#/components/schemas/PriceHistoryAggregationEntry"},"type":"array","title":"Aggregated Entries","description":"Aggregated daily time series when aggregate=daily is requested"},"total":{"type":"integer","title":"Total"},"aggregate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aggregate","description":"Aggregation type: 'daily' if aggregated"},"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period","description":"Period requested (e.g. '30d')"}},"type":"object","required":["product_id","total"],"title":"PriceHistoryResponse"},"PriceMissingReason":{"type":"string","enum":["retailer_api_error","retailer_timeout","product_unavailable","price_not_disclosed","crawl_error"],"title":"PriceMissingReason"},"PricePredictionResponse":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"predicted_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Predicted Price"},"confidence":{"type":"number","title":"Confidence"},"prediction_date":{"type":"string","format":"date-time","title":"Prediction Date"},"factors":{"items":{"type":"string"},"type":"array","title":"Factors"}},"type":"object","required":["product_id","predicted_price","confidence","prediction_date","factors"],"title":"PricePredictionResponse"},"ProductAvailabilityResponse":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"canonical_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Canonical Id"},"platforms":{"items":{},"type":"array","title":"Platforms"},"overall_status":{"type":"string","title":"Overall Status"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked At"},"is_stale":{"type":"boolean","title":"Is Stale","default":false}},"type":"object","required":["product_id","overall_status"],"title":"ProductAvailabilityResponse"},"ProductCountSnapshot":{"properties":{"source":{"type":"string","title":"Source"},"product_count":{"type":"integer","title":"Product Count"},"snapshot_time":{"type":"string","format":"date-time","title":"Snapshot Time"},"hours_since":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hours Since"}},"type":"object","required":["source","product_count","snapshot_time"],"title":"ProductCountSnapshot"},"ProductCountTrend":{"properties":{"trend":{"items":{"$ref":"#/components/schemas/ProductCountTrendPoint"},"type":"array","title":"Trend"},"is_stale":{"type":"boolean","title":"Is Stale"},"hours_flat":{"type":"number","title":"Hours Flat"}},"type":"object","required":["trend","is_stale","hours_flat"],"title":"ProductCountTrend"},"ProductCountTrendPoint":{"properties":{"snapshot_time":{"type":"string","format":"date-time","title":"Snapshot Time"},"product_count":{"type":"integer","title":"Product Count"},"hours_ago":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hours Ago"}},"type":"object","required":["snapshot_time","product_count"],"title":"ProductCountTrendPoint"},"ProductListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Total matching products across all pages"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/ProductResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More","default":false},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque cursor for the next page"},"facets":{"anyOf":[{},{"type":"null"}],"title":"Facets"},"highlights":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Highlights"}},"type":"object","required":["total","limit","offset","items"],"title":"ProductListResponse"},"ProductMatchesResponse":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"matches":{"items":{"$ref":"#/components/schemas/CompareMatch"},"type":"array","title":"Matches"},"total_matches":{"type":"integer","title":"Total Matches"}},"type":"object","required":["product_id","matches","total_matches"],"title":"ProductMatchesResponse"},"ProductResponse":{"properties":{"id":{"type":"integer","title":"Id"},"sku":{"type":"string","title":"Sku"},"source":{"type":"string","title":"Source"},"merchant_id":{"type":"string","title":"Merchant Id"},"name":{"type":"string","title":"Name","description":"Product title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"price_sgd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price Sgd","description":"Price normalized to SGD"},"usd_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Usd Price","description":"Price normalized to USD"},"converted_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Converted Price","description":"Price converted to requested currency (when ?currency= param is used)"},"converted_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Converted Currency","description":"Currency of converted_price"},"buy_url":{"type":"string","title":"Buy Url","description":"Direct purchase URL"},"affiliate_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Url","description":"Tracked affiliate URL (use this to send traffic)"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Barcode","description":"UPC/EAN barcode for the product"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"category_path":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Category Path"},"rating":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rating"},"review_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Review Count","description":"Number of reviews from aggregated sources"},"avg_rating":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Avg Rating","description":"Average rating from aggregated sources (0-5)"},"rating_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating Source","description":"Source of the aggregated rating (e.g. 'scraped', 'platform_api')"},"region":{"type":"string","title":"Region","description":"Geographic region (e.g. sg, us, sea, eu, au)","default":"sg"},"country_code":{"type":"string","title":"Country Code","description":"ISO 3166-1 alpha-2 country code","default":"SG"},"is_available":{"type":"boolean","title":"Is Available","description":"Whether product is currently in stock and available for purchase"},"in_stock":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In Stock","description":"Whether product is in stock"},"stock_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stock Level","description":"Stock level: low, medium, or high"},"last_checked":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked","description":"Timestamp when availability was last checked"},"data_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Data Updated At","description":"Timestamp when product data was last updated"},"availability_prediction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Availability Prediction","description":"Predicted availability based on historical patterns (e.g., 'likely_in_stock', 'likely_out_of_stock')"},"competitor_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Competitor Count","description":"Number of platforms selling the same product"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score","description":"Confidence score of search match (0-1)"},"specs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Specs","description":"Product specifications as key-value pairs for comparison (e.g. {color: 'Black', storage: '256GB'})"},"metadata":{"anyOf":[{},{"type":"null"}],"title":"Metadata"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"price_trend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Trend","description":"30-day price trend: 'up', 'down', or 'stable'"}},"type":"object","required":["id","sku","source","merchant_id","name","price","currency","buy_url","is_available","updated_at"],"title":"ProductResponse"},"ProductReviewsResponse":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"reviews":{"items":{},"type":"array","title":"Reviews"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["product_id","reviews","total"],"title":"ProductReviewsResponse"},"ProductStockResponse":{"properties":{"id":{"type":"integer","title":"Id"},"stock_level":{"type":"string","title":"Stock Level"},"quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quantity"},"in_stock":{"type":"boolean","title":"In Stock"},"last_checked":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked"}},"type":"object","required":["id","stock_level","in_stock"],"title":"ProductStockResponse"},"ProductSummaryForMerchant":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"url":{"type":"string","title":"Url"},"rating":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rating"},"in_stock":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In Stock"}},"type":"object","required":["id","name","price","currency","url"],"title":"ProductSummaryForMerchant"},"ProductURLAvailabilityResponse":{"properties":{"url":{"type":"string","title":"Url"},"is_available":{"type":"boolean","title":"Is Available"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"response_time_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Time Ms"},"checked_at":{"type":"string","format":"date-time","title":"Checked At"}},"type":"object","required":["url","is_available","checked_at"],"title":"ProductURLAvailabilityResponse"},"PromoReservationResponse":{"properties":{"id":{"type":"string","title":"Id"},"merchant_id":{"type":"string","title":"Merchant Id"},"code":{"type":"string","title":"Code"},"is_exclusive":{"type":"boolean","title":"Is Exclusive"},"valid_from":{"type":"string","title":"Valid From"},"valid_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid Until"}},"type":"object","required":["id","merchant_id","code","is_exclusive","valid_from"],"title":"PromoReservationResponse"},"ProvisionRequest":{"properties":{"developer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Developer Id","default":"test-developer"},"name":{"type":"string","title":"Name"},"tier":{"type":"string","title":"Tier","default":"basic"},"admin_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Secret","default":"wrong-secret"}},"type":"object","required":["name"],"title":"ProvisionRequest"},"ProvisionResponse":{"properties":{"key_id":{"type":"string","title":"Key Id"},"raw_key":{"type":"string","title":"Raw Key"},"tier":{"type":"string","title":"Tier"},"message":{"type":"string","title":"Message"}},"type":"object","required":["key_id","raw_key","tier","message"],"title":"ProvisionResponse"},"PublicAlertCreateRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"User email address for notifications"},"product_id":{"type":"integer","title":"Product Id","description":"Product ID to monitor"},"target_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Target Price","description":"Target price"},"currency":{"type":"string","enum":["SGD","USD"],"title":"Currency","description":"Currency for target price","default":"SGD"}},"type":"object","required":["email","product_id","target_price"],"title":"PublicAlertCreateRequest"},"PublicAlertResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"product_id":{"type":"integer","title":"Product Id"},"product_name":{"type":"string","title":"Product Name"},"product_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Image Url"},"product_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Url"},"price_at_add":{"type":"number","title":"Price At Add"},"target_price":{"type":"number","title":"Target Price"},"currency":{"type":"string","title":"Currency"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","product_id","product_name","price_at_add","target_price","currency","is_active","created_at"],"title":"PublicAlertResponse"},"PublicCatalogHealthReport":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"total_products":{"type":"integer","title":"Total Products"},"markets":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Markets"}},"type":"object","required":["generated_at","total_products","markets"],"title":"PublicCatalogHealthReport"},"PublicStatusResponse":{"properties":{"status":{"type":"string","title":"Status"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"version":{"type":"string","title":"Version"}},"type":"object","required":["status","timestamp","version"],"title":"PublicStatusResponse"},"PushSubscriptionListResponse":{"properties":{"subscriptions":{"items":{"$ref":"#/components/schemas/PushSubscriptionResponse"},"type":"array","title":"Subscriptions"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["subscriptions","total"],"title":"PushSubscriptionListResponse"},"PushSubscriptionRequest":{"properties":{"endpoint":{"type":"string","title":"Endpoint","description":"Push subscription endpoint URL"},"p256dh":{"type":"string","title":"P256Dh","description":"User public key for push encryption"},"auth":{"type":"string","title":"Auth","description":"User auth secret for push encryption"}},"type":"object","required":["endpoint","p256dh","auth"],"title":"PushSubscriptionRequest"},"PushSubscriptionResponse":{"properties":{"id":{"type":"string","title":"Id"},"endpoint":{"type":"string","title":"Endpoint"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","endpoint","is_active","created_at"],"title":"PushSubscriptionResponse"},"QueryHistoryEntry":{"properties":{"endpoint":{"type":"string","title":"Endpoint"},"method":{"type":"string","title":"Method"},"status_code":{"type":"integer","title":"Status Code"},"timestamp":{"type":"string","title":"Timestamp"},"response_time_ms":{"type":"number","title":"Response Time Ms"},"api_key_id":{"type":"string","title":"Api Key Id"}},"type":"object","required":["endpoint","method","status_code","timestamp","response_time_ms","api_key_id"],"title":"QueryHistoryEntry"},"QueryHistoryResponse":{"properties":{"queries":{"items":{"$ref":"#/components/schemas/QueryHistoryEntry"},"type":"array","title":"Queries"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["queries","total_count"],"title":"QueryHistoryResponse"},"QueryStatsDetailResponse":{"properties":{"summary":{"$ref":"#/components/schemas/QueryStatsResponse"},"daily_breakdown":{"items":{"$ref":"#/components/schemas/DailyQueryBreakdown"},"type":"array","title":"Daily Breakdown"}},"type":"object","required":["summary","daily_breakdown"],"title":"QueryStatsDetailResponse"},"QueryStatsResponse":{"properties":{"total_queries_today":{"type":"integer","title":"Total Queries Today"},"total_queries_week":{"type":"integer","title":"Total Queries Week"},"total_queries_month":{"type":"integer","title":"Total Queries Month"},"unique_api_keys_today":{"type":"integer","title":"Unique Api Keys Today"},"unique_api_keys_week":{"type":"integer","title":"Unique Api Keys Week"},"unique_api_keys_month":{"type":"integer","title":"Unique Api Keys Month"},"goal_monthly_queries":{"type":"integer","title":"Goal Monthly Queries"},"goal_progress_pct":{"type":"number","title":"Goal Progress Pct"}},"type":"object","required":["total_queries_today","total_queries_week","total_queries_month","unique_api_keys_today","unique_api_keys_week","unique_api_keys_month","goal_monthly_queries","goal_progress_pct"],"title":"QueryStatsResponse"},"QuestionCreateRequest":{"properties":{"question":{"type":"string","maxLength":1000,"minLength":10,"title":"Question","description":"The question text"},"author_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Id","description":"ID of the asking agent or user"}},"type":"object","required":["question"],"title":"QuestionCreateRequest"},"QuestionDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"product_id":{"type":"integer","title":"Product Id"},"question":{"type":"string","title":"Question"},"asked_by":{"type":"string","title":"Asked By"},"asked_at":{"type":"string","format":"date-time","title":"Asked At"},"answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer"},"answered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answered By"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"is_helpful":{"type":"integer","title":"Is Helpful"},"not_helpful":{"type":"integer","title":"Not Helpful"}},"type":"object","required":["id","product_id","question","asked_by","asked_at","is_helpful","not_helpful"],"title":"QuestionDetailResponse"},"QuestionListResponse":{"properties":{"questions":{"items":{"$ref":"#/components/schemas/QuestionResponse"},"type":"array","title":"Questions"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["questions","total","page","page_size"],"title":"QuestionListResponse"},"QuestionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"product_id":{"type":"integer","title":"Product Id"},"question":{"type":"string","title":"Question"},"asked_by":{"type":"string","title":"Asked By"},"asked_at":{"type":"string","format":"date-time","title":"Asked At"},"is_answered":{"type":"boolean","title":"Is Answered"},"answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"answered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answered By"}},"type":"object","required":["id","product_id","question","asked_by","asked_at","is_answered"],"title":"QuestionResponse"},"RawClickEvent":{"properties":{"tracking_id":{"type":"string","title":"Tracking Id"},"product_id":{"type":"integer","title":"Product Id"},"platform":{"type":"string","title":"Platform"},"destination_url":{"type":"string","title":"Destination Url"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"api_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"affiliate_partner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Partner"},"clicked_at":{"type":"string","format":"date-time","title":"Clicked At"}},"type":"object","required":["tracking_id","product_id","platform","destination_url","clicked_at"],"title":"RawClickEvent"},"RecommendationsResponse":{"properties":{"source_product_id":{"type":"integer","title":"Source Product Id"},"source_product_name":{"type":"string","title":"Source Product Name"},"items":{"items":{},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["source_product_id","source_product_name","items","total"],"title":"RecommendationsResponse"},"ReferralActivationResponse":{"properties":{"referee_developer_id":{"type":"string","title":"Referee Developer Id"},"bonus_api_calls_granted":{"type":"integer","title":"Bonus Api Calls Granted"},"referrer_bonus_awarded":{"type":"integer","title":"Referrer Bonus Awarded"},"referral_code":{"type":"string","title":"Referral Code"},"activated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activated At"}},"type":"object","required":["referee_developer_id","bonus_api_calls_granted","referrer_bonus_awarded","referral_code","activated_at"],"title":"ReferralActivationResponse"},"ReferralCodeCreateResponse":{"properties":{"code":{"type":"string","title":"Code"},"referral_url":{"type":"string","title":"Referral Url"},"bonus_api_calls":{"type":"integer","title":"Bonus Api Calls"},"referrer_bonus":{"type":"integer","title":"Referrer Bonus"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","referral_url","bonus_api_calls","referrer_bonus","message"],"title":"ReferralCodeCreateResponse"},"ReferralCodeStatusResponse":{"properties":{"code":{"type":"string","title":"Code"},"referral_url":{"type":"string","title":"Referral Url"},"is_active":{"type":"boolean","title":"Is Active"},"bonus_api_calls":{"type":"integer","title":"Bonus Api Calls"},"referrer_bonus":{"type":"integer","title":"Referrer Bonus"},"uses_count":{"type":"integer","title":"Uses Count"},"total_referrer_bonus_awarded":{"type":"integer","title":"Total Referrer Bonus Awarded"}},"type":"object","required":["code","referral_url","is_active","bonus_api_calls","referrer_bonus","uses_count","total_referrer_bonus_awarded"],"title":"ReferralCodeStatusResponse"},"ReferralCreditsResponse":{"properties":{"developer_id":{"type":"string","title":"Developer Id"},"total_referral_credits":{"type":"integer","title":"Total Referral Credits"},"active_codes":{"type":"integer","title":"Active Codes"},"total_signups":{"type":"integer","title":"Total Signups"},"total_referrer_bonus_awarded":{"type":"integer","title":"Total Referrer Bonus Awarded"}},"type":"object","required":["developer_id","total_referral_credits","active_codes","total_signups","total_referrer_bonus_awarded"],"title":"ReferralCreditsResponse"},"ReferralLinkClickRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"ReferralLinkClickRequest"},"ReferralShareResponse":{"properties":{"code":{"type":"string","title":"Code"},"referral_url":{"type":"string","title":"Referral Url"},"email_copy":{"type":"string","title":"Email Copy"},"twitter_copy":{"type":"string","title":"Twitter Copy"},"linkedin_copy":{"type":"string","title":"Linkedin Copy"},"slack_copy":{"type":"string","title":"Slack Copy"}},"type":"object","required":["code","referral_url","email_copy","twitter_copy","linkedin_copy","slack_copy"],"title":"ReferralShareResponse"},"ReferralSignupRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"ReferralSignupRequest"},"ReferralSignupResponse":{"properties":{"bonus_api_calls_granted":{"type":"integer","title":"Bonus Api Calls Granted"},"total_bonus_received":{"type":"integer","title":"Total Bonus Received"},"message":{"type":"string","title":"Message"}},"type":"object","required":["bonus_api_calls_granted","total_bonus_received","message"],"title":"ReferralSignupResponse"},"RegionCount":{"properties":{"region":{"type":"string","title":"Region"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"requests":{"type":"integer","title":"Requests"}},"type":"object","required":["region","country","requests"],"title":"RegionCount"},"ResendVerificationRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ResendVerificationRequest"},"ReservePromoRequest":{"properties":{"merchant_id":{"type":"string","title":"Merchant Id"},"code":{"type":"string","title":"Code"},"is_exclusive":{"type":"boolean","title":"Is Exclusive","default":true},"valid_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid Until"}},"type":"object","required":["merchant_id","code"],"title":"ReservePromoRequest"},"RevenueDashboardResponse":{"properties":{"total_clicks":{"type":"integer","title":"Total Clicks"},"total_conversions":{"type":"integer","title":"Total Conversions"},"conversion_rate":{"type":"number","title":"Conversion Rate"},"total_revenue":{"type":"number","title":"Total Revenue"},"currency":{"type":"string","title":"Currency","default":"SGD"},"by_source":{"items":{"$ref":"#/components/schemas/SourceRevenue"},"type":"array","title":"By Source"},"by_day":{"items":{"$ref":"#/components/schemas/DailyRevenue"},"type":"array","title":"By Day"}},"type":"object","required":["total_clicks","total_conversions","conversion_rate","total_revenue","by_source","by_day"],"title":"RevenueDashboardResponse"},"SavedSearchCreateRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Human-readable name for this saved search"},"query":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Query","description":"Full-text search query"},"filters":{"additionalProperties":true,"type":"object","title":"Filters","description":"Search filters (category, min_price, max_price, platform, country, in_stock, etc.)"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Optional webhook URL to call when new matches are found"},"webhook_events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Webhook Events","description":"Webhook event types to trigger (e.g., ['new_product', 'price_drop'])"}},"type":"object","required":["name"],"title":"SavedSearchCreateRequest"},"SavedSearchListResponse":{"properties":{"saved_searches":{"items":{"$ref":"#/components/schemas/SavedSearchResponse"},"type":"array","title":"Saved Searches"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["saved_searches","total"],"title":"SavedSearchListResponse"},"SavedSearchResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"},"filters":{"additionalProperties":true,"type":"object","title":"Filters"},"is_active":{"type":"boolean","title":"Is Active"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"webhook_events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Webhook Events"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"last_result_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Result Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","filters","is_active","created_at","updated_at"],"title":"SavedSearchResponse"},"SavedSearchUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"query":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Query"},"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"webhook_events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Webhook Events"}},"type":"object","title":"SavedSearchUpdateRequest"},"SchemaComplianceReport":{"properties":{"total_products":{"type":"integer","title":"Total Products"},"compliant_products":{"type":"integer","title":"Compliant Products"},"compliance_rate":{"type":"number","title":"Compliance Rate"},"by_platform":{"items":{"$ref":"#/components/schemas/PlatformCompliance"},"type":"array","title":"By Platform"},"missing_title":{"type":"integer","title":"Missing Title"},"missing_price":{"type":"integer","title":"Missing Price"},"missing_source":{"type":"integer","title":"Missing Source"},"missing_source_id":{"type":"integer","title":"Missing Source Id"},"missing_url":{"type":"integer","title":"Missing Url"},"incomplete_products":{"type":"integer","title":"Incomplete Products"}},"type":"object","required":["total_products","compliant_products","compliance_rate","by_platform","missing_title","missing_price","missing_source","missing_source_id","missing_url","incomplete_products"],"title":"SchemaComplianceReport"},"ScraperAlertConfigCreate":{"properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source to alert on (null = all sources)"},"alert_type":{"type":"string","title":"Alert Type","description":"Type: stalled, failed, no_products, low_insert_rate"},"threshold_hours":{"type":"integer","maximum":168.0,"minimum":1.0,"title":"Threshold Hours","description":"Hours threshold for stalled alert","default":24},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Webhook URL to POST alerts to"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email address to send alerts to"},"is_enabled":{"type":"boolean","title":"Is Enabled","description":"Whether this alert config is active","default":true}},"type":"object","required":["alert_type"],"title":"ScraperAlertConfigCreate"},"ScraperAlertConfigResponse":{"properties":{"id":{"type":"integer","title":"Id"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"alert_type":{"type":"string","title":"Alert Type"},"threshold_hours":{"type":"integer","title":"Threshold Hours"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"is_enabled":{"type":"boolean","title":"Is Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","source","alert_type","threshold_hours","webhook_url","email","is_enabled","created_at","updated_at"],"title":"ScraperAlertConfigResponse"},"ScraperAlertLogResponse":{"properties":{"id":{"type":"integer","title":"Id"},"source":{"type":"string","title":"Source"},"alert_type":{"type":"string","title":"Alert Type"},"message":{"type":"string","title":"Message"},"severity":{"type":"string","title":"Severity"},"rows_inserted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Inserted"},"rows_updated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Updated"},"rows_failed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Failed"},"is_sent":{"type":"boolean","title":"Is Sent"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","source","alert_type","message","severity","rows_inserted","rows_updated","rows_failed","is_sent","sent_at","created_at"],"title":"ScraperAlertLogResponse"},"ScraperAssignmentCreate":{"properties":{"platform":{"type":"string","title":"Platform","description":"Platform name (e.g., shopee_sg)"},"agent_id":{"type":"string","title":"Agent Id","description":"Agent ID assigned to this platform"},"priority":{"type":"string","title":"Priority","description":"Priority: high, medium, or low","default":"medium"},"interval_hours":{"type":"integer","maximum":168.0,"minimum":1.0,"title":"Interval Hours","description":"Hours between scrapes","default":6},"is_active":{"type":"boolean","title":"Is Active","description":"Whether this assignment is active","default":true}},"type":"object","required":["platform","agent_id"],"title":"ScraperAssignmentCreate"},"ScraperAssignmentListResponse":{"properties":{"assignments":{"items":{"$ref":"#/components/schemas/ScraperAssignmentResponse"},"type":"array","title":"Assignments"},"total":{"type":"integer","title":"Total"},"platforms":{"items":{"type":"string"},"type":"array","title":"Platforms"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},"type":"object","required":["assignments","total","platforms"],"title":"ScraperAssignmentListResponse"},"ScraperAssignmentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"platform":{"type":"string","title":"Platform"},"agent_id":{"type":"string","title":"Agent Id"},"priority":{"type":"string","title":"Priority"},"interval_hours":{"type":"integer","title":"Interval Hours"},"is_active":{"type":"boolean","title":"Is Active"},"assigned_at":{"type":"string","format":"date-time","title":"Assigned At"},"last_heartbeat":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Heartbeat"}},"type":"object","required":["id","platform","agent_id","priority","interval_hours","is_active","assigned_at"],"title":"ScraperAssignmentResponse"},"ScraperAssignmentUpdate":{"properties":{"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID assigned to this platform"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority","description":"Priority: high, medium, or low"},"interval_hours":{"anyOf":[{"type":"integer","maximum":168.0,"minimum":1.0},{"type":"null"}],"title":"Interval Hours","description":"Hours between scrapes"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Whether this assignment is active"}},"type":"object","title":"ScraperAssignmentUpdate"},"ScraperHealth":{"properties":{"source":{"type":"string","title":"Source"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"last_run_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run Status"},"last_rows_inserted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Rows Inserted"},"last_rows_updated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Rows Updated"},"last_rows_failed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Rows Failed"},"product_count":{"type":"integer","title":"Product Count","default":0},"is_healthy":{"type":"boolean","title":"Is Healthy","default":false},"hours_since_last_run":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hours Since Last Run"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["source"],"title":"ScraperHealth"},"ScraperHealthReport":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"scrapers":{"items":{"$ref":"#/components/schemas/ScraperHealth"},"type":"array","title":"Scrapers"},"total_scrapers":{"type":"integer","title":"Total Scrapers"},"healthy_count":{"type":"integer","title":"Healthy Count"},"unhealthy_count":{"type":"integer","title":"Unhealthy Count"}},"type":"object","required":["generated_at","scrapers","total_scrapers","healthy_count","unhealthy_count"],"title":"ScraperHealthReport"},"SearchAnalyticsResponse":{"properties":{"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"total_searches":{"type":"integer","title":"Total Searches"},"avg_response_time_ms":{"type":"number","title":"Avg Response Time Ms"},"top_queries":{"items":{"$ref":"#/components/schemas/TopSearchQuery"},"type":"array","title":"Top Queries"},"zero_result_queries":{"items":{"$ref":"#/components/schemas/ZeroResultQuery"},"type":"array","title":"Zero Result Queries"},"popular_categories":{"items":{"$ref":"#/components/schemas/TopCategory"},"type":"array","title":"Popular Categories"}},"type":"object","required":["period_start","period_end","total_searches","avg_response_time_ms","top_queries","zero_result_queries","popular_categories"],"title":"SearchAnalyticsResponse"},"SearchFiltersResponse":{"properties":{"categories":{"items":{},"type":"array","title":"Categories"},"brands":{"items":{},"type":"array","title":"Brands"},"platforms":{"items":{},"type":"array","title":"Platforms"},"countries":{"items":{},"type":"array","title":"Countries"},"price_ranges":{"items":{},"type":"array","title":"Price Ranges"},"rating_ranges":{"items":{},"type":"array","title":"Rating Ranges"},"price_min":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price Min"},"price_max":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price Max"}},"type":"object","required":["categories","brands","platforms","countries","price_ranges","rating_ranges","price_min","price_max"],"title":"SearchFiltersResponse"},"SearchHistoryEntry":{"properties":{"id":{"type":"integer","title":"Id"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"},"filters":{"additionalProperties":true,"type":"object","title":"Filters"},"result_count":{"type":"integer","title":"Result Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","filters","result_count","created_at"],"title":"SearchHistoryEntry"},"SearchHistoryListResponse":{"properties":{"searches":{"items":{"$ref":"#/components/schemas/SearchHistoryEntry"},"type":"array","title":"Searches"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["searches","total","limit","offset","has_more"],"title":"SearchHistoryListResponse"},"SessionClaimRequest":{"properties":{"referral_token":{"type":"string","title":"Referral Token"},"merchant_session_id":{"type":"string","title":"Merchant Session Id"},"merchant_id":{"type":"string","title":"Merchant Id"},"ip_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Country"}},"type":"object","required":["referral_token","merchant_session_id","merchant_id"],"title":"SessionClaimRequest"},"SessionClaimResponse":{"properties":{"id":{"type":"string","title":"Id"},"referral_token":{"type":"string","title":"Referral Token"},"merchant_session_id":{"type":"string","title":"Merchant Session Id"},"merchant_id":{"type":"string","title":"Merchant Id"},"claimed_at":{"type":"string","title":"Claimed At"}},"type":"object","required":["id","referral_token","merchant_session_id","merchant_id","claimed_at"],"title":"SessionClaimResponse"},"SessionsResponse":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/AgentSession"},"type":"array","title":"Sessions"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["sessions","total","limit","offset"],"title":"SessionsResponse"},"SignupStartRequest":{"properties":{"developer_id":{"type":"string","title":"Developer Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","required":["developer_id"],"title":"SignupStartRequest"},"SignupStartResponse":{"properties":{"tracked":{"type":"boolean","title":"Tracked"}},"type":"object","required":["tracked"],"title":"SignupStartResponse"},"SignupTrackingRequest":{"properties":{"experiment_variant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Experiment Variant"},"discovery_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discovery Path"},"referrer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer"}},"type":"object","title":"SignupTrackingRequest"},"SignupTrackingResponse":{"properties":{"tracked":{"type":"boolean","title":"Tracked"},"developer_id":{"type":"string","title":"Developer Id"}},"type":"object","required":["tracked","developer_id"],"title":"SignupTrackingResponse"},"SimilarProductsResponse":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"items":{"items":{},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["product_id","items","total"],"title":"SimilarProductsResponse"},"SimpleHealthResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Overall status: ok, degraded, or down"},"environment":{"type":"string","title":"Environment","description":"Runtime environment: development, staging, or production"},"database_connected":{"type":"boolean","title":"Database Connected","description":"Database connection ok"},"cache_connected":{"type":"boolean","title":"Cache Connected","description":"Cache (Redis) connection ok"},"uptime_seconds":{"type":"number","title":"Uptime Seconds","description":"Process uptime in seconds"},"version":{"type":"string","title":"Version","description":"Application version"},"product_count":{"type":"integer","title":"Product Count","description":"Total active product count"},"last_ingestion_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Ingestion Time","description":"Most recent ingestion run completion time"}},"type":"object","required":["status","environment","database_connected","cache_connected","uptime_seconds","version","product_count"],"title":"SimpleHealthResponse"},"SourceInfo":{"properties":{"source":{"type":"string","title":"Source"},"name":{"type":"string","title":"Name"},"country":{"type":"string","title":"Country"},"url_pattern":{"type":"string","title":"Url Pattern"},"product_count":{"type":"integer","title":"Product Count"},"merchant_count":{"type":"integer","title":"Merchant Count"},"avg_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Avg Price"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"last_run_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run Status"},"is_healthy":{"type":"boolean","title":"Is Healthy"}},"type":"object","required":["source","name","country","url_pattern","product_count","merchant_count","is_healthy"],"title":"SourceInfo"},"SourceListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"items":{"items":{"$ref":"#/components/schemas/SourceInfo"},"type":"array","title":"Items"}},"type":"object","required":["total","items"],"title":"SourceListResponse"},"SourceRevenue":{"properties":{"source":{"type":"string","title":"Source"},"clicks":{"type":"integer","title":"Clicks"},"conversions":{"type":"integer","title":"Conversions"},"conversion_rate":{"type":"number","title":"Conversion Rate"},"revenue":{"type":"number","title":"Revenue"},"currency":{"type":"string","title":"Currency","default":"SGD"}},"type":"object","required":["source","clicks","conversions","conversion_rate","revenue"],"title":"SourceRevenue"},"StaleProductInfo":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"title":{"type":"string","title":"Title"},"source":{"type":"string","title":"Source"},"last_updated":{"type":"string","format":"date-time","title":"Last Updated"},"days_stale":{"type":"integer","title":"Days Stale"}},"type":"object","required":["product_id","title","source","last_updated","days_stale"],"title":"StaleProductInfo"},"StalledIngestionAlert":{"properties":{"type":{"type":"string","title":"Type"},"source":{"type":"string","title":"Source"},"message":{"type":"string","title":"Message"},"hours_flat":{"type":"number","title":"Hours Flat"},"current_count":{"type":"integer","title":"Current Count"},"snapshot_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Snapshot Time"}},"type":"object","required":["type","source","message","hours_flat","current_count"],"title":"StalledIngestionAlert"},"SubscribeRequest":{"properties":{"tier":{"$ref":"#/components/schemas/BillingTier"}},"type":"object","required":["tier"],"title":"SubscribeRequest"},"SubscribeResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"},"session_id":{"type":"string","title":"Session Id"},"tier":{"$ref":"#/components/schemas/BillingTier"}},"type":"object","required":["checkout_url","session_id","tier"],"title":"SubscribeResponse"},"SystemHealthReport":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"db":{"$ref":"#/components/schemas/DBHealthReport"},"scrapers":{"$ref":"#/components/schemas/ScraperHealthReport"}},"type":"object","required":["generated_at","db","scrapers"],"title":"SystemHealthReport"},"TopCategory":{"properties":{"category":{"type":"string","title":"Category"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["category","count"],"title":"TopCategory"},"TopClickedProduct":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"clicks":{"type":"integer","title":"Clicks"}},"type":"object","required":["product_id","clicks"],"title":"TopClickedProduct"},"TopKeyword":{"properties":{"keyword":{"type":"string","title":"Keyword"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["keyword","count"],"title":"TopKeyword"},"TopProduct":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"clicks":{"type":"integer","title":"Clicks"}},"type":"object","required":["product_id","clicks"],"title":"TopProduct"},"TopQueriedProduct":{"properties":{"product_id":{"type":"integer","title":"Product Id"},"title":{"type":"string","title":"Title"},"clicks":{"type":"integer","title":"Clicks"}},"type":"object","required":["product_id","title","clicks"],"title":"TopQueriedProduct"},"TopQueryUsage":{"properties":{"query":{"type":"string","title":"Query"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["query","count"],"title":"TopQueryUsage"},"TopSearchQuery":{"properties":{"query":{"type":"string","title":"Query"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["query","count"],"title":"TopSearchQuery"},"TrendingResponse":{"properties":{"period":{"type":"string","title":"Period"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"items":{"items":{},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"platform_distribution":{"items":{},"type":"array","title":"Platform Distribution"},"category_breakdown":{"items":{},"type":"array","title":"Category Breakdown"}},"type":"object","required":["period","items","total"],"title":"TrendingResponse"},"USAutocompleteResponse":{"properties":{"query":{"type":"string","title":"Query"},"titles":{"items":{"type":"string"},"type":"array","title":"Titles"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["query","titles","total"],"title":"USAutocompleteResponse"},"UnprocessedNdjsonFile":{"properties":{"platform":{"type":"string","title":"Platform"},"file_path":{"type":"string","title":"File Path"},"file_size_mb":{"type":"number","title":"File Size Mb"},"last_modified":{"type":"string","format":"date-time","title":"Last Modified"},"hours_since_scrape":{"type":"number","title":"Hours Since Scrape"},"last_ingestion":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Ingestion"}},"type":"object","required":["platform","file_path","file_size_mb","last_modified","hours_since_scrape"],"title":"UnprocessedNdjsonFile"},"UpgradeTierRequest":{"properties":{"tier":{"$ref":"#/components/schemas/BillingTier"}},"type":"object","required":["tier"],"title":"UpgradeTierRequest"},"UsageAnalyticsResponse":{"properties":{"total_requests_today":{"type":"integer","title":"Total Requests Today"},"total_requests_week":{"type":"integer","title":"Total Requests Week"},"total_requests_month":{"type":"integer","title":"Total Requests Month"},"top_endpoints":{"items":{"$ref":"#/components/schemas/EndpointStat"},"type":"array","title":"Top Endpoints"},"top_products":{"items":{"$ref":"#/components/schemas/TopQueriedProduct"},"type":"array","title":"Top Products"},"peak_hours":{"items":{"$ref":"#/components/schemas/PeakHour"},"type":"array","title":"Peak Hours"},"avg_response_time_ms":{"type":"number","title":"Avg Response Time Ms"},"rate_limit_hits":{"type":"integer","title":"Rate Limit Hits"}},"type":"object","required":["total_requests_today","total_requests_week","total_requests_month","top_endpoints","top_products","peak_hours","avg_response_time_ms","rate_limit_hits"],"title":"UsageAnalyticsResponse"},"UsageResponse":{"properties":{"api_key_id":{"type":"string","title":"Api Key Id"},"tier":{"type":"string","title":"Tier"},"limit":{"type":"integer","title":"Limit"},"usage_today":{"type":"integer","title":"Usage Today"},"usage_remaining":{"type":"integer","title":"Usage Remaining"},"daily_usage":{"items":{"$ref":"#/components/schemas/DailyUsage"},"type":"array","title":"Daily Usage"}},"type":"object","required":["api_key_id","tier","limit","usage_today","usage_remaining","daily_usage"],"title":"UsageResponse"},"UserAlertCreateRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"User email address for notifications"},"product_id":{"type":"integer","title":"Product Id","description":"Product ID to monitor"},"product_name":{"type":"string","title":"Product Name","description":"Product name for email template"},"product_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Image Url","description":"Product image URL"},"product_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Url","description":"Product URL"},"price_at_add":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Price At Add","description":"Price when alert was created"},"target_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Target Price","description":"Target price in USD"},"currency":{"type":"string","const":"USD","title":"Currency","description":"Currency for target price","default":"USD"}},"type":"object","required":["email","product_id","product_name","price_at_add","target_price"],"title":"UserAlertCreateRequest"},"UserAlertListResponse":{"properties":{"alerts":{"items":{"$ref":"#/components/schemas/UserAlertResponse"},"type":"array","title":"Alerts"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["alerts","total"],"title":"UserAlertListResponse"},"UserAlertResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"product_id":{"type":"integer","title":"Product Id"},"product_name":{"type":"string","title":"Product Name"},"product_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Image Url"},"product_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Url"},"price_at_add":{"type":"number","title":"Price At Add"},"target_price":{"type":"number","title":"Target Price"},"currency":{"type":"string","title":"Currency"},"is_active":{"type":"boolean","title":"Is Active"},"triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Triggered At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","product_id","product_name","price_at_add","target_price","currency","is_active","created_at"],"title":"UserAlertResponse"},"UserLoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"User email address"},"password":{"type":"string","title":"Password","description":"User password"}},"type":"object","required":["email","password"],"title":"UserLoginRequest"},"UserLoginResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"},"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"}},"type":"object","required":["access_token","expires_in","user_id","email"],"title":"UserLoginResponse"},"UserNotificationPreferenceRequest":{"properties":{"channel":{"type":"string","title":"Channel","description":"Notification channel: email, push, or both","default":"email"},"price_threshold":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Threshold","description":"Absolute price threshold for notifications"},"price_threshold_pct":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Price Threshold Pct","description":"Price drop percentage threshold"},"frequency":{"type":"string","title":"Frequency","description":"Notification frequency: instant, daily, weekly","default":"instant"},"paused":{"type":"boolean","title":"Paused","description":"Pause all notifications","default":false}},"type":"object","title":"UserNotificationPreferenceRequest"},"UserNotificationPreferenceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"channel":{"type":"string","title":"Channel"},"price_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Threshold"},"price_threshold_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Threshold Pct"},"frequency":{"type":"string","title":"Frequency"},"paused":{"type":"boolean","title":"Paused"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","email","channel","frequency","paused","created_at","updated_at"],"title":"UserNotificationPreferenceResponse"},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","is_active","created_at"],"title":"UserResponse"},"UserSignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"User email address"},"password":{"type":"string","minLength":8,"title":"Password","description":"User password (min 8 characters)"}},"type":"object","required":["email","password"],"title":"UserSignupRequest"},"UserSignupResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"message":{"type":"string","title":"Message","default":"Account created successfully"}},"type":"object","required":["user_id","email"],"title":"UserSignupResponse"},"UserWatchlistAddRequest":{"properties":{"product_id":{"type":"integer","title":"Product Id","description":"Product ID to add to watchlist"}},"type":"object","required":["product_id"],"title":"UserWatchlistAddRequest"},"UserWatchlistItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"product_id":{"type":"integer","title":"Product Id"},"price_at_add":{"type":"number","title":"Price At Add"},"currency":{"type":"string","title":"Currency"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"current_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Price"},"price_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Change"},"price_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Change Pct"}},"type":"object","required":["id","user_id","product_id","price_at_add","currency","is_active","created_at"],"title":"UserWatchlistItemResponse"},"UserWatchlistListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserWatchlistItemResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit","default":100}},"type":"object","required":["items","total"],"title":"UserWatchlistListResponse"},"V2ProductListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/V2ProductResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["total","limit","offset","items"],"title":"V2ProductListResponse"},"V2ProductResponse":{"properties":{"id":{"type":"integer","title":"Id"},"sku":{"type":"string","title":"Sku"},"source":{"type":"string","title":"Source"},"merchant_id":{"type":"string","title":"Merchant Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"price_sgd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price Sgd"},"usd_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Usd Price"},"buy_url":{"type":"string","title":"Buy Url"},"affiliate_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"category_path":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Category Path"},"rating":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rating"},"review_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Review Count"},"is_available":{"type":"boolean","title":"Is Available","default":true},"in_stock":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In Stock"},"stock_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stock Level"},"last_checked":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked"},"data_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Data Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"price_trend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Trend"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score"},"availability_prediction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Availability Prediction"},"competitor_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Competitor Count"}},"type":"object","required":["id","sku","source","merchant_id","name","price","currency","buy_url","updated_at"],"title":"V2ProductResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WatchlistAddRequest":{"properties":{"product_id":{"type":"integer","title":"Product Id","description":"Product ID to add to watchlist"}},"type":"object","required":["product_id"],"title":"WatchlistAddRequest"},"WatchlistAlertCreateRequest":{"properties":{"target_price":{"type":"number","exclusiveMinimum":0.0,"title":"Target Price","description":"Target price to trigger alert"}},"type":"object","required":["target_price"],"title":"WatchlistAlertCreateRequest"},"WatchlistAlertsResponse":{"properties":{"alerts":{"items":{"$ref":"#/components/schemas/app__schemas__watchlist__WatchlistAlertResponse__1"},"type":"array","title":"Alerts"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["alerts","total"],"title":"WatchlistAlertsResponse"},"WatchlistItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"product_id":{"type":"integer","title":"Product Id"},"price_at_add":{"type":"number","title":"Price At Add"},"currency":{"type":"string","title":"Currency"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","product_id","price_at_add","currency","is_active","created_at"],"title":"WatchlistItemResponse"},"WatchlistListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WatchlistItemResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit","default":100}},"type":"object","required":["items","total"],"title":"WatchlistListResponse"},"WebhookCreateRequest":{"properties":{"url":{"type":"string","title":"Url","description":"Webhook URL to receive POST requests"},"product_ids":{"items":{"type":"integer"},"type":"array","maxItems":100,"minItems":1,"title":"Product Ids","description":"Product IDs to monitor for price changes"},"events":{"items":{"type":"string","enum":["price_change","new_product","stock_change","deal_found","price_drop","deal_alert","product_removed"]},"type":"array","minItems":1,"title":"Events","description":"Event types to subscribe to"},"filter_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Category","description":"Filter by category (case-insensitive substring match)"},"filter_brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Brand","description":"Filter by brand (case-insensitive substring match)"},"filter_price_min":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Filter Price Min","description":"Minimum price filter"},"filter_price_max":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Filter Price Max","description":"Maximum price filter"}},"type":"object","required":["url","product_ids"],"title":"WebhookCreateRequest"},"WebhookCreateResponse":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"product_ids":{"items":{"type":"integer"},"type":"array","title":"Product Ids"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"active":{"type":"boolean","title":"Active"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret","description":"HMAC signing secret - store securely"},"filter_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Category"},"filter_brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Brand"},"filter_price_min":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Filter Price Min"},"filter_price_max":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Filter Price Max"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"message":{"type":"string","title":"Message","default":"Store the secret securely — it will not be shown again."}},"type":"object","required":["id","url","product_ids","events","active","created_at"],"title":"WebhookCreateResponse"},"WebhookListResponse":{"properties":{"webhooks":{"items":{"$ref":"#/components/schemas/WebhookResponse"},"type":"array","title":"Webhooks"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["webhooks","total"],"title":"WebhookListResponse"},"WebhookResponse":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"product_ids":{"items":{"type":"integer"},"type":"array","title":"Product Ids"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"active":{"type":"boolean","title":"Active"},"filter_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Category"},"filter_brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Brand"},"filter_price_min":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Filter Price Min"},"filter_price_max":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Filter Price Max"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","url","product_ids","events","active","created_at"],"title":"WebhookResponse"},"WebhookTestRequest":{"properties":{"webhook_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Id","description":"Specific webhook ID to test (defaults to most recent)"}},"type":"object","title":"WebhookTestRequest"},"WebhookTestResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Body"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"WebhookTestResponse"},"ZeroResultQuery":{"properties":{"query":{"type":"string","title":"Query"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["query","count"],"title":"ZeroResultQuery"},"app__routers__growth__MetricsResponse":{"properties":{"date":{"type":"string","format":"date-time","title":"Date"},"signups":{"type":"integer","title":"Signups"},"activated_24h":{"type":"integer","title":"Activated 24H"},"activated_7d":{"type":"integer","title":"Activated 7D"},"playground_used":{"type":"integer","title":"Playground Used"},"docs_first":{"type":"integer","title":"Docs First"},"email_drip_opens":{"type":"integer","title":"Email Drip Opens"},"email_drip_clicks":{"type":"integer","title":"Email Drip Clicks"}},"type":"object","required":["date","signups","activated_24h","activated_7d","playground_used","docs_first","email_drip_opens","email_drip_clicks"],"title":"MetricsResponse"},"app__routers__linkless_attribution__CommissionResponse":{"properties":{"id":{"type":"string","title":"Id"},"conversion_id":{"type":"string","title":"Conversion Id"},"match_method":{"type":"string","title":"Match Method"},"match_confidence":{"type":"string","title":"Match Confidence"},"commissionable_amount":{"type":"number","title":"Commissionable Amount"},"commission_rate":{"type":"number","title":"Commission Rate"},"commission_amount":{"type":"number","title":"Commission Amount"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"reason_code":{"type":"string","title":"Reason Code"},"decided_at":{"type":"string","title":"Decided At"}},"type":"object","required":["id","conversion_id","match_method","match_confidence","commissionable_amount","commission_rate","commission_amount","currency","status","reason_code","decided_at"],"title":"CommissionResponse"},"app__routers__metrics__IngestionRunInfo":{"properties":{"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"rows_inserted":{"type":"integer","title":"Rows Inserted","default":0},"rows_updated":{"type":"integer","title":"Rows Updated","default":0},"rows_failed":{"type":"integer","title":"Rows Failed","default":0},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","title":"IngestionRunInfo"},"app__routers__metrics__MetricsResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"freshness_threshold_hours":{"type":"integer","title":"Freshness Threshold Hours"},"quality_threshold_score":{"type":"number","title":"Quality Threshold Score"},"total_products":{"type":"integer","title":"Total Products"},"total_active":{"type":"integer","title":"Total Active"},"total_stale":{"type":"integer","title":"Total Stale"},"overall_quality_score":{"type":"number","title":"Overall Quality Score"},"platform_count":{"type":"integer","title":"Platform Count"},"stale_platform_count":{"type":"integer","title":"Stale Platform Count"},"low_quality_platform_count":{"type":"integer","title":"Low Quality Platform Count"},"platforms":{"items":{"$ref":"#/components/schemas/PlatformMetrics"},"type":"array","title":"Platforms"},"alerts":{"items":{"$ref":"#/components/schemas/AlertInfo"},"type":"array","title":"Alerts"}},"type":"object","required":["generated_at","freshness_threshold_hours","quality_threshold_score","total_products","total_active","total_stale","overall_quality_score","platform_count","stale_platform_count","low_quality_platform_count","platforms","alerts"],"title":"MetricsResponse"},"app__schemas__admin__CommissionResponse":{"properties":{"summary":{"$ref":"#/components/schemas/PeriodBreakdown"},"daily":{"items":{"$ref":"#/components/schemas/PeriodBreakdown"},"type":"array","title":"Daily"},"weekly":{"items":{"$ref":"#/components/schemas/PeriodBreakdown"},"type":"array","title":"Weekly"},"monthly":{"items":{"$ref":"#/components/schemas/PeriodBreakdown"},"type":"array","title":"Monthly"}},"type":"object","required":["summary","daily","weekly","monthly"],"title":"CommissionResponse"},"app__schemas__agent__search__PriceStats":{"properties":{"current_price":{"type":"number","title":"Current Price"},"average_price":{"type":"number","title":"Average Price"},"min_price":{"type":"number","title":"Min Price"},"max_price":{"type":"number","title":"Max Price"},"price_change_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Change 24H"},"price_change_7d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Change 7D"},"price_change_30d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Change 30D"}},"type":"object","required":["current_price","average_price","min_price","max_price"],"title":"PriceStats"},"app__schemas__product__PriceStats":{"properties":{"current_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Current Price"},"average_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Average Price"},"min_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Min Price"},"max_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Max Price"},"price_change_24h":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price Change 24H"},"price_change_7d":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price Change 7D"},"price_change_30d":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price Change 30D"}},"type":"object","required":["current_price","average_price","min_price","max_price"],"title":"PriceStats"},"app__schemas__status__IngestionRunInfo":{"properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"last_run_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run Status"},"last_rows_inserted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Rows Inserted"},"last_rows_updated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Rows Updated"}},"type":"object","title":"IngestionRunInfo"},"app__schemas__watchlist__WatchlistAlertResponse__1":{"properties":{"id":{"type":"string","title":"Id"},"product_id":{"type":"integer","title":"Product Id"},"price_at_add":{"type":"number","title":"Price At Add"},"current_price":{"type":"number","title":"Current Price"},"currency":{"type":"string","title":"Currency"},"price_drop":{"type":"number","title":"Price Drop"},"price_drop_pct":{"type":"number","title":"Price Drop Pct"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","product_id","price_at_add","current_price","currency","price_drop","price_drop_pct","created_at"],"title":"WatchlistAlertResponse"},"app__schemas__watchlist__WatchlistAlertResponse__2":{"properties":{"id":{"type":"string","title":"Id"},"product_id":{"type":"integer","title":"Product Id"},"product_name":{"type":"string","title":"Product Name"},"product_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Image Url"},"product_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Url"},"price_at_add":{"type":"number","title":"Price At Add"},"target_price":{"type":"number","title":"Target Price"},"currency":{"type":"string","title":"Currency"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","product_id","product_name","price_at_add","target_price","currency","is_active","created_at"],"title":"WatchlistAlertResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}