Reports

Pre-built and country-specific financial reports — income, expenses, AR aging, tax compliance.

3 endpoints·Scopes: reports:read, reports:write
GET/api/reports#

List reports

scope · reports:read

Lists reports the caller can see. Results are filtered by the caller's accessible organizations; many routes paginate via page and limit.

Scope: reports:read
Endpoint: GET /api/reports

Example request

curl "https://guliel.com/api/reports?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • type
    string
  • category
    string
  • search
    string

Response (200/201)

  • successreq
    boolean
  • reportsreq
    array<object>Report definitions (name, description, parameters, columns). The full shape lives in src/lib/reports/types.ts:ReportDefinition.
  • organizationCountryreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
GET/api/reports/{reportType}#

Get a report

scope · reports:read

Fetches a single report by id. Returns 404 if the report isn't in the caller's accessible organizations.

Scope: reports:read
Endpoint: GET /api/reports/{reportType}

Example request

curl "https://guliel.com/api/reports/<reportType>?reportType=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • reportTypereq
    string
  • organizationIdreq
    string

Response (200/201)

  • successreq
    boolean
  • datareq
    objectGenerated report data — shape varies by report type (rows, totals, charts, etc.). See src/lib/reports/types.ts:ReportData and the per-report adapter in src/lib/reports/generators/.

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
GET/api/reports/{reportType}/schema#

List schema for a report

scope · reports:read

Returns every schema row associated with the given report.

Scope: reports:read
Endpoint: GET /api/reports/{reportType}/schema

Example request

curl "https://guliel.com/api/reports/<reportType>/schema?reportType=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • reportTypereq
    string
  • organizationIdreq
    string

Response (200/201)

  • successreq
    boolean
  • definitionreq
    objectReport definition (name, description, columns, parameters). See src/lib/reports/types.ts:ReportDefinition for the full shape.

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal