Skip to main content
Schedule recurring exports of cell scores from Locus and have them emailed to you on a weekly or monthly cadence. Each delivery runs the saved filter against the latest cell_scores and attaches the result as a CSV or JSON file. For one-off downloads, use the on-demand exports endpoint described in ML exports.

When to use it

Use scheduled exports when you want a hands-off feed of Locus scores for a specific market, score band, or analyst inbox — for example:
  • A weekly CSV of all cells in a metro for territory planning.
  • A monthly JSON snapshot of high-composite cells (e.g. composite ≥ 70) for portfolio review.
  • Recurring deliveries to a shared analyst alias so the same dataset lands in the same place every week.
Each schedule is owned by the user that creates it and can only be read, updated, or deleted by that user.

Endpoints

All endpoints require an authenticated session. Schedules are scoped to the calling user.

GET /api/scheduled-exports

List scheduled exports owned by the current user. Response

POST /api/scheduled-exports

Create a new scheduled export. Body parameters Filters The filter blob is stored as JSON and re-evaluated on every run, so updates to cell_scores show up automatically. The cron worker currently honors: Each delivery is capped at 5,000 rows, ordered by descending composite. If the filter matches no rows, the run is recorded as successful and no email is sent. Example — create a weekly schedule
Response

DELETE /api/scheduled-exports?id=<uuid>

Delete a scheduled export. The id must be a UUID owned by the current user.
Response

Delivery cadence

A cron worker evaluates schedules every Monday at 08:00 UTC and runs any schedule whose last_sent_at is older than its cadence (or has never run):
  • weekly — runs once last_sent_at is at least 7 days old.
  • monthly — runs once last_sent_at is at least 30 days old.
Because the worker fires weekly, weekly is the floor cadence — monthly schedules will fire on the first Monday after their 30-day window elapses.

Email format

Each successful run sends an email from Axiom Locus <reports@axiomlocus.io> with:
  • Subject: Your scheduled Axiom Locus export: <name> (<row_count> rows)
  • Attachment: <slugified-name>-<YYYY-MM-DD>.<csv|json>
CSV attachments include a header row and the columns h3_index, metro_slug, neighborhood, lat, lng, composite, confidence, the eight signal-group scores (business_vitality, population_momentum, demographics, economic_strength, development_pipeline, accessibility, safety_environment, amenity_demand), and computed_at. JSON attachments contain an array of objects with the same keys.

Failure handling

If a run fails (for example, an upstream Resend outage), the error message is written to last_error on the schedule and the schedule remains due — the worker will retry on the next cron tick. A successful run clears last_error and bumps last_sent_at. List the schedule with GET to see whether the last run succeeded.

Limits

S3 delivery is not yet supported — schedules deliver to email only.