Skip to content
Mellow API
English
Esc
↑↓navigate↵open⌘Jpreview

List product costs

Returns the four cost columns used by the product-profit page for an inclusive sales-month range of at most 24 months. Use the first day of each month (YYYY-MM-01). A null amount means the cost is not available; a numeric zero is a costed zero.

GET/external/v1/product-costs
Authorization
AuthorizationBearer token · headerrequired
Dedicated Bearer API key for product-cost exports.
Query parameters
month_fromstring<date>required
Inclusive sales-month start; use YYYY-MM-01.
month_tostring<date>required
Inclusive sales-month end; use YYYY-MM-01.
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.
Show properties
Any of:
number
number
any
any
lingxing_product_idinteger | any
Lingxing product ID; null for unmapped rows.
Show properties
Any of:
integer
integer
any
any
lingxing_skustring | any
Lingxing SKU; null for unmapped rows.
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.
Show properties
Any of:
number
number
any
any
shipping_to_customer_usdnumber | any
Shipping-to-customer cost in USD; null means not costed.
Show properties
Any of:
number
number
any
any
warehouse_fees_usdnumber | any
Warehouse fees in USD; null means not costed.
Show properties
Any of:
number
number
any
any
400Invalid or oversized month range.
401Missing or invalid 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
429Rate limit exceeded; honor Retry-After.
503External API key is not configured.
504Database query timed out.
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-01" \
  -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
  }
]