API Reference

Analytics

Detailed analytics endpoints for revenue breakdowns, top-selling items, category performance, payment methods, waiter statistics, and weekly comparisons. All endpoints require admin privileges.

Hourly Revenue

GET/api/analytics/hourlyAdmin Only

Returns an hourly breakdown of revenue for the specified date.

Query Parameters

NameTypeRequiredDescription
datestringOptionalDate in YYYY-MM-DD format. Defaults to today if omitted.
bash
curl https://api.possfer.com/api/analytics/hourly?date=2026-03-20 \
  -H "Authorization: Bearer <token>"
json
{
  __PH0__: "2026-03-20",
  __PH2__: [
    { __PH3__: 11, __PH4__: 34500, __PH5__: 8 },
    { __PH6__: 12, __PH7__: 67200, __PH8__: 18 },
    { __PH9__: 13, __PH10__: 52100, __PH11__: 14 },
    { __PH12__: 18, __PH13__: 48900, __PH14__: 12 },
    { __PH15__: 19, __PH16__: 71300, __PH17__: 20 },
    { __PH18__: 20, __PH19__: 43800, __PH20__: 11 }
  ]
}

Top Selling Items

GET/api/analytics/top-itemsAdmin Only

Returns the top-selling menu items ranked by quantity sold.

Query Parameters

NameTypeRequiredDescription
datestringOptionalDate in YYYY-MM-DD format. Defaults to today.
limitintegerOptionalNumber of items to return. Defaults to 10.
bash
curl __PH1__Authorization: Bearer <token>"
json
{
  __PH0__: "2026-03-20",
  __PH2__: [
    { __PH3__: "uuid-1", __PH5__: "Wiener Schnitzel", __PH7__: 24, __PH8__: 43200 },
    { __PH9__: "uuid-2", __PH11__: "Flammkuchen", __PH13__: 18, __PH14__: 21600 },
    { __PH15__: "uuid-3", __PH17__: "Currywurst", __PH19__: 15, __PH20__: 13500 },
    { __PH21__: "uuid-4", __PH23__: "Apfelstrudel", __PH25__: 12, __PH26__: 8400 },
    { __PH27__: "uuid-5", __PH29__: "Weizenbier 0.5l", __PH31__: 42, __PH32__: 21000 }
  ]
}

Revenue by Category

GET/api/analytics/categoriesAdmin Only

Returns revenue breakdown by menu category.

Query Parameters

NameTypeRequiredDescription
datestringOptionalDate in YYYY-MM-DD format. Defaults to today.
bash
curl https://api.possfer.com/api/analytics/categories?date=2026-03-20 \
  -H "Authorization: Bearer <token>"
json
{
  __PH0__: "2026-03-20",
  __PH2__: [
    { __PH3__: "uuid-1", __PH5__: "Hauptgerichte", __PH7__: 98500, __PH8__: 34.5 },
    { __PH9__: "uuid-2", __PH11__: "Getraenke", __PH13__: 72300, __PH14__: 25.3 },
    { __PH15__: "uuid-3", __PH17__: "Vorspeisen", __PH19__: 54200, __PH20__: 19.0 },
    { __PH21__: "uuid-4", __PH23__: "Desserts", __PH25__: 38400, __PH26__: 13.5 },
    { __PH27__: "uuid-5", __PH29__: "Beilagen", __PH31__: 22030, __PH32__: 7.7 }
  ]
}

Payment Method Breakdown

GET/api/analytics/paymentsAdmin Only

Returns revenue breakdown by payment method.

Query Parameters

NameTypeRequiredDescription
datestringOptionalDate in YYYY-MM-DD format. Defaults to today.
bash
curl https://api.possfer.com/api/analytics/payments?date=2026-03-20 \
  -H "Authorization: Bearer <token>"
json
{
  __PH0__: "2026-03-20",
  __PH2__: [
    { __PH3__: "cash", __PH5__: 142300, __PH6__: 38, __PH7__: 49.8 },
    { __PH8__: "card", __PH10__: 118130, __PH11__: 32, __PH12__: 41.4 },
    { __PH13__: "ec_card", __PH15__: 25000, __PH16__: 8, __PH17__: 8.8 }
  ]
}

Waiter Performance

GET/api/analytics/waitersAdmin Only

Returns performance statistics per waiter including revenue, order count, and tips.

Query Parameters

NameTypeRequiredDescription
datestringOptionalDate in YYYY-MM-DD format. Defaults to today.
bash
curl https://api.possfer.com/api/analytics/waiters?date=2026-03-20 \
  -H "Authorization: Bearer <token>"
json
{
  __PH0__: "2026-03-20",
  __PH2__: [
    {
      __PH3__: "uuid-1",
      __PH5__: "Max Mustermann",
      __PH7__: 98400,
      __PH8__: 26,
      __PH9__: 4800,
      __PH10__: 3785
    },
    {
      __PH11__: "uuid-2",
      __PH13__: "Anna Schmidt",
      __PH15__: 87200,
      __PH16__: 22,
      __PH17__: 3900,
      __PH18__: 3964
    }
  ]
}

Weekly Comparison

GET/api/analytics/weeklyAdmin Only

Returns a week-over-week comparison of key metrics. No parameters required.

bash
curl https://api.possfer.com/api/analytics/weekly \
  -H "Authorization: Bearer <token>"
json
{
  __PH0__: {
    __PH1__: "2026-03-16",
    __PH3__: "2026-03-22",
    __PH5__: 1425000,
    __PH6__: 392,
    __PH7__: 3636
  },
  __PH8__: {
    __PH9__: "2026-03-09",
    __PH11__: "2026-03-15",
    __PH13__: 1380000,
    __PH14__: 378,
    __PH15__: 3651
  },
  __PH16__: {
    __PH17__: 3.26,
    __PH18__: 3.70,
    __PH19__: -__PH28__
  }
}