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

# Sales and reconciliation

> Sales, order-level reconciliation, and payouts for every channel, by API or scheduled file delivery.

Lula brings together sales and settlement data from your own storefront and every marketplace, so finance works from one source instead of four portals.

## Three ways to get the data

| Method | Best for |
| - | - |
| API (`/reports/sales`, `/reconciliation/transactions`, `/payouts`) | Dashboards and systems that query on demand |
| Exports (`POST /exports`) | A one-off file for a date range |
| Data feeds (`POST /data-feeds`) | A file delivered on a schedule to your S3 bucket or SFTP server |

## Sales

```bash theme={null}
curl "https://api.lulacommerce.com/v1/reports/sales?start_date=2027-03-01&end_date=2027-03-07&group_by=date,store,channel" \
  -H "Authorization: Bearer $TOKEN"
```

Each row includes orders, units, gross sales, discounts, refunds, net sales, tax, tips, and average ticket. Group by `date`, `store`, `channel`, `category`, or `product`.

## Reconciliation

`GET /reconciliation/transactions` returns one row per order with gross sales, tax (including tax remitted by the marketplace), tips, channel commission, processing fees, adjustments, refunds, net payout, and the payout the order settled in.

Rows that need attention carry `flags`:

| Flag | Meaning |
| - | - |
| `refund_mismatch` | The refund on the channel does not match the order adjustment |
| `charge_mismatch` | The amount settled differs from the order total |
| `unfulfilled` | The order was charged but not fulfilled |
| `adjustment` | The channel applied an adjustment after the order |
| `missing_payout` | The order has not appeared in a payout yet |

Use `flagged=true` to return only exceptions.

## Payouts

`GET /payouts` lists each channel payout with its period, amount, and transaction count. Filter reconciliation by `payout_id` to tie every deposit back to its orders. Subscribe to `payout.created` to start your close process as soon as a payout lands.

## Scheduled delivery for accounting

Deliver last week's reconciliation to your S3 bucket every Monday at 6:00 AM:

```bash theme={null}
curl -X POST https://api.lulacommerce.com/v1/data-feeds \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "dataset": "reconciliation",
    "format": "csv",
    "schedule": { "frequency": "weekly", "day_of_week": "monday", "time": "06:00", "timezone": "America/Chicago" },
    "destination": { "type": "s3", "bucket": "acme-finance-inbound", "prefix": "lula/", "role_arn": "arn:aws:iam::123456789012:role/lula-feed-writer" }
  }'
```

Lula writes to your bucket by assuming a role you control, so no long-lived keys are exchanged. For SFTP, Lula authenticates with an SSH key you allow-list.

Datasets: `orders`, `order_items`, `sales`, `reconciliation`, `payouts`, `store_items`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.