meta { name: 03 Counts type: http seq: 3 } get { url: {{baseUrl}}/api/v1/invoices/counts body: none auth: inherit } tests { test("200 OK", function () { expect(res.getStatus()).to.equal(200); }); test("counts shape", function () { const c = res.getBody().data; for (const key of ["all", "pending", "in_relance", "awaiting_user_confirmation", "paid", "litigation", "cancelled"]) { expect(c).to.have.property(key); } }); } docs { GET /api/v1/invoices/counts Compteurs par statut, agrégés en une requête PG `GROUP BY status`. Utilisé pour les chips de filtre sur le dashboard / la liste factures. ⚠️ Ordre des routes : `/counts` est déclaré AVANT `/:id` côté API, sinon `:id` matcherait la string "counts". }