Skip to content
Project Lifecycle

Project Lifecycle

A project moves from creation to an enriched, exportable CSV. There are two ingestion paths that feed one enrichment engine.

create (empty) ── add-activities (N calls) ── submit ──► enrichment
import CSV ──────────────────────────── (auto-sealed) ─┘

Path 1: build a project incrementally

  • CreateProject(name): creates an empty project.
  • AddActivities(project_id, activities[]): stages lines onto the project. Rejected if the project is already sealed.
  • Submit(project_id, webhook_url?): seals the batch. Lines that share the same designation are grouped into a single session with an occurrence count, and enrichment starts. Submit is idempotent: re-submitting a sealed project is a no-op. Pass an optional webhook_url to be notified on completion (see Webhooks).

Path 2: import a CSV in one shot

  • ImportCSV(name, csv, category_mode): parses the CSV all-or-nothing, creates the project, and seals it immediately (an implicit submit). Enrichment starts right away.

Tracking progress

  • GetProgress(project_id) returns:

    { status, total_lines, enriched, in_progress, failed, submitted_at, completed_at }

    status is one of pending, enriching, or completed.

Exporting results

  • ExportCSV(project_id) returns a 15-minute presigned S3 URL to the enriched CSV. The file has the same shape as the web export: one row per product, plus computed columns.