Sync Newsletters

Lions Daily Report newsletter issues

Sync Newsletters

Fetches Lions Daily Report newsletter issues. Powers the Newsletter page reader view.

API Endpoint

GET https://api.lionschedule.me/api/v1/newsletters/lions-daily-report/sync/
Parameter Default Description
since Last sync timestamp ISO datetime; only fetch issues newer than this

What It Does

  1. Checks SyncLog for the last sync timestamp (incremental sync)
  2. Fetches only new newsletter issues since that timestamp
  3. Creates or updates Newsletter records (unique on issue_id)
  4. Updates the SyncLog timestamp for next incremental run

Use --full to ignore the last sync time and fetch all issues.

Data Stored

Newsletter: issue_id, newsletter_slug, newsletter_name, subject, slug, content_markdown, content_html, sent_at, created_at

Response Structure

{
  "newsletter": {
    "name": "Lions Daily Report",
    "slug": "lions-daily-report"
  },
  "issues": [
    {
      "id": "a6d2546f-e1a6-445a-8e86-c58759c029df",
      "subject": "Lions Daily Report - March 22, 2026",
      "content_markdown": "# Today's Report\n\n...",
      "content_html": "<h1>Today's Report</h1>...",
      "sent_at": "2026-03-22T09:00:00Z",
      "created_at": "2026-03-22T08:45:00Z"
    }
  ]
}

Schedule

Daily at 9 AM. The Lions Daily Report is generated once per day.

Management Command

python manage.py sync_newsletters --triggered-by manual
python manage.py sync_newsletters --full  # Full re-sync