api-config.json 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. {
  2. "name": "similar-products",
  3. "displayName": "Amazon 相似产品查询",
  4. "description": "根据 ASIN 查询与该产品相似的产品列表,用于竞品发现、关联分析。",
  5. "category": "voc",
  6. "version": "1.1.0",
  7. "endpoint": {
  8. "method": "POST",
  9. "url": "https://server.fmode.cn/api/voc/forward",
  10. "headers": {
  11. "Content-Type": "application/json",
  12. "Authorization": "Bearer r:858b3ee92314d5447d1fc3cdc10462d7"
  13. }
  14. },
  15. "parameters": {
  16. "type": "object",
  17. "required": [
  18. "ASIN"
  19. ],
  20. "properties": {
  21. "ASIN": {
  22. "type": "string",
  23. "description": "Amazon 产品 ASIN(10位大写字母数字)",
  24. "pattern": "^[A-Z0-9]{10}$"
  25. },
  26. "domain": {
  27. "type": "integer",
  28. "description": "Amazon 站点 ID: 1=amazon.com",
  29. "default": 1
  30. }
  31. }
  32. },
  33. "requestTransform": {
  34. "template": {
  35. "path": "/api/SimilarProductRealtimeRequest",
  36. "method": "POST",
  37. "query": {
  38. "domain": "{{domain}}"
  39. },
  40. "body": {
  41. "ASIN": "{{ASIN}}"
  42. }
  43. }
  44. },
  45. "response": {
  46. "type": "object",
  47. "description": "相似产品查询结果(异步任务)",
  48. "properties": {
  49. "TaskId": {
  50. "type": "string",
  51. "description": "异步任务 ID,需通过 similar_products_status 查询结果"
  52. },
  53. "Status": {
  54. "type": "string",
  55. "description": "任务状态"
  56. }
  57. }
  58. },
  59. "notes": "此接口为异步任务,返回 TaskId 后需通过 /api/SimilarProductRealtimeRequestStatusQuery 查询状态,状态完成后通过 /api/SimilarProductRealtimeRequestCollection 获取分页结果。",
  60. "relatedSkills": [
  61. "product_detail_query"
  62. ],
  63. "usageExamples": [
  64. {
  65. "name": "查找相似产品",
  66. "input": {
  67. "ASIN": "B0B24QJ217",
  68. "domain": 1
  69. },
  70. "description": "查找与 COCORRINA Reed Diffuser 相似的产品"
  71. }
  72. ],
  73. "reportMapping": {
  74. "slides": [
  75. "竞品对标(Slide4)"
  76. ],
  77. "dataPoints": [
  78. "相似竞品列表"
  79. ]
  80. },
  81. "timeout": 10000,
  82. "retry": {
  83. "maxAttempts": 3,
  84. "delay": 1000,
  85. "backoffMultiplier": 2
  86. }
  87. }