Lydira API
TR

API reference

Insights

2 endpoints

Two computed dashboards, each a single call with no pagination. GET /api/v1/performance is post-trip quality: NPS, survey response rate, per-advisor breakdown, top suppliers and recent detractors over a window. GET /api/v1/retention is the forward view: anniversaries coming up, trips due a rebooking nudge, recent outreach and the referral codes that actually convert.

Both are computed fresh on every call rather than served from a cache, so treat them as a periodic pull, not a per-request lookup.

Post-trip quality snapshot

GET/api/v1/performance

Needs a key with the full scope.

Survey outcomes over a trailing window: how many invitations went out, how many were answered, the NPS that came back, the average segment rating, a per-advisor breakdown, the suppliers that scored best and the detractors worth calling.

Computed fresh on each call. Leave advisor_id off for the whole account.

Parameters

Query

  • window_daysenumdefault 90

    Anything outside the allowed set falls back to 90.

    one of306090180365

  • advisor_iduuid

Response · 200

  • dataobject
    Show fields
    • window_daysinteger

      The window actually used, after the allowlist.

    • advisorobjectnullable

      Null when the snapshot covers the whole account.

      Show fields
      • iduuid
      • namestringnullable
      • emailstringnullable
    • invitedinteger

      Survey invitations sent in the window.

    • startedinteger
    • completedinteger
    • response_ratenumbernullable

      Completed over invited, 0 to 1.

    • npsnumbernullable

      Net promoter score, -100 to 100.

    • avg_segment_ratingnumbernullable
    • per_advisorobject[]

      The same figures broken out per advisor.

    • top_suppliersobject[]
    • detractorsobject[]

      Recent low scorers, worth a call.

    • complimentaryobjectnullable

      Goodwill and complimentary service figures for the window.

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/performance' \
  -H 'Authorization: Bearer sek_YOUR_API_KEY'
Response
200
{
  "data": {
    "window_days": 90,
    "advisor": {
      "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
      "name": "Ayşe Yılmaz",
      "email": "ayse@example.com"
    },
    "invited": 1,
    "started": 1,
    "completed": 1,
    "response_rate": 1,
    "nps": 1,
    "avg_segment_rating": 1,
    "per_advisor": [
      {}
    ],
    "top_suppliers": [
      {}
    ],
    "detractors": [
      {}
    ],
    "complimentary": {}
  }
}

Rebooking opportunities

GET/api/v1/retention

Needs a key with the full scope.

The forward view on past customers: trips hitting their one-year anniversary inside the window, trips that ended about six months ago and are due a nudge, the outreach already sent, and the referral codes pulling their weight.

Each list is capped (50 anniversaries, 50 rebooks, 20 touches, 10 referral codes) and there is no cursor: widen or narrow with window_days.

Parameters

Query

  • window_daysintegerdefault 60

    Clamped to 7-365.

Response · 200

  • dataobject
    Show fields
    • window_daysinteger
    • upcomingobject[]

      Completed trips reaching their one-year anniversary inside the window. Capped at 50.

      Show fields
      • trip_iduuid
      • trip_titlestring
      • anniversarydate
      • customerobjectnullable
        Show fields
        • iduuid
        • namestringnullable
      • advisorobjectnullable

        A seat on the account, as referenced from other records.

        Show fields
        • iduuid
        • namestringnullable
        • emailstringnullable
    • overdue_rebooksobject[]

      Trips that ended about six months ago. Capped at 50.

      Show fields
      • trip_iduuid
      • trip_titlestring
      • end_datedatenullable
      • customerobjectnullable
        Show fields
        • iduuid
        • namestringnullable
      • advisorobjectnullable

        A seat on the account, as referenced from other records.

        Show fields
        • iduuid
        • namestringnullable
        • emailstringnullable
    • recent_touchesobject[]

      Outreach already sent, newest first. Capped at 20.

      Show fields
      • iduuid
      • kindstring
      • statusstring
      • sent_atdate-timenullable
      • customerobjectnullable
        Show fields
        • iduuid
        • namestringnullable
      • tripobjectnullable
        Show fields
        • iduuid
        • titlestring
    • top_referralsobject[]

      Active referral codes by conversions. Capped at 10.

      Show fields
      • iduuid
      • tokenstring
      • labelstringnullable
      • visitsinteger
      • conversionsinteger
      • customerobjectnullable
        Show fields
        • iduuid
        • namestringnullable
      • tripobjectnullable
        Show fields
        • iduuid
        • titlestring

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/retention' \
  -H 'Authorization: Bearer sek_YOUR_API_KEY'
Response
200
{
  "data": {
    "window_days": 90,
    "upcoming": [
      {
        "trip_id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
        "trip_title": "string",
        "anniversary": "2026-03-14",
        "customer": {
          "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
          "name": "Ayşe Yılmaz"
        },
        "advisor": {
          "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
          "name": "Ayşe Yılmaz",
          "email": "ayse@example.com"
        }
      }
    ],
    "overdue_rebooks": [
      {
        "trip_id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
        "trip_title": "string",
        "end_date": "2026-03-14",
        "customer": {
          "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
          "name": "Ayşe Yılmaz"
        },
        "advisor": {
          "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
          "name": "Ayşe Yılmaz",
          "email": "ayse@example.com"
        }
      }
    ],
    "recent_touches": [
      {
        "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
        "kind": "anniversary",
        "status": "confirmed",
        "sent_at": "2026-03-14T09:30:00Z",
        "customer": {
          "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
          "name": "Ayşe Yılmaz"
        },
        "trip": {
          "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
          "title": "Cappadocia, 4 nights"
        }
      }
    ],
    "top_referrals": [
      {
        "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
        "token": "0b9a4d182c0f6b9a",
        "label": "Spring campaign",
        "visits": 1,
        "conversions": 1,
        "customer": {
          "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
          "name": "Ayşe Yılmaz"
        },
        "trip": {
          "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
          "title": "Cappadocia, 4 nights"
        }
      }
    ]
  }
}