1. Enrich Real Estate Projects

Starts real estate project data enrichment using Google Gemini AI with comprehensive data enhancement. This endpoint validates the request and starts background processing that typically takes 2-3 minutes. Projects are processed in batches of 5 and updated with enhanced information.

Endpoint: /enrichment/projects

Method: POST

Operation Modes:

  1. Specific Projects Mode (when project_ids provided) - Validates and queues specified projects by their IDs for background enrichment
  2. Research Projects Mode (default when no project_ids provided) - Validates and queues all projects with 'researching' status for background enrichment

Request Body:

{
    "project_ids": [123, 124, 125],                    // Optional: Specific project IDs to enrich (can be single integer or list)
    "filter_status": "researching",                    // Optional: Filter projects by status (default: "researching")
    "source_urls": {                                   // Optional: Additional source URLs for enhanced research context
        "123": ["<https://example.com/project1>"],
        "124": ["<https://example.com/project2>", "<https://another.com/info>"]
    },
    "superagent_service_token": "sa_token_abc123",    // Required: Service token for Superagent API authentication
    "superagent_environment": "staging"                // Optional: Superagent environment (default: based on app environment)
}

Response:

2. Revert Project Enrichment

Reverts project enrichment changes using cached backup data. This endpoint restores projects to their state before enrichment by retrieving backup data from Redis cache and updating projects with original data.

Endpoint: /enrichment/projects/revert

Method: POST

Operation: