> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kicks.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get sales history from GOAT

> How to get the sales history of a product from GOAT using KicksDB

In order to get the sales history of a product, you need to know the ID of the product. Follow the [Get a product from GOAT recipe](/recipes/goat-get-product) to get the ID of the product.

<Columns cols={2}>
  <Card href="#get-product-sales-history" title="Get product sales history" icon="chart-line">
    Get the sales history of the product
  </Card>

  <Card href="#getting-daily-sales-history" title="Getting daily sales history" icon="calendar">
    Get the daily aggregated sales history of the product
  </Card>
</Columns>

<div className="flex flex-wrap items-baseline gap-x-2">
  <h2>
    Get product sales history
  </h2>

  <a href="https://api.kicks.dev/docs#tag/goat/get/v3goatproductsidsales" target="_blank" class="border-0">
    <Badge icon="info" color="green">
      API Reference
    </Badge>
  </a>

  <Badge icon="lock" color="orange">
    Premium Feature
  </Badge>
</div>

The following endpoint returns the sales history of the product, including the sale price, date and location.

```http theme={null}
GET https://api.kicks.dev/v3/goat/products/[id]/sales
```

Response example:

```json theme={null}
{
  "$schema": "https://api.kicks.dev/schemas/RespListGoatProductSaleBody.json",
  "data": [
    {
      "product_id": 121,
      "type": "PURCHASE_TYPE_SALE",
      "size_us": "12",
      "currency": "USD",
      "amount": 200,
      "location": "Athens, US",
      "purchased_at": "2025-04-20T17:31:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 20
  }
}
```

The available `type` values are:

* `PURCHASE_TYPE_SALE`: Most common type, it means the product was sold at the "Buy Now" price.
* `PURCHASE_TYPE_OFFER_CLOSED`: It means the product was negotiated and sold at a different price than the "Buy Now" price.

<div className="flex flex-wrap items-baseline gap-x-2">
  <h2>Getting daily sales history</h2>

  <a href="https://api.kicks.dev/docs#tag/goat/get/v3goatproductsidsalesdaily" target="_blank" class="border-0">
    <Badge icon="info" color="green">
      API Reference
    </Badge>
  </a>

  <Badge icon="lock" color="orange">
    Premium Feature
  </Badge>
</div>

You can use the `/daily` endpoint to get the daily aggregated sales history of the product, like this:

```http theme={null}
GET https://api.kicks.dev/v3/goat/products/[ID_or_SLUG]/sales/daily
```

Response example:

```json theme={null}
{
  "$schema": "https://api.kicks.dev/schemas/RespListGoatProductSaleAggBody.json",
  "data": [
    {
      "product_id": 1381901,
      "avg_amount": 177.5,
      "orders": 28,
      "date": "2025-12-08T00:00:00Z"
    },
    {
      "product_id": 1381901,
      "avg_amount": 182.95454545454547,
      "orders": 88,
      "date": "2025-12-07T00:00:00Z"
    }
    // ... more daily sales ...
  ]
}
```
