# Get phytosanitary summary for entire company Retrieves aggregated phytosanitary data (pest and disease incidence/severity) for all projects and sectors belonging to the authenticated company within a specified time range. Requires API token authentication with read:phytosanitary scope via the x-api-key header. Key features: - Automatically uses companyId from the authenticated API token - Aggregates data from all projects and sectors belonging to the company - Returns incidence and severity metrics grouped by project and sector - Maximum range: 180 days - Dates must be in YYYY-MM-DD format (local time, no timezone suffix) - Timezone is automatically resolved from the company's projects - No need to specify companyId, projectId, or sectorId manually Endpoint: GET /api/control/phytosanitary/company-summary Version: 2.0.0 Security: apiKeyAuth ## Query parameters: - `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) Enum: "success" - `scope` (string) Enum: "company" - `range` (object) - `range.startTime` (string) Example: "2025-10-01" - `range.endTime` (string) Example: "2025-10-09" - `companyTimezone` (string) Timezone resolved from company's projects Example: "America/Monterrey" - `companyId` (string) Company identifier from authenticated token Example: "comp_12345" - `totalRecords` (integer) Total number of phytosanitary records found Example: 150 - `totalProjects` (integer) Total number of projects with data Example: 2 - `projects` (array) - `projects.projectId` (string) Example: "proj_123" - `projects.projectName` (string) Example: "Rancho San Pedro" - `projects.sectors` (array) - `projects.sectors.sector_name` (string) Example: "Lote A-1" - `projects.sectors.incidence` (number) Example: 12.5 - `projects.sectors.severity` (number) Example: 18.3 - `projects.sectors.pests_diseases` (array) - `projects.sectors.pests_diseases.pest_disease_name` (string) Example: "Aphids" ## 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"