api-config.json 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. {
  2. "name": "asin-sales-volume",
  3. "displayName": "ASIN 销量查询",
  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/AsinSalesVolume",
  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. "DailySales": {
  50. "type": "integer",
  51. "description": "日均销量"
  52. },
  53. "WeeklySales": {
  54. "type": "integer",
  55. "description": "周均销量"
  56. },
  57. "MonthlySales": {
  58. "type": "integer",
  59. "description": "月均销量"
  60. },
  61. "Revenue": {
  62. "type": "number",
  63. "description": "估算收入(美元)"
  64. },
  65. "SalesTrend": {
  66. "type": "array",
  67. "description": "销量趋势数据点"
  68. }
  69. }
  70. },
  71. "usageExamples": [
  72. {
  73. "name": "查询产品销量",
  74. "input": {
  75. "ASIN": "B0CSVRWJ1H",
  76. "domain": 1
  77. },
  78. "description": "查询该产品的日/周/月销量和收入估算"
  79. }
  80. ],
  81. "reportMapping": {
  82. "slides": [
  83. "市场全景(Slide3)",
  84. "品类矩阵(Slide6)"
  85. ],
  86. "dataPoints": [
  87. "周均销量",
  88. "周均销售额",
  89. "销量趋势"
  90. ]
  91. },
  92. "timeout": 10000,
  93. "retry": {
  94. "maxAttempts": 3,
  95. "delay": 1000,
  96. "backoffMultiplier": 2
  97. }
  98. }