---
title: "Day report"
description: "The day totals of the restaurant's tills, per VAT rate and per payment method, for bookkeeping."
---

> Documentation Index
> Fetch the complete documentation index at: https://developer.unipage.be/llms.txt
> Use this file to discover all available pages before exploring further.

# Day report

`GET /day-report/{Y-m-d}` returns the totals of one business day of the
restaurant's tills: revenue before and after discounts, VAT and taxable amount
per VAT rate, and the money received per payment method. It is the
"Dagrapport" the restaurant sees in Unipage (Rapporten > Dagrapport), computed
by the same rules, so your numbers and theirs always agree.

Use it for a bookkeeping export, a daily revenue mail or a BI dashboard. You
do not need to add up receipts yourself; for line-level detail use
[`GET /pos-tickets-by-date`](/core/endpoints/#sales-get-pos-tickets-by-dateymd),
and for a whole month or year use the
[monthly aggregates](/core/monthly-aggregates/).

```sh
curl https://api.unipage.eu/x94d3/day-report/2026-10-28 \
  -H "X-API-Key: $UNIPAGE_CORE_API_KEY"
```

## Response

```json title="200"
{
  "business_id": "x94d3",
  "date": "2026-10-28",
  "currency": "EUR",
  "timezone": "Europe/Brussels",
  "day_starts_at": "05:00",
  "period": { "from": "2026-10-28T04:00:00Z", "to": "2026-10-29T03:59:59Z" },
  "is_day_over": true,
  "tickets": { "count": 3, "refunds": 1, "with_discount": 2 },
  "totals": {
    "gross_revenue": 17.7,
    "discounts": 1.77,
    "revenue": 15.93,
    "vat": 2.43,
    "taxable_amount": 13.5,
    "payments": 15.93
  },
  "vat_rates": [
    { "rate": 12, "letter": "B", "taxable_amount": 4.5, "vat": 0.54, "total": 5.04 },
    { "rate": 21, "letter": "A", "taxable_amount": 9, "vat": 1.89, "total": 10.89 }
  ],
  "payment_methods": [
    { "payment_method": "CASH", "amount": 14.07, "count": 1,
      "names": [{ "payment_name": "Cash", "amount": 14.07, "count": 1 }] },
    { "payment_method": "CARD", "amount": 1.86, "count": 2,
      "names": [
        { "payment_name": "Visa", "amount": 5.04, "count": 1 },
        { "payment_name": "Bancontact", "amount": -3.18, "count": 1 }
      ] }
  ],
  "discounts": [
    { "name": "Personeel", "count": 1, "amount": 1.21 },
    { "name": "Vaste klant", "count": 1, "amount": 0.56 }
  ],
  "generated_at": "2026-10-29T06:12:44Z"
}
```

### Fields

| Key | Meaning |
|---|---|
| `date` | the business day you asked for |
| `currency` | the currency of every amount (`EUR`) |
| `timezone`, `day_starts_at` | the restaurant's timezone and the hour its business day starts (see [The business day](#the-business-day)) |
| `period.from`, `period.to` | the exact window, in UTC, the totals cover |
| `is_day_over` | `false` while the business day is still running: the totals will still grow |
| `tickets.count` | VAT receipts in the day, refunds included |
| `tickets.refunds` | how many of those are refund receipts |
| `tickets.with_discount` | receipts with at least one discount |
| `totals.gross_revenue` | revenue including VAT, before discounts: `revenue + discounts` |
| `totals.discounts` | the discounts given, as a positive amount |
| `totals.revenue` | revenue including VAT, after discounts |
| `totals.vat` | the VAT owed |
| `totals.taxable_amount` | the taxable amount (revenue excluding VAT) |
| `totals.payments` | all money received, every payment method together |
| `vat_rates[]` | one row per VAT rate that has any amount, lowest rate first |
| `vat_rates[].rate` | the rate in percent (`21`), or `null` for receipt lines the till sent without a rate (listed last) |
| `vat_rates[].letter` | the Belgian receipt letter of the rate (`A` 21 %, `B` 12 %, `C` 6 %, `D` 0 %), `null` for another rate |
| `vat_rates[].taxable_amount`, `.vat`, `.total` | the base, the VAT and the amount including VAT at that rate |
| `payment_methods[]` | one row per payment method, largest amount first, with `amount` and `count` (the number of payments) |
| `payment_methods[].names[]` | the same split per payment name as the till shows it (`Visa`, `Bancontact`), largest first |
| `discounts[]` | each discount by name, with how often it was given and its amount, largest first |
| `generated_at` | when this answer was computed |

Every amount has two decimals, rounded after adding up. The rates add up to
the totals and the payment methods to `totals.payments`, but a sum of rounded
rows can differ from the rounded total by a cent.

## How the totals are computed

- **Signed amounts.** A refund counts negative, so a sold and refunded item
  nets to zero. A payment name can therefore be negative (the refund above
  went back on Bancontact). A rate or a payment method that nets to exactly
  zero is left out.
- **Discounts are already in `revenue`.** They are discount lines on the
  receipts, with their own VAT rate. `discounts` reports their size;
  `gross_revenue` adds them back. Do not subtract them from `revenue` again.
- **Revenue and payments can differ.** `revenue` comes from the receipt lines
  and `payments` from the payment lines. On a normal day they are equal; a
  difference means a till sent a receipt whose payments do not add up, and the
  restaurant sees the same difference on its Dagrapport.
- **Only VAT receipts** (sales and refunds) count, from every till of the
  location. A receipt is counted from the moment the till has synced it.

## The business day

A business day starts at the restaurant's `day_starts_at` (default
`00:00`) in its timezone and lasts 24 hours. A bar that closes at 02:00 sets
it to, for example, `05:00`: a sale at 01:30 on 29 October then belongs to
the day report of **28 October**. `period` tells you the exact window.

