# Report a sale

Every retail or wholesale transaction needs to land in the state system. This is how a POS or checkout flow reports one through SeedLink.

## Build the line items

Each item sold needs the package it came from, the quantity, and the price:

```json
{
  "customer_type": "Consumer",
  "items": [
    {
      "package_id": "pkg_2385762",
      "tag": "1A40F0000000001000000001",
      "item_name": "Blue Dream Flower",
      "quantity": 3.5,
      "unit_of_measure": "Grams",
      "unit_price": 40.00,
      "discount": 0,
      "total": 40.00
    }
  ]
}
```

For medical sales, add `patient_license` (and `caregiver_license` if a caregiver is purchasing on the patient's behalf).

## Record the sale

```bash
curl -X POST https://api.seedlink.dev/v1/connections/8f9ab02c-78c2-4292-a43d-79a327a4efd5/facilities/fac_C11-0000123-LIC/sales \
  -H "Authorization: Bearer sl_at_..." \
  -H "Content-Type: application/json" \
  -d '{
    "customer_type": "Consumer",
    "items": [
      {
        "package_id": "pkg_2385762",
        "tag": "1A40F0000000001000000001",
        "item_name": "Blue Dream Flower",
        "quantity": 3.5,
        "unit_of_measure": "Grams",
        "unit_price": 40.00,
        "discount": 0,
        "total": 40.00
      }
    ]
  }'
```

The response includes the sale's `id` and a `receipt_number`.

## Confirm it landed

```bash
curl "https://api.seedlink.dev/v1/connections/8f9ab02c-78c2-4292-a43d-79a327a4efd5/facilities/fac_C11-0000123-LIC/sales?start_date=2026-08-01" \
  -H "Authorization: Bearer sl_at_..."
```

## Gotchas

Sale writes only work against sandbox connections right now. Production resource endpoints are read-only, so a live checkout flow can log the transaction locally and confirm it landed correctly in sandbox, but can't post it to a real Metrc or BioTrack account through SeedLink yet.

