# Get phytosanitary monitoring summary Retrieves aggregated phytosanitary data (pest and disease incidence/severity) for a specified time range. Requires API token authentication with read:phytosanitary scope via the x-api-key header. Key features: - Aggregates data from phytosanitary form records - Supports filtering by company, project, or sector - Returns incidence and severity metrics per sector - Maximum range: 180 days - Dates must be in YYYY-MM-DD format (local time, no timezone suffix) - Timezone is automatically resolved from the project settings Endpoint: GET /api/control/phytosanitary/summary Version: 2.0.0 Security: apiKeyAuth ## Query parameters: - `companyId` (string) Company identifier (at least one of companyId, projectId, or sectorId is required) Example: "comp_12345" - `projectId` (string) Project identifier (at least one of companyId, projectId, or sectorId is required) Example: "proj_123" - `sectorId` (string) Sector identifier (at least one of companyId, projectId, or sectorId is required) Example: "sector_001" - `startTime` (string, required) Start date in YYYY-MM-DD format (local time, no timezone suffix) Example: "2025-10-01" - `endTime` (string, required) End date in YYYY-MM-DD format (local time, no timezone suffix) Example: "2025-10-09" ## Response 200 fields (application/json): - `status` (string) Example: "success" - `scope` (string) Scope of the query (company, project, or sector) Enum: "company", "project", "sector" - `range` (object) - `range.startTime` (string) Start date in YYYY-MM-DD format Example: "2025-10-01" - `range.endTime` (string) End date in YYYY-MM-DD format Example: "2025-10-09" - `projectTimezone` (string) Timezone used for the project Example: "America/Mexico_City" - `filters` (object) - `filters.companyId` (string,null) Example: "comp_12345" - `filters.projectId` (string,null) Example: "proj_123" - `filters.sectorId` (string,null) Example: "sector_001" - `totalRecords` (integer) Total number of phytosanitary form records Example: 42 - `totalProjects` (integer) Total number of projects (only for company scope) Example: 3 - `totalSectors` (integer) Total number of sectors (for project/sector scope) Example: 5 - `projects` (array) Projects with nested sectors (only for company scope) - `projects.projectId` (string,null) Project identifier Example: "proj_123" - `projects.projectName` (string,null) Project name Example: "Rancho San Pedro" - `projects.sectors` (array) List of sectors with phytosanitary data - `projects.sectors.sector_name` (string) Sector name Example: "Lote A-1" - `projects.sectors.incidence` (number) Overall incidence for the sector (0-100) Example: 12.3 - `projects.sectors.severity` (number) Overall severity for the sector (0-100) Example: 18.5 - `projects.sectors.pests_diseases` (array) List of pests and diseases detected in this sector - `projects.sectors.pests_diseases.pest_disease_name` (string) Name of the pest or disease Example: "Aphids" - `projects.sectors.pests_diseases.incidence` (number) Percentage of affected plants (0-100) Example: 15.5 - `projects.sectors.pests_diseases.severity` (number) Severity level (0-100) Example: 25 - `sectors` (array) Sectors with phytosanitary data (for project/sector scope) ## Response 400 fields (application/json): - `status` (string) Example: "error" - `message` (string) Example: "Error message description" - `error` (string) Example: "Detailed error information" ## Response 401 fields (application/json): - `status` (string) Example: "error" - `message` (string) Example: "Error message description" - `error` (string) Example: "Detailed error information" ## Response 403 fields (application/json): - `status` (string) Example: "error" - `message` (string) Example: "Error message description" - `error` (string) Example: "Detailed error information" ## Response 422 fields (application/json): - `status` (string) Example: "error" - `message` (string) Example: "Error message description" - `error` (string) Example: "Detailed error information" ## Response 500 fields (application/json): - `status` (string) Example: "error" - `message` (string) Example: "Error message description" - `error` (string) Example: "Detailed error information"