跳到内容
Mellow API
简体中文
Esc
导航打开⌘J预览
本页内容

快速开始

在五分钟内完成第一次产品成本请求。

1. 获取 API Key

向 Mellow 对接人申请产品成本 API Key。该 Key 只允许访问 GET /external/v1/product-costs,不能访问 Dashboard 内部接口。

2. 选择日期范围

两个日期都是必填的 ISO 日期,并且都包含边界。除非需要样品数据,否则使用默认的 segment=normal

3. 发送请求

curl --get \
  'https://api.mellow-dev.billgateai.com/external/v1/product-costs' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data-urlencode 'month_from=2026-07-01' \
  --data-urlencode 'month_to=2026-07-31' \
  --data-urlencode 'segment=normal'

成功时返回 JSON 列表:

[
  {
    "lingxing_product_id": 123,
    "lingxing_sku": "860014330490",
    "product_name": "Example",
    "purchase_cost_usd": 100.0,
    "inbound_freight_usd": 20.0,
    "shipping_to_customer_usd": null,
    "warehouse_fees_usd": 5.0
  }
]

4. 在浏览器中测试

打开 API 参考,展开 Try it,填写 Bearer Key 和日期后点击 Send。除非主动勾选 Remember on this device,Key 只保留在当前页面内存中。