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

List product costs / 获取产品四项成本

Returns the four cost columns used by the product-profit page for an inclusive date range. A null amount means the cost is not available; a numeric zero is a costed zero. / 返回产品利润页面使用的四项成本,日期边界均包含。金额为 null 表示未核算,数字 0 表示已核算的真实零值。

GET/external/v1/product-costs
Authorization
AuthorizationBearer token · headerrequired
Dedicated Bearer API key for product-cost exports. / 产品成本导出专用 Bearer API Key。
Query parameters
month_fromstring<date>required
Inclusive start date in ISO format. / 包含边界的 ISO 起始日期。
month_tostring<date>required
Inclusive end date in ISO format. / 包含边界的 ISO 结束日期。
segmentstring
Product segment: normal products, samples, or both. / 产品范围:正常产品、样品或全部。
default: "normal"
Allowed:normalsampleall
Responses
200Product cost rows. / 产品成本列表。
Array of ExternalProductCostRow
inbound_freight_usdnumber | any
Inbound freight in USD; null means not costed. / 头程成本(USD);null 表示未核算。
Show properties
Any of:
number
number
any
any
lingxing_product_idinteger | any
Lingxing product ID; null for unmapped rows. / 领星产品 ID;未映射行为空。
Show properties
Any of:
integer
integer
any
any
lingxing_skustring | any
Lingxing SKU; null for unmapped rows. / 领星 SKU;未映射行为空。
Show properties
Any of:
string
string
any
any
product_namestring | any
Product name. / 产品名称。
Show properties
Any of:
string
string
any
any
purchase_cost_usdnumber | any
Purchase cost in USD; null means not costed. / 采购成本(USD);null 表示未核算。
Show properties
Any of:
number
number
any
any
shipping_to_customer_usdnumber | any
Shipping-to-customer cost in USD; null means not costed. / 尾程成本(USD);null 表示未核算。
Show properties
Any of:
number
number
any
any
warehouse_fees_usdnumber | any
Warehouse fees in USD; null means not costed. / 仓库费用(USD);null 表示未核算。
Show properties
Any of:
number
number
any
any
400Invalid date range. / 日期范围无效。
401Missing or invalid API key. / API Key 缺失或无效。
422Validation Error
detailValidationError[]
Show properties
Array of ValidationError
ctxobject
inputany
locstring | integer[]required
Show properties
Array of string | integer
Any of:
string
string
integer
integer
msgstringrequired
typestringrequired
503External API key is not configured. / 服务端未配置外部 API Key。
Try it
Server
Authorization
Parameters
Request
curl -X GET "https://api.mellow-dev.billgateai.com/external/v1/product-costs?month_from=2026-07-01&month_to=2026-07-31" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
[
  {
    "inbound_freight_usd": 20,
    "lingxing_product_id": 123,
    "lingxing_sku": "860014330490",
    "product_name": "Example",
    "purchase_cost_usd": 100,
    "warehouse_fees_usd": 5
  }
]