Lydira API
TR

API reference

Reports

4 endpoints

Read-only export of the same reports the browser runs. Two families share one result shape: preset reports off the built-in catalogue (GET /api/v1/reports) and the agency's own saved reports from the report builder (GET /api/v1/saved_reports).

Both are plan-gated per report. GET /api/v1/reports lists only what the account's plan actually includes, so an empty catalogue is an answer about the plan rather than an error. Running a report the plan excludes answers 403 plan_gated.

Filters travel as filters[key]=value. The catalogue publishes each preset's accepted filters and columns, so a client can build the query without hardcoding them.

Preset catalogue

GET/api/v1/reports

Needs a key with the full scope.

Every built-in report the account's plan includes, with the filters it accepts and the columns it returns. Read this first and build your query from it rather than hardcoding keys: the catalogue is the contract, and it shrinks or grows with the plan.

A fixed set of definitions rather than records, so there is no page.

Response · 200

  • dataobject[]required
    Show fields
    • keystring

      What you pass as {id} to run it.

    • plan_featurestring

      The plan flag this report needs.

    • filtersobject[]

      The filters this preset accepts, as definitions rather than values.

    • columnsobject[]

      The columns it returns, in order, with their labels and types.

Responses

  • 401Missing or invalid Bearer token
  • 403Policy denied or account has no owner
  • 429Rate limit exceeded
curl -X GET 'https://YOUR-CELL.lydira.com/api/v1/reports' \
  -H 'Authorization: Bearer sek_YOUR_API_KEY'
Response
200
{
  "data": [
    {
      "key": "ar_aging",
      "plan_feature": "reports_builder",
      "filters": [
        {}
      ],
      "columns": [
        {}
      ]
    }
  ]
}

Run a preset report

GET/api/v1/reports/{id}

Needs a key with the full scope.

id is a preset key from the catalogue. Filters go in as filters[key]=value, for example ?filters[from]=2026-01-01&filters[to]=2026-03-31.

The result is unwrapped: rows, columns and the totals sit at the top level, not under data. Money in rows follows the key's role, so a masked column comes back empty rather than the row being withheld.

A report the plan does not include answers 403 plan_gated; an unrecognised key answers 404 not_found.

Parameters

Path

  • idstringrequired

    A preset key.

Query

  • filtersobject

    Per-preset; the catalogue publishes which keys each one takes.

Response · 200

  • keystring
  • columnsobject[]
  • rowsobject[]
  • summaryobject

    Headline figures for the whole result.

  • filtersobject

    The filters actually applied, after defaults and clamping.

  • generated_atdate-timenullable
  • paginationobjectnullable

    Present only on presets that page. null means the result is whole.

  • group_bystringnullable

    The grouping column, when the preset groups.

  • groupsobject[]nullable

    Ordered group headers with their per-group totals.

  • totalsobjectnullable

    Grand totals, including a per-currency breakdown where the rows are not in one currency.

Responses

  • 401Missing or invalid Bearer token
  • 403The plan does not include this report
  • 404Resource not found
  • 429Rate limit exceeded
curl -X GET 'https://YOUR-CELL.lydira.com/api/v1/reports/ar_aging' \
  -H 'Authorization: Bearer sek_YOUR_API_KEY'
Response
200
{
  "key": "ar_aging",
  "columns": [
    {}
  ],
  "rows": [
    {}
  ],
  "summary": {},
  "filters": {},
  "generated_at": "2026-03-14T09:30:00Z",
  "pagination": {},
  "group_by": "string",
  "groups": [
    {}
  ],
  "totals": {}
}

List saved reports

GET/api/v1/saved_reports

Needs a key with the full scope.

The agency's own reports from the report builder, by name. Requires the reports_builder plan feature; without it the whole endpoint answers 403 plan_gated.

Parameters

Query

  • limitintegerdefault 25

    Rows per page.

  • cursorstring

    Opaque; take it from the previous response's page.next_cursor.

Response · 200

  • dataobject[]required
    Show fields
    • iduuid
    • namestring
    • entitystringnullable

      What the report is built over.

    • schedule_frequencystringnullable

      null when it is run on demand only.

    • recipient_countinteger
    • last_run_atdate-timenullable
  • pageobjectrequired

    The cursor for the list beside it. Re-send the same request with ?cursor=<next_cursor> while has_more is true. next_cursor is null on the last page.

    Show fields
    • next_cursorstringrequirednullable
    • has_morebooleanrequired
    • limitintegerrequired

Responses

  • 401Missing or invalid Bearer token
  • 403The plan does not include the report builder
  • 429Rate limit exceeded
curl -X GET 'https://YOUR-CELL.lydira.com/api/v1/saved_reports' \
  -H 'Authorization: Bearer sek_YOUR_API_KEY'
Response
200
{
  "data": [
    {
      "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
      "name": "Ayşe Yılmaz",
      "entity": "hotel_stays",
      "schedule_frequency": "weekly",
      "recipient_count": 3,
      "last_run_at": "2026-03-14T09:30:00Z"
    }
  ],
  "page": {
    "next_cursor": "MjAyNi0wMy0xNFQwOTozMDowMC4wMDAwMDBafDk0MQ",
    "has_more": true,
    "limit": 25
  }
}

Run a saved report

GET/api/v1/saved_reports/{id}

Needs a key with the full scope.

Runs the stored definition and returns the same result shape a preset does, plus saved_report_id and name. The filters are the ones saved with the report; they are not overridable here.

Parameters

Path

  • iduuidrequired

Response · 200

  • keystring
  • columnsobject[]
  • rowsobject[]
  • summaryobject

    Headline figures for the whole result.

  • filtersobject

    The filters actually applied, after defaults and clamping.

  • generated_atdate-timenullable
  • paginationobjectnullable

    Present only on presets that page. null means the result is whole.

  • group_bystringnullable

    The grouping column, when the preset groups.

  • groupsobject[]nullable

    Ordered group headers with their per-group totals.

  • totalsobjectnullable

    Grand totals, including a per-currency breakdown where the rows are not in one currency.

  • saved_report_iduuid
  • namestring

Responses

  • 401Missing or invalid Bearer token
  • 403The plan does not include the report builder
  • 404Resource not found
  • 429Rate limit exceeded
curl -X GET 'https://YOUR-CELL.lydira.com/api/v1/saved_reports/9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18' \
  -H 'Authorization: Bearer sek_YOUR_API_KEY'
Response
200
{
  "key": "ar_aging",
  "columns": [
    {}
  ],
  "rows": [
    {}
  ],
  "summary": {},
  "filters": {},
  "generated_at": "2026-03-14T09:30:00Z",
  "pagination": {},
  "group_by": "string",
  "groups": [
    {}
  ],
  "totals": {},
  "saved_report_id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
  "name": "Ayşe Yılmaz"
}