---
title: Quickstart
description: Make your first product-cost request in five minutes.
sidebar:
  order: 2
---

## 1. Get an API key

Request a product-cost API key from your Mellow contact. The key only authorizes `GET /external/v1/product-costs`; it cannot access dashboard APIs.

## 2. Choose a date range

Both dates are required ISO dates and both boundaries are included. Use `segment=normal` unless you also need sample products.

## 3. Send the request

```bash
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'
```

A successful response is a JSON list:

```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. Try it in the browser

Open the [API Reference](/api-reference), expand **Try it**, enter your Bearer key and dates, then select **Send**. The key is kept in memory unless you explicitly choose **Remember on this device**.