This is the same day the restaurant's own reports use. It differs on purpose
from `GET /pos-tickets-by-date`, which selects receipts by consumption date
from midnight to midnight, and only finalized, non-training ones; the day
report counts every VAT receipt, as the Dagrapport does. Adding up that feed
yourself can therefore give slightly different totals.

## When to fetch it

Tills keep working offline and sync their receipts when they are back online,
so a day can still change after it ended. A robust export:

1. Fetch the day once `is_day_over` is `true`, for example every morning at
   `day_starts_at` plus a few hours.
2. Fetch it again the next morning (or after a till was reported offline) and
   replace your copy when a total changed.

```js title="nightly-export.js"
const yesterday = new Date(Date.now() - 864e5).toISOString().slice(0, 10);
const res = await fetch(`https://api.unipage.eu/${BUSINESS_ID}/day-report/${yesterday}`, {
  headers: { "X-API-Key": process.env.UNIPAGE_CORE_API_KEY },
});
const report = await res.json();
if (!report.is_day_over) throw new Error("Business day still running");

for (const rate of report.vat_rates) {
  bookkeeping.addVatLine(report.date, rate.rate, rate.taxable_amount, rate.vat);
}
for (const method of report.payment_methods) {
  bookkeeping.addPayment(report.date, method.payment_method, method.amount);
}
```

> **Note**
>
> After a change of owner (a takeover of the location), the day report only
> covers the receipts from the takeover on: the previous owner's sales are
> not part of the new owner's data.

## Errors

| Status | Body | Meaning |
|---|---|---|
| `422` | `{"error": "invalid_date", "message": "..."}` | the date is not a real date in `YYYY-MM-DD` form |

Plus the errors of the [key check and the rate limits](/core/errors-and-limits/).
A day without receipts is a `200` with zero totals and empty lists.

Source: https://developer.unipage.be/core/day-report/index.mdx
