{"openapi":"3.1.0","info":{"title":"Shopee & Shopee Affiliate Vietnam OpenAPI v1","version":"1.0.0","description":"Self-hosted Shopee Vietnam OpenAPI server powered by Rockxy Proxy HAR ingestion + Shopee Open Platform Partner API v2 + Shopee Affiliate GraphQL."},"servers":[{"url":"https://openapi-shopee.alita.vn","description":"Current Server"}],"tags":[{"name":"Health","description":"System health and integration status"},{"name":"Shop","description":"Shopee Vietnam shop profiles, products, search & vouchers"},{"name":"Product","description":"Shopee Vietnam product PDP, search, reviews & affiliate commission"},{"name":"Market","description":"Shopee Vietnam categories, flash sales & affiliate short links"}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key issued from /portal or /admin (prefix shp_live_...)"},"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{}},"security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"paths":{"/health/v1/check":{"get":{"tags":["Health"],"summary":"Check API server, Postgres, Redis, and upstream integration status","security":[],"responses":{"200":{"description":"System health payload"}}}},"/shop/v1/shops/{identifier}/profile":{"get":{"tags":["Shop"],"summary":"Get Shopee shop profile by shop_id or username","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Shop profile"},"404":{"description":"Not found"}}}},"/shop/v1/shops/{shopId}/products":{"get":{"tags":["Shop"],"summary":"List paginated products belonging to a Shopee shop","parameters":[{"name":"shopId","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"page_size","in":"query","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Paginated shop products"}}}},"/shop/v1/shops/search":{"post":{"tags":["Shop"],"summary":"Search Shopee shops by keyword, mall status, location, rating, followers","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keyword":{"type":"string"},"is_official_mall":{"type":"boolean"},"location":{"type":"string"},"min_rating":{"type":"number"},"min_followers":{"type":"integer"},"sort_by":{"type":"string","enum":["followers","rating","items"]},"page":{"type":"integer","default":1},"page_size":{"type":"integer","default":20}}}}}},"responses":{"200":{"description":"Matched shops"}}}},"/shop/v1/shops/{shopId}/vouchers":{"get":{"tags":["Shop"],"summary":"Get active vouchers for a Shopee shop","parameters":[{"name":"shopId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Shop vouchers"}}}},"/product/v1/products/{shopId}/{itemId}/details":{"get":{"tags":["Product"],"summary":"Get full Shopee product details by shopId and itemId","parameters":[{"name":"shopId","in":"path","required":true,"schema":{"type":"string"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Product details with shop info"}}}},"/product/v1/products/{itemId}/details":{"get":{"tags":["Product"],"summary":"Get full Shopee product details by itemId","parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Product details"}}}},"/product/v1/products/search":{"post":{"tags":["Product"],"summary":"Search Shopee products with filters and sorting","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keyword":{"type":"string"},"shop_id":{"type":"string"},"category_id":{"type":"string"},"min_price":{"type":"number"},"max_price":{"type":"number"},"min_rating":{"type":"number"},"is_official_mall":{"type":"boolean"},"sort_by":{"type":"string","enum":["sold","sold_30d","price_asc","price_desc","rating","commission","newest"]},"page":{"type":"integer","default":1},"page_size":{"type":"integer","default":20}}}}}},"responses":{"200":{"description":"Paginated product results"}}}},"/product/v1/products/{itemId}/reviews":{"get":{"tags":["Product"],"summary":"Get product ratings & customer reviews","parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string"}},{"name":"rating","in":"query","schema":{"type":"integer","minimum":1,"maximum":5}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"page_size","in":"query","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Paginated reviews"}}}},"/product/v1/products/{itemId}/affiliate":{"get":{"tags":["Product"],"summary":"Get Shopee Affiliate commission rate and estimated earnings for a product","parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Affiliate commission details"}}}},"/product/v1/products/affiliate/search":{"post":{"tags":["Product"],"summary":"Search Shopee products eligible for Affiliate commission","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keyword":{"type":"string"},"min_commission_rate":{"type":"number"},"is_official_mall":{"type":"boolean"},"sort_by":{"type":"string","default":"commission"},"page":{"type":"integer","default":1},"page_size":{"type":"integer","default":20}}}}}},"responses":{"200":{"description":"Affiliate product results"}}}},"/product/v1/products/{itemId}/history":{"get":{"tags":["Product"],"summary":"Get historical price, stock, and sales velocity snapshots recorded on VPS","parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":60}}],"responses":{"200":{"description":"Product price & sales history"}}}},"/market/v1/categories":{"get":{"tags":["Market"],"summary":"List Shopee Vietnam categories","parameters":[{"name":"parent_id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Category list"}}}},"/market/v1/flash-sales":{"get":{"tags":["Market"],"summary":"List Shopee Vietnam Flash Sale items","parameters":[{"name":"active_only","in":"query","schema":{"type":"boolean","default":false}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"page_size","in":"query","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Paginated flash sale items"}}}},"/market/v1/affiliate/short-link":{"post":{"tags":["Market"],"summary":"Generate a Shopee Affiliate short link with optional sub_ids","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["origin_url"],"properties":{"origin_url":{"type":"string","format":"uri"},"sub_ids":{"type":"array","items":{"type":"string"},"maxItems":5}}}}}},"responses":{"200":{"description":"Generated short link"}}}},"/market/v1/analytics/summary":{"get":{"tags":["Market"],"summary":"Get real-time market analytics (top brands, categories, price buckets, top affiliate offers) computed on VPS","responses":{"200":{"description":"Market analytics summary"}}}}}}