{"openapi":"3.0.3","info":{"title":"Harvest Outlook API","version":"0.1.0"},"components":{"schemas":{}},"paths":{"/api/v1/health":{"get":{"tags":["system"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"database":{"type":"boolean"}},"required":["status","database"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/capabilities":{"get":{"tags":["system"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"mode":{"type":"string","enum":["live","replay","synthetic"]},"models":{"type":"object","properties":{"text":{"type":"string"},"escalation":{"type":"string"},"image":{"type":"string"},"segment":{"type":"string"},"speechToText":{"nullable":true,"type":"string"},"textToSpeech":{"nullable":true,"type":"string"}},"required":["text","escalation","image","segment","speechToText","textToSpeech"],"additionalProperties":false},"providers":{"type":"object","properties":{"meta":{"type":"boolean"}},"required":["meta"],"additionalProperties":false},"languages":{"type":"array","items":{"type":"string"}},"database":{"type":"object","properties":{"reachable":{"type":"boolean"},"postgis":{"type":"boolean"}},"required":["reachable","postgis"],"additionalProperties":false},"limits":{"type":"object","properties":{"maxUploadImageBytes":{"type":"number"},"maxVoiceSeconds":{"type":"number"}},"required":["maxUploadImageBytes","maxVoiceSeconds"],"additionalProperties":false},"budget":{"nullable":true,"type":"object","properties":{"exhausted":{"type":"boolean"},"currency":{"type":"string","enum":["USD"]},"devAllocationUsd":{"type":"number"},"remainingDevUsd":{"type":"number"},"demoReserveUsd":{"type":"number"}},"required":["exhausted"],"additionalProperties":false},"speech":{"type":"object","properties":{"available":{"type":"boolean"},"qualified":{"type":"boolean","enum":[false]}},"required":["available","qualified"],"additionalProperties":false},"tools":{"type":"object","properties":{"bound":{"type":"array","items":{"type":"string"}},"unbound":{"type":"array","items":{"type":"string"}}},"required":["bound","unbound"],"additionalProperties":false}},"required":["mode","models","providers","languages","database","limits","budget","speech","tools"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/session":{"get":{"tags":["session"],"description":"Reports whether the cookie holds a valid guest session; re-issues the CSRF value.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"authenticated":{"type":"boolean"},"scope":{"type":"string","enum":["device_guest"]},"expiresAt":{"type":"string"},"csrfToken":{"type":"string"},"reused":{"type":"boolean"},"caveat":{"type":"string"}},"required":["authenticated"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"post":{"tags":["session"],"description":"Creates a device guest workspace (owner + session) and sets ho_session (HttpOnly) and ho_csrf cookies. An existing valid session is reused (same owner) with its token rotated, rather than creating another owner.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"authenticated":{"type":"boolean"},"scope":{"type":"string","enum":["device_guest"]},"expiresAt":{"type":"string"},"csrfToken":{"type":"string"},"reused":{"type":"boolean"},"caveat":{"type":"string"}},"required":["authenticated"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"authenticated":{"type":"boolean"},"scope":{"type":"string","enum":["device_guest"]},"expiresAt":{"type":"string"},"csrfToken":{"type":"string"},"reused":{"type":"boolean"},"caveat":{"type":"string"}},"required":["authenticated"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"delete":{"tags":["session"],"description":"Revokes the current session and clears cookies.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"revoked":{"type":"boolean"}},"required":["revoked"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/market-quotes":{"get":{"tags":["farms"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"checkedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"selectionBasis":{"type":"string","enum":["tracked_products","recommendation_watchlist","requested_products","none"]},"providerStatus":{"type":"string"},"missingReason":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["available","partial","unavailable"]},"requestLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"requestsMade":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"products":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"status":{"type":"string","enum":["available","stale","unavailable"]},"missingReason":{"nullable":true,"type":"string"},"providerStatus":{"type":"string"},"scope":{"type":"string","enum":["district","state","national","unavailable"]},"fallbackReason":{"nullable":true,"type":"string"},"quotes":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"commodity":{"type":"string"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"marketId":{"type":"string"},"marketName":{"type":"string"},"state":{"nullable":true,"type":"string"},"district":{"nullable":true,"type":"string"},"variety":{"nullable":true,"type":"string"},"grade":{"nullable":true,"type":"string"},"min":{"nullable":true,"type":"string"},"modal":{"nullable":true,"type":"string"},"max":{"nullable":true,"type":"string"},"unit":{"type":"string","enum":["INR/quintal"]},"unitBasis":{"type":"string","enum":["provider_declared","agmarknet_convention"]},"modalInrPerKg":{"nullable":true,"type":"string"},"evidenceState":{"type":"string","enum":["observed"]},"source":{"type":"string","format":"uri"},"fetchedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"stale":{"type":"boolean"},"flags":{"type":"array","items":{"type":"string"}}},"required":["productId","commodity","date","marketId","marketName","state","district","variety","grade","min","modal","max","unit","unitBasis","modalInrPerKg","evidenceState","source","fetchedAt","stale","flags"],"additionalProperties":false}}},"required":["productId","status","missingReason","providerStatus","scope","fallbackReason","quotes"],"additionalProperties":false}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["checkedAt","selectionBasis","providerStatus","missingReason","status","requestLimit","requestsMade","products","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"post":{"tags":["farms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"productIds":{"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"checkedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"selectionBasis":{"type":"string","enum":["tracked_products","recommendation_watchlist","requested_products","none"]},"providerStatus":{"type":"string"},"missingReason":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["available","partial","unavailable"]},"requestLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"requestsMade":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"products":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"status":{"type":"string","enum":["available","stale","unavailable"]},"missingReason":{"nullable":true,"type":"string"},"providerStatus":{"type":"string"},"scope":{"type":"string","enum":["district","state","national","unavailable"]},"fallbackReason":{"nullable":true,"type":"string"},"quotes":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"commodity":{"type":"string"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"marketId":{"type":"string"},"marketName":{"type":"string"},"state":{"nullable":true,"type":"string"},"district":{"nullable":true,"type":"string"},"variety":{"nullable":true,"type":"string"},"grade":{"nullable":true,"type":"string"},"min":{"nullable":true,"type":"string"},"modal":{"nullable":true,"type":"string"},"max":{"nullable":true,"type":"string"},"unit":{"type":"string","enum":["INR/quintal"]},"unitBasis":{"type":"string","enum":["provider_declared","agmarknet_convention"]},"modalInrPerKg":{"nullable":true,"type":"string"},"evidenceState":{"type":"string","enum":["observed"]},"source":{"type":"string","format":"uri"},"fetchedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"stale":{"type":"boolean"},"flags":{"type":"array","items":{"type":"string"}}},"required":["productId","commodity","date","marketId","marketName","state","district","variety","grade","min","modal","max","unit","unitBasis","modalInrPerKg","evidenceState","source","fetchedAt","stale","flags"],"additionalProperties":false}}},"required":["productId","status","missingReason","providerStatus","scope","fallbackReason","quotes"],"additionalProperties":false}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["checkedAt","selectionBasis","providerStatus","missingReason","status","requestLimit","requestsMade","products","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/workspace":{"get":{"tags":["farms"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"boundary":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"previousHarvest":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["unknown"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["none"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["known"]},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["status","cropId","harvestDate"],"additionalProperties":false}]},"cycles":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"stage":{"type":"string","enum":["sowed","growing","flowering","harvested"]},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"rootPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"latestPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false}},"required":["id","cropId","sowingDate","stage"],"additionalProperties":false}},"rotationPlans":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"year":{"type":"integer","minimum":1900,"maximum":2200},"season":{"type":"string","minLength":1,"maxLength":80},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"plannedSowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"plannedHarvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"}},"required":["id","year","season","cropId"],"additionalProperties":false}},"fields":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"name":{"type":"string","minLength":1,"maxLength":80},"boundary":{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"notes":{"type":"string","maxLength":500},"checkIntervalDays":{"type":"integer","minimum":3,"maximum":30}},"required":["id","name","boundary"],"additionalProperties":false}},"checkIntervalDays":{"type":"integer","minimum":3,"maximum":30},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["boundary","previousHarvest","cycles","rotationPlans","fields","farmId","version","updatedAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"put":{"tags":["farms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"boundary":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"previousHarvest":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["unknown"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["none"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["known"]},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["status","cropId","harvestDate"],"additionalProperties":false}]},"cycles":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"stage":{"type":"string","enum":["sowed","growing","flowering","harvested"]},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"rootPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"latestPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false}},"required":["id","cropId","sowingDate","stage"],"additionalProperties":false}},"rotationPlans":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"year":{"type":"integer","minimum":1900,"maximum":2200},"season":{"type":"string","minLength":1,"maxLength":80},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"plannedSowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"plannedHarvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"}},"required":["id","year","season","cropId"],"additionalProperties":false}},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"name":{"type":"string","minLength":1,"maxLength":80},"boundary":{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"notes":{"type":"string","maxLength":500},"checkIntervalDays":{"type":"integer","minimum":3,"maximum":30}},"required":["id","name","boundary"],"additionalProperties":false}},"checkIntervalDays":{"type":"integer","minimum":3,"maximum":30},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["boundary","previousHarvest","cycles","rotationPlans","expectedVersion"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"boundary":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"previousHarvest":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["unknown"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["none"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["known"]},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["status","cropId","harvestDate"],"additionalProperties":false}]},"cycles":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"stage":{"type":"string","enum":["sowed","growing","flowering","harvested"]},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"rootPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"latestPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false}},"required":["id","cropId","sowingDate","stage"],"additionalProperties":false}},"rotationPlans":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"year":{"type":"integer","minimum":1900,"maximum":2200},"season":{"type":"string","minLength":1,"maxLength":80},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"plannedSowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"plannedHarvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"}},"required":["id","year","season","cropId"],"additionalProperties":false}},"fields":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"name":{"type":"string","minLength":1,"maxLength":80},"boundary":{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"notes":{"type":"string","maxLength":500},"checkIntervalDays":{"type":"integer","minimum":3,"maximum":30}},"required":["id","name","boundary"],"additionalProperties":false}},"checkIntervalDays":{"type":"integer","minimum":3,"maximum":30},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["boundary","previousHarvest","cycles","rotationPlans","fields","farmId","version","updatedAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/monitoring":{"get":{"tags":["farms"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"put":{"tags":["farms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"intervalHours":{"default":24,"type":"integer","minimum":6,"maximum":168},"metaEnabled":{"default":true,"type":"boolean"}},"required":["enabled"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/plans":{"get":{"tags":["farms"],"parameters":[{"schema":{"default":"false","type":"string","enum":["true","false"]},"in":"query","name":"includeArchived","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms":{"post":{"tags":["farms"],"description":"Creates a farm. Location needs a district; coordinates are optional with a precision label (approximate coordinates are rounded to ~1 km). Each fact carries its own provenance. Supports Idempotency-Key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"location":{"type":"object","properties":{"districtId":{"type":"string","minLength":1,"maxLength":64},"districtName":{"type":"string","minLength":1,"maxLength":120},"stateId":{"type":"string","minLength":1,"maxLength":16},"stateCode":{"type":"string","minLength":1,"maxLength":16},"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180},"precision":{"default":"district","type":"string","enum":["district","approximate","precise"]}}},"areaHectares":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000},"facts":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"}],"nullable":true},"unit":{"type":"string","maxLength":32},"basis":{"default":"unknown","type":"string","enum":["farmer_reported","lab_test","district_proxy","derived","unknown"]},"confirmed":{"default":false,"type":"boolean"},"source":{"type":"string","maxLength":200},"recordedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["value"]}}},"required":["name","location"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"type":"object","properties":{"districtId":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"stateCode":{"nullable":true,"type":"string"},"lat":{"nullable":true,"type":"number"},"lon":{"nullable":true,"type":"number"},"precision":{"type":"string","enum":["district","approximate","precise"]}},"required":["districtId","districtName","stateCode","lat","lon","precision"],"additionalProperties":false},"areaHectares":{"nullable":true,"type":"number"},"version":{"type":"number"},"facts":{"type":"object","additionalProperties":{"type":"object","properties":{"factId":{"type":"string"},"value":{},"unit":{"nullable":true,"type":"string"},"basis":{"type":"string","enum":["farmer_reported","lab_test","district_proxy","derived","unknown"]},"confirmed":{"type":"boolean"},"source":{"nullable":true,"type":"string"},"recordedAt":{"type":"string"}},"required":["factId","value","unit","basis","confirmed","source","recordedAt"],"additionalProperties":false}},"factHistory":{"type":"array","items":{"type":"object","properties":{"factId":{"type":"string"},"value":{},"unit":{"nullable":true,"type":"string"},"basis":{"type":"string","enum":["farmer_reported","lab_test","district_proxy","derived","unknown"]},"confirmed":{"type":"boolean"},"source":{"nullable":true,"type":"string"},"recordedAt":{"type":"string"},"key":{"type":"string"},"superseded":{"type":"boolean"}},"required":["factId","value","unit","basis","confirmed","source","recordedAt","key","superseded"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["district_unresolved"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["id","name","location","areaHectares","version","facts","createdAt","updatedAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"get":{"tags":["farms"],"description":"Lists the current owner's farms.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"type":"object","properties":{"districtId":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"stateCode":{"nullable":true,"type":"string"},"lat":{"nullable":true,"type":"number"},"lon":{"nullable":true,"type":"number"},"precision":{"type":"string","enum":["district","approximate","precise"]}},"required":["districtId","districtName","stateCode","lat","lon","precision"],"additionalProperties":false},"areaHectares":{"nullable":true,"type":"number"},"version":{"type":"number"},"facts":{"type":"object","additionalProperties":{"type":"object","properties":{"factId":{"type":"string"},"value":{},"unit":{"nullable":true,"type":"string"},"basis":{"type":"string","enum":["farmer_reported","lab_test","district_proxy","derived","unknown"]},"confirmed":{"type":"boolean"},"source":{"nullable":true,"type":"string"},"recordedAt":{"type":"string"}},"required":["factId","value","unit","basis","confirmed","source","recordedAt"],"additionalProperties":false}},"factHistory":{"type":"array","items":{"type":"object","properties":{"factId":{"type":"string"},"value":{},"unit":{"nullable":true,"type":"string"},"basis":{"type":"string","enum":["farmer_reported","lab_test","district_proxy","derived","unknown"]},"confirmed":{"type":"boolean"},"source":{"nullable":true,"type":"string"},"recordedAt":{"type":"string"},"key":{"type":"string"},"superseded":{"type":"boolean"}},"required":["factId","value","unit","basis","confirmed","source","recordedAt","key","superseded"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["district_unresolved"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["id","name","location","areaHectares","version","facts","createdAt","updatedAt"],"additionalProperties":false}}},"required":["farms"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}":{"get":{"tags":["farms"],"description":"Owner-scoped farm; other owners' farms are 404 (no existence leak). history=true includes superseded facts.","parameters":[{"schema":{"default":"false","type":"string","enum":["true","false"]},"in":"query","name":"history","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"type":"object","properties":{"districtId":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"stateCode":{"nullable":true,"type":"string"},"lat":{"nullable":true,"type":"number"},"lon":{"nullable":true,"type":"number"},"precision":{"type":"string","enum":["district","approximate","precise"]}},"required":["districtId","districtName","stateCode","lat","lon","precision"],"additionalProperties":false},"areaHectares":{"nullable":true,"type":"number"},"version":{"type":"number"},"facts":{"type":"object","additionalProperties":{"type":"object","properties":{"factId":{"type":"string"},"value":{},"unit":{"nullable":true,"type":"string"},"basis":{"type":"string","enum":["farmer_reported","lab_test","district_proxy","derived","unknown"]},"confirmed":{"type":"boolean"},"source":{"nullable":true,"type":"string"},"recordedAt":{"type":"string"}},"required":["factId","value","unit","basis","confirmed","source","recordedAt"],"additionalProperties":false}},"factHistory":{"type":"array","items":{"type":"object","properties":{"factId":{"type":"string"},"value":{},"unit":{"nullable":true,"type":"string"},"basis":{"type":"string","enum":["farmer_reported","lab_test","district_proxy","derived","unknown"]},"confirmed":{"type":"boolean"},"source":{"nullable":true,"type":"string"},"recordedAt":{"type":"string"},"key":{"type":"string"},"superseded":{"type":"boolean"}},"required":["factId","value","unit","basis","confirmed","source","recordedAt","key","superseded"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["district_unresolved"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["id","name","location","areaHectares","version","facts","createdAt","updatedAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"patch":{"tags":["farms"],"description":"Updates a farm. Fact changes append superseding facts (history is kept). expectedVersion enables optimistic concurrency (409 version_conflict).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":120},"location":{"type":"object","properties":{"districtId":{"type":"string","minLength":1,"maxLength":64},"districtName":{"type":"string","minLength":1,"maxLength":120},"stateId":{"type":"string","minLength":1,"maxLength":16},"stateCode":{"type":"string","minLength":1,"maxLength":16},"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180},"precision":{"default":"district","type":"string","enum":["district","approximate","precise"]}}},"areaHectares":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000},"facts":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"}],"nullable":true},"unit":{"type":"string","maxLength":32},"basis":{"default":"unknown","type":"string","enum":["farmer_reported","lab_test","district_proxy","derived","unknown"]},"confirmed":{"default":false,"type":"boolean"},"source":{"type":"string","maxLength":200},"recordedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["value"]}}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"type":"object","properties":{"districtId":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"stateCode":{"nullable":true,"type":"string"},"lat":{"nullable":true,"type":"number"},"lon":{"nullable":true,"type":"number"},"precision":{"type":"string","enum":["district","approximate","precise"]}},"required":["districtId","districtName","stateCode","lat","lon","precision"],"additionalProperties":false},"areaHectares":{"nullable":true,"type":"number"},"version":{"type":"number"},"facts":{"type":"object","additionalProperties":{"type":"object","properties":{"factId":{"type":"string"},"value":{},"unit":{"nullable":true,"type":"string"},"basis":{"type":"string","enum":["farmer_reported","lab_test","district_proxy","derived","unknown"]},"confirmed":{"type":"boolean"},"source":{"nullable":true,"type":"string"},"recordedAt":{"type":"string"}},"required":["factId","value","unit","basis","confirmed","source","recordedAt"],"additionalProperties":false}},"factHistory":{"type":"array","items":{"type":"object","properties":{"factId":{"type":"string"},"value":{},"unit":{"nullable":true,"type":"string"},"basis":{"type":"string","enum":["farmer_reported","lab_test","district_proxy","derived","unknown"]},"confirmed":{"type":"boolean"},"source":{"nullable":true,"type":"string"},"recordedAt":{"type":"string"},"key":{"type":"string"},"superseded":{"type":"boolean"}},"required":["factId","value","unit","basis","confirmed","source","recordedAt","key","superseded"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["district_unresolved"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["id","name","location","areaHectares","version","facts","createdAt","updatedAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"delete":{"tags":["farms"],"description":"Permanently deletes the farm and all dependent data in one transaction: plans (immutability trigger bypassed for this procedure only), plan outputs, journal, actions, visual assets, facts and media rows. Private image files are removed after commit; a failed file removal is logged, reported in storageObjectsFailed and the file is unreachable through the API. Nothing is retained for recovery. Usage ledger rows (cost accounting, no farm data) are retained.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]},"mediaObjectsRemoved":{"type":"number"},"storageObjectsFailed":{"type":"number"}},"required":["deleted","mediaObjectsRemoved","storageObjectsFailed"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/commodities":{"get":{"tags":["catalogue"],"parameters":[{"schema":{"default":"","type":"string","maxLength":200},"in":"query","name":"query","required":false},{"schema":{"type":"string","maxLength":60},"in":"query","name":"grouping","required":false},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false},{"schema":{"default":100,"type":"integer","minimum":1,"maximum":300},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"snapshot":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"checkedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"complete":{"type":"boolean"},"commodityCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rowCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sourceUrl":{"type":"string","format":"uri"},"limitations":{"type":"array","items":{"type":"string"}}},"required":["id","checkedAt","complete","commodityCount","rowCount","sourceUrl","limitations"],"additionalProperties":false},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"commodityId":{"type":"string"},"sourceCommodity":{"type":"string"},"grouping":{"type":"string"},"identityStatus":{"type":"string"},"identityNote":{"nullable":true,"type":"string"},"botanicalName":{"nullable":true,"type":"string"},"profileId":{"nullable":true,"type":"string"},"profileStatus":{"type":"string","enum":["researched","pending","not_applicable"]},"profileUrl":{"nullable":true,"type":"string"},"cropId":{"nullable":true,"type":"string"},"productId":{"nullable":true,"type":"string"},"priceCoverage":{"type":"object","properties":{"validRows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"modalRows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dateRange":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"states":{"type":"array","items":{"type":"string"}},"marketCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unitStatus":{"type":"string","enum":["provider_unit_not_declared"]},"examples":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["validRows","modalRows","dateRange","states","marketCount","unitStatus","examples"],"additionalProperties":false}},"required":["commodityId","sourceCommodity","grouping","identityStatus","identityNote","botanicalName","profileId","profileStatus","profileUrl","cropId","productId","priceCoverage"],"additionalProperties":false}}},"required":["snapshot","total","offset","limit","items"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/commodity-profiles/{id}":{"get":{"tags":["catalogue"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"profileId":{"type":"string"},"botanicalName":{"nullable":true,"type":"string"},"sourceCommodities":{"type":"array","items":{"type":"string"}},"identityStatus":{"type":"string"},"ecocrop":{"nullable":true,"type":"object","properties":{"ecoportCode":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"},"evidenceType":{"type":"string","enum":["legacy_global_ecological_reference"]},"sourceScientificName":{"type":"string"},"parameters":{"type":"object","properties":{"temperatureC":{"type":"object","properties":{"optimalMin":{"nullable":true,"type":"number"},"optimalMax":{"nullable":true,"type":"number"},"absoluteMin":{"nullable":true,"type":"number"},"absoluteMax":{"nullable":true,"type":"number"}},"required":["optimalMin","optimalMax","absoluteMin","absoluteMax"],"additionalProperties":false},"annualRainfallMm":{"type":"object","properties":{"optimalMin":{"nullable":true,"type":"number"},"optimalMax":{"nullable":true,"type":"number"},"absoluteMin":{"nullable":true,"type":"number"},"absoluteMax":{"nullable":true,"type":"number"}},"required":["optimalMin","optimalMax","absoluteMin","absoluteMax"],"additionalProperties":false},"soilPh":{"type":"object","properties":{"optimalMin":{"nullable":true,"type":"number"},"optimalMax":{"nullable":true,"type":"number"},"absoluteMin":{"nullable":true,"type":"number"},"absoluteMax":{"nullable":true,"type":"number"}},"required":["optimalMin","optimalMax","absoluteMin","absoluteMax"],"additionalProperties":false},"soilTexture":{"type":"object","properties":{"optimal":{"nullable":true,"type":"string"},"absolute":{"nullable":true,"type":"string"}},"required":["optimal","absolute"],"additionalProperties":false},"soilDepth":{"type":"object","properties":{"optimal":{"nullable":true,"type":"string"},"absolute":{"nullable":true,"type":"string"}},"required":["optimal","absolute"],"additionalProperties":false},"soilSalinity":{"type":"object","properties":{"optimal":{"nullable":true,"type":"string"},"absolute":{"nullable":true,"type":"string"}},"required":["optimal","absolute"],"additionalProperties":false},"soilDrainage":{"type":"object","properties":{"optimal":{"nullable":true,"type":"string"},"absolute":{"nullable":true,"type":"string"}},"required":["optimal","absolute"],"additionalProperties":false},"light":{"type":"object","properties":{"optimalMin":{"nullable":true,"type":"string"},"optimalMax":{"nullable":true,"type":"string"},"absoluteMin":{"nullable":true,"type":"string"},"absoluteMax":{"nullable":true,"type":"string"}},"required":["optimalMin","optimalMax","absoluteMin","absoluteMax"],"additionalProperties":false},"photoperiod":{"nullable":true,"type":"string"},"cropCycleDays":{"type":"object","properties":{"min":{"nullable":true,"type":"number"},"max":{"nullable":true,"type":"number"}},"required":["min","max"],"additionalProperties":false}},"required":["temperatureC","annualRainfallMm","soilPh","soilTexture","soilDepth","soilSalinity","soilDrainage","light","photoperiod","cropCycleDays"],"additionalProperties":{}},"qualityFlags":{"type":"array","items":{"type":"string"}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["ecoportCode","sourceUrl","evidenceType","sourceScientificName","parameters","qualityFlags","limitations"],"additionalProperties":{}},"regionalEvidence":{"type":"array","items":{"type":"object","additionalProperties":{}}},"gaps":{"type":"array","items":{"type":"string"}}},"required":["profileId","botanicalName","sourceCommodities","identityStatus","ecocrop","regionalEvidence","gaps"],"additionalProperties":{}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/soil-type-references":{"get":{"tags":["catalogue"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"references":{"type":"array","items":{"type":"object","additionalProperties":{}}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["references","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/market-context":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/api/v1/farms/{id}/command-center":{"get":{"tags":["farms"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"asOf":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"workspace":{"type":"object","properties":{"boundary":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"previousHarvest":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["unknown"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["none"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["known"]},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["status","cropId","harvestDate"],"additionalProperties":false}]},"cycles":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"stage":{"type":"string","enum":["sowed","growing","flowering","harvested"]},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"rootPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"latestPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false}},"required":["id","cropId","sowingDate","stage"],"additionalProperties":false}},"rotationPlans":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"year":{"type":"integer","minimum":1900,"maximum":2200},"season":{"type":"string","minLength":1,"maxLength":80},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"plannedSowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"plannedHarvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"}},"required":["id","year","season","cropId"],"additionalProperties":false}},"fields":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"name":{"type":"string","minLength":1,"maxLength":80},"boundary":{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"notes":{"type":"string","maxLength":500},"checkIntervalDays":{"type":"integer","minimum":3,"maximum":30}},"required":["id","name","boundary"],"additionalProperties":false}},"checkIntervalDays":{"type":"integer","minimum":3,"maximum":30},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["boundary","previousHarvest","cycles","rotationPlans","fields","farmId","version","updatedAt"],"additionalProperties":false},"focusedCrops":{"type":"array","items":{"type":"object","properties":{"cropId":{"type":"string"},"displayName":{"type":"string"},"botanicalName":{"type":"string"},"productionType":{"type":"string","enum":["annual","long_duration","perennial"]},"establishmentMethods":{"type":"array","items":{"type":"string"}},"products":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"productName":{"type":"string"},"sourceCommodities":{"type":"array","items":{"type":"string"}},"mappingStatus":{"type":"string","enum":["verified","unavailable"]}},"required":["productId","productName","sourceCommodities","mappingStatus"],"additionalProperties":false}},"soilEffects":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string"},"direction":{"type":"string"},"text":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"sourceRefs":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"locator":{"type":"string"}},"required":["sourceId","locator"],"additionalProperties":false}},"quantifiedDelta":{"type":"string","nullable":true,"enum":[null]}},"required":["topic","direction","text","conditions","sourceRefs","quantifiedDelta"],"additionalProperties":false}},"endUses":{"type":"array","items":{"type":"object","properties":{"use":{"type":"string"},"sourceRefs":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"locator":{"type":"string"}},"required":["sourceId","locator"],"additionalProperties":false}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["use","sourceRefs","limitations"],"additionalProperties":false}},"sequenceConstraints":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"sourceRefs":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"locator":{"type":"string"}},"required":["sourceId","locator"],"additionalProperties":false}}},"required":["text","conditions","sourceRefs"],"additionalProperties":{}}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["cropId","displayName","botanicalName","productionType","establishmentMethods","products","limitations"],"additionalProperties":false}},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"publisher":{"type":"string"},"title":{"type":"string"},"retrievedAt":{"type":"string"},"geography":{}},"required":["id","url","publisher","title","retrievedAt","geography"],"additionalProperties":{}}},"currentCycles":{"type":"array","items":{"type":"object","properties":{"cycle":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"stage":{"type":"string","enum":["sowed","growing","flowering","harvested"]},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"rootPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"latestPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false}},"required":["id","cropId","sowingDate","stage"],"additionalProperties":false},"careTasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"cycleId":{"type":"string"},"cropId":{"type":"string"},"title":{"type":"string"},"action":{"type":"string"},"anchor":{"type":"string"},"geographyIds":{"type":"array","items":{"type":"string"}},"dueFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dueTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"conditions":{"type":"array","items":{"type":"string"}},"sourceRefs":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"locator":{"type":"string"}},"required":["sourceId","locator"],"additionalProperties":false}},"status":{"type":"string","enum":["upcoming","due","overdue","completed"]},"completedOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"evidenceState":{"type":"string","enum":["source_schedule"]}},"required":["id","actionId","cycleId","cropId","title","action","anchor","dueFrom","dueTo","conditions","sourceRefs","status","completedOn","journalEntryId","evidenceState"],"additionalProperties":false}},"referenceGuidance":{"type":"array","items":{"type":"object","properties":{"actionId":{"type":"string"},"title":{"type":"string"},"action":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"sourceRefs":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"locator":{"type":"string"}},"required":["sourceId","locator"],"additionalProperties":false}},"geographyIds":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"}},"required":["actionId","title","action","conditions","sourceRefs","geographyIds","reason"],"additionalProperties":false}},"stageGuidance":{"type":"array","items":{"type":"object","properties":{"actionId":{"type":"string"},"title":{"type":"string"},"action":{"type":"string"},"stage":{"nullable":true,"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"sourceRefs":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"locator":{"type":"string"}},"required":["sourceId","locator"],"additionalProperties":false}},"geographyIds":{"type":"array","items":{"type":"string"}},"applicability":{"type":"string","enum":["matched","outside_source_region","location_unknown"]},"requiresObservation":{"type":"boolean","enum":[true]}},"required":["actionId","title","action","stage","conditions","sourceRefs","requiresObservation"],"additionalProperties":false}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["cycle","careTasks","limitations"],"additionalProperties":false}},"soil":{"type":"object","properties":{"markers":{"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"samples":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reportId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceSampleId":{"type":"string"},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"confirmedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"markers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}},"canonical":{"type":"object","properties":{"value":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string","maxLength":300},"conversion":{"nullable":true,"type":"object","properties":{"formula":{"type":"string"},"version":{"type":"string","enum":["soil-unit-v1"]}},"required":["formula","version"],"additionalProperties":false},"missingReason":{"nullable":true,"type":"string","maxLength":300}},"required":["value","unit","conversion","missingReason"],"additionalProperties":false},"reviewStatus":{"type":"string","enum":["pending","confirmed"]},"confirmedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings","canonical","reviewStatus","confirmedAt"],"additionalProperties":false}}},"required":["id","reportId","sourceSampleId","sampleLabel","laboratory","collectionDate","reportDate","depth","confirmedAt","markers"],"additionalProperties":false}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["farmId","samples","limitations"],"additionalProperties":false},"fit":{"type":"array","items":{"type":"object","properties":{"cropId":{"type":"string"},"status":{"type":"string","enum":["needs_soil_report","insufficient_compatible_measurements","within_published_ph_range","outside_published_ph_range"]},"summary":{"type":"string"},"checks":{"type":"array","items":{"type":"object","properties":{"parameter":{"type":"string"},"sampleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reportId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"measuredValue":{"type":"number"},"unit":{"type":"string"},"method":{"nullable":true,"type":"string"},"sourceRange":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}},"required":["min","max"],"additionalProperties":false},"result":{"type":"string","enum":["within","outside"]},"sourceRefs":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"locator":{"type":"string"}},"required":["sourceId","locator"],"additionalProperties":false}},"conditions":{"type":"array","items":{"type":"string"}}},"required":["parameter","sampleId","reportId","collectionDate","measuredValue","unit","method","sourceRange","result","sourceRefs","conditions"],"additionalProperties":false}},"requirements":{"type":"array","items":{"type":"object","properties":{"parameter":{"type":"string"},"value":{},"unit":{"nullable":true,"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"sourceRefs":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"locator":{"type":"string"}},"required":["sourceId","locator"],"additionalProperties":false}}},"required":["parameter","value","unit","conditions","sourceRefs"],"additionalProperties":false}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["cropId","status","summary","checks","requirements","limitations"],"additionalProperties":false}}},"required":["markers","fit"],"additionalProperties":false},"weather":{"type":"object","properties":{"kind":{"type":"string","enum":["forecast"]},"status":{"type":"string","enum":["fresh","stale","unavailable"]},"reason":{"nullable":true,"type":"string"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"source":{"type":"string"},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"rainMm":{"nullable":true,"type":"number"},"tMinC":{"nullable":true,"type":"number"},"tMaxC":{"nullable":true,"type":"number"},"et0Mm":{"nullable":true,"type":"number"},"gustMaxKmh":{"nullable":true,"type":"number"},"rhMeanPct":{"nullable":true,"type":"number"},"soilMoisture0to7":{"nullable":true,"type":"number"}},"required":["date","rainMm","tMinC","tMaxC","et0Mm"],"additionalProperties":false}}},"required":["kind","status","reason","issuedAt","source","days"],"additionalProperties":false},"currentQuotes":{"type":"object","properties":{"checkedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"selectionBasis":{"type":"string","enum":["tracked_products","recommendation_watchlist","requested_products","none"]},"providerStatus":{"type":"string"},"missingReason":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["available","partial","unavailable"]},"requestLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"requestsMade":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"products":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"status":{"type":"string","enum":["available","stale","unavailable"]},"missingReason":{"nullable":true,"type":"string"},"providerStatus":{"type":"string"},"scope":{"type":"string","enum":["district","state","national","unavailable"]},"fallbackReason":{"nullable":true,"type":"string"},"quotes":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"commodity":{"type":"string"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"marketId":{"type":"string"},"marketName":{"type":"string"},"state":{"nullable":true,"type":"string"},"district":{"nullable":true,"type":"string"},"variety":{"nullable":true,"type":"string"},"grade":{"nullable":true,"type":"string"},"min":{"nullable":true,"type":"string"},"modal":{"nullable":true,"type":"string"},"max":{"nullable":true,"type":"string"},"unit":{"type":"string","enum":["INR/quintal"]},"unitBasis":{"type":"string","enum":["provider_declared","agmarknet_convention"]},"modalInrPerKg":{"nullable":true,"type":"string"},"evidenceState":{"type":"string","enum":["observed"]},"source":{"type":"string","format":"uri"},"fetchedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"stale":{"type":"boolean"},"flags":{"type":"array","items":{"type":"string"}}},"required":["productId","commodity","date","marketId","marketName","state","district","variety","grade","min","modal","max","unit","unitBasis","modalInrPerKg","evidenceState","source","fetchedAt","stale","flags"],"additionalProperties":false}}},"required":["productId","status","missingReason","providerStatus","scope","fallbackReason","quotes"],"additionalProperties":false}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["checkedAt","selectionBasis","providerStatus","missingReason","status","requestLimit","requestsMade","products","limitations"],"additionalProperties":false},"priorYearMarkets":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"period":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"basis":{"type":"string","enum":["same_calendar_period_previous_year"]},"targetDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"targetBasis":{"type":"string","enum":["harvest_scenario","planned_harvest","as_of_date"]},"status":{"type":"string","enum":["available","unavailable"]},"missingReason":{"nullable":true,"type":"string"},"scope":{"type":"string","enum":["district","state","national","unavailable"]},"observations":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"commodity":{"type":"string"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"marketId":{"type":"string"},"marketName":{"type":"string"},"state":{"nullable":true,"type":"string"},"district":{"nullable":true,"type":"string"},"variety":{"nullable":true,"type":"string"},"grade":{"nullable":true,"type":"string"},"min":{"nullable":true,"type":"string"},"modal":{"nullable":true,"type":"string"},"max":{"nullable":true,"type":"string"},"unit":{"type":"string","enum":["INR/quintal"]},"unitBasis":{"type":"string","enum":["provider_declared","agmarknet_convention"]},"modalInrPerKg":{"nullable":true,"type":"string"},"evidenceState":{"type":"string","enum":["observed"]},"source":{"type":"string","format":"uri"},"fetchedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"stale":{"type":"boolean"},"flags":{"type":"array","items":{"type":"string"}}},"required":["productId","commodity","date","marketId","marketName","state","district","variety","grade","min","modal","max","unit","unitBasis","modalInrPerKg","evidenceState","source","fetchedAt","stale","flags"],"additionalProperties":false}},"coverageDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limitations":{"type":"array","items":{"type":"string"}}},"required":["productId","period","basis","status","missingReason","scope","observations","coverageDays","limitations"],"additionalProperties":false}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["farmId","asOf","workspace","focusedCrops","sources","currentCycles","soil","weather","currentQuotes","priorYearMarkets","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/cycles":{"post":{"tags":["farms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientEntryId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"establishmentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"expectedWorkspaceVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"notes":{"type":"string","maxLength":2000},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"companion":{"type":"object","properties":{"cropId":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId"],"additionalProperties":false}},"required":["clientEntryId","cropId","establishmentMethod","establishmentDate","expectedWorkspaceVersion"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"cycle":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"stage":{"type":"string","enum":["sowed","growing","flowering","harvested"]},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"rootPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"latestPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false}},"required":["id","cropId","sowingDate","stage"],"additionalProperties":false},"workspace":{"type":"object","properties":{"boundary":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"previousHarvest":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["unknown"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["none"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["known"]},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["status","cropId","harvestDate"],"additionalProperties":false}]},"cycles":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"stage":{"type":"string","enum":["sowed","growing","flowering","harvested"]},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"rootPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"latestPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false}},"required":["id","cropId","sowingDate","stage"],"additionalProperties":false}},"rotationPlans":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"year":{"type":"integer","minimum":1900,"maximum":2200},"season":{"type":"string","minLength":1,"maxLength":80},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"plannedSowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"plannedHarvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"}},"required":["id","year","season","cropId"],"additionalProperties":false}},"fields":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"name":{"type":"string","minLength":1,"maxLength":80},"boundary":{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"notes":{"type":"string","maxLength":500},"checkIntervalDays":{"type":"integer","minimum":3,"maximum":30}},"required":["id","name","boundary"],"additionalProperties":false}},"checkIntervalDays":{"type":"integer","minimum":3,"maximum":30},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["boundary","previousHarvest","cycles","rotationPlans","fields","farmId","version","updatedAt"],"additionalProperties":false},"journalEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"alreadyRecorded":{"type":"boolean"}},"required":["cycle","workspace","journalEntryId","alreadyRecorded"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/cycles/{cycleId}/care/{taskId}/complete":{"post":{"tags":["farms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientEntryId":{"type":"string","minLength":1,"maxLength":120},"completedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"note":{"type":"string","maxLength":2000}},"required":["clientEntryId","completedOn"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"cycleId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"taskId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"journalEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"completedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"alreadyCompleted":{"type":"boolean"}},"required":["journalEntryId","completedOn","alreadyCompleted"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/summary":{"get":{"tags":["farms"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scope":{"type":"string","enum":["farm"]},"status":{"type":"string","enum":["ready","pending","unavailable"]},"origin":{"type":"string","enum":["model","deterministic"]},"headline":{"type":"string","maxLength":160},"points":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["do_now","watch","money","later","good_news"]},"text":{"type":"string","maxLength":240},"factIds":{"maxItems":6,"type":"array","items":{"type":"string","maxLength":40}},"ref":{"nullable":true,"type":"object","properties":{"kind":{"type":"string","enum":["step","alert","card"]},"id":{"type":"string","maxLength":160}},"required":["kind","id"],"additionalProperties":false}},"required":["kind","text","factIds","ref"],"additionalProperties":false}},"facts":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"text":{"type":"string","maxLength":240},"ref":{"nullable":true,"type":"object","properties":{"kind":{"type":"string","enum":["step","alert","card"]},"id":{"type":"string","maxLength":160}},"required":["kind","id"],"additionalProperties":false}},"required":["id","text","ref"],"additionalProperties":false}},"asOf":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"generatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"canGenerate":{"type":"boolean"},"retryAfter":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["farmId","scope","status","origin","headline","points","facts","asOf","generatedAt","canGenerate","retryAfter"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"post":{"tags":["farms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"nullable":true,"type":"object","properties":{},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scope":{"type":"string","enum":["farm"]},"status":{"type":"string","enum":["ready","pending","unavailable"]},"origin":{"type":"string","enum":["model","deterministic"]},"headline":{"type":"string","maxLength":160},"points":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["do_now","watch","money","later","good_news"]},"text":{"type":"string","maxLength":240},"factIds":{"maxItems":6,"type":"array","items":{"type":"string","maxLength":40}},"ref":{"nullable":true,"type":"object","properties":{"kind":{"type":"string","enum":["step","alert","card"]},"id":{"type":"string","maxLength":160}},"required":["kind","id"],"additionalProperties":false}},"required":["kind","text","factIds","ref"],"additionalProperties":false}},"facts":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"text":{"type":"string","maxLength":240},"ref":{"nullable":true,"type":"object","properties":{"kind":{"type":"string","enum":["step","alert","card"]},"id":{"type":"string","maxLength":160}},"required":["kind","id"],"additionalProperties":false}},"required":["id","text","ref"],"additionalProperties":false}},"asOf":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"generatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"canGenerate":{"type":"boolean"},"retryAfter":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["farmId","scope","status","origin","headline","points","facts","asOf","generatedAt","canGenerate","retryAfter"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/soil-reports":{"post":{"tags":["soil"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["field_report","reference_sample"]},"status":{"type":"string","enum":["pending","running","needs_review","confirmed","unavailable","error"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"filename":{"type":"string"},"contentType":{"type":"string"},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"jobId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false},"originalUrl":{"type":"string"},"referenceSource":{"nullable":true,"type":"object","properties":{"title":{"type":"string"},"url":{"nullable":true,"type":"string","format":"uri"},"pages":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"limitations":{"type":"array","items":{"type":"string"}},"extractionScope":{"type":"object","properties":{"sampleLabel":{"type":"string"},"description":{"type":"string"},"markerLimit":{"type":"integer","minimum":1,"maximum":100}},"required":["sampleLabel","description","markerLimit"],"additionalProperties":false}},"required":["title","url","pages","limitations"],"additionalProperties":false},"pages":{"type":"array","items":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"imageUrl":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nativeTextAvailable":{"type":"boolean"}},"required":["page","imageUrl","width","height","nativeTextAvailable"],"additionalProperties":false}},"extraction":{"nullable":true,"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false},"reviewed":{"nullable":true,"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false},"confirmedSampleIds":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","farmId","kind","status","version","filename","contentType","bytes","sha256","createdAt","jobId","modelInvocation","originalUrl","referenceSource","pages","extraction","reviewed","confirmedSampleIds","warnings"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"get":{"tags":["soil"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"reports":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["field_report","reference_sample"]},"status":{"type":"string","enum":["pending","running","needs_review","confirmed","unavailable","error"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"filename":{"type":"string"},"contentType":{"type":"string"},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"jobId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false},"originalUrl":{"type":"string"},"referenceSource":{"nullable":true,"type":"object","properties":{"title":{"type":"string"},"url":{"nullable":true,"type":"string","format":"uri"},"pages":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"limitations":{"type":"array","items":{"type":"string"}},"extractionScope":{"type":"object","properties":{"sampleLabel":{"type":"string"},"description":{"type":"string"},"markerLimit":{"type":"integer","minimum":1,"maximum":100}},"required":["sampleLabel","description","markerLimit"],"additionalProperties":false}},"required":["title","url","pages","limitations"],"additionalProperties":false},"pages":{"type":"array","items":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"imageUrl":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nativeTextAvailable":{"type":"boolean"}},"required":["page","imageUrl","width","height","nativeTextAvailable"],"additionalProperties":false}},"extraction":{"nullable":true,"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false},"reviewed":{"nullable":true,"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false},"confirmedSampleIds":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","farmId","kind","status","version","filename","contentType","bytes","sha256","createdAt","jobId","modelInvocation","originalUrl","referenceSource","pages","extraction","reviewed","confirmedSampleIds","warnings"],"additionalProperties":false}}},"required":["reports"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/soil-reports/sample":{"post":{"tags":["soil"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["field_report","reference_sample"]},"status":{"type":"string","enum":["pending","running","needs_review","confirmed","unavailable","error"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"filename":{"type":"string"},"contentType":{"type":"string"},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"jobId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false},"originalUrl":{"type":"string"},"referenceSource":{"nullable":true,"type":"object","properties":{"title":{"type":"string"},"url":{"nullable":true,"type":"string","format":"uri"},"pages":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"limitations":{"type":"array","items":{"type":"string"}},"extractionScope":{"type":"object","properties":{"sampleLabel":{"type":"string"},"description":{"type":"string"},"markerLimit":{"type":"integer","minimum":1,"maximum":100}},"required":["sampleLabel","description","markerLimit"],"additionalProperties":false}},"required":["title","url","pages","limitations"],"additionalProperties":false},"pages":{"type":"array","items":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"imageUrl":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nativeTextAvailable":{"type":"boolean"}},"required":["page","imageUrl","width","height","nativeTextAvailable"],"additionalProperties":false}},"extraction":{"nullable":true,"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false},"reviewed":{"nullable":true,"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false},"confirmedSampleIds":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","farmId","kind","status","version","filename","contentType","bytes","sha256","createdAt","jobId","modelInvocation","originalUrl","referenceSource","pages","extraction","reviewed","confirmedSampleIds","warnings"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/soil-reports/{id}":{"get":{"tags":["soil"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["field_report","reference_sample"]},"status":{"type":"string","enum":["pending","running","needs_review","confirmed","unavailable","error"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"filename":{"type":"string"},"contentType":{"type":"string"},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"jobId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false},"originalUrl":{"type":"string"},"referenceSource":{"nullable":true,"type":"object","properties":{"title":{"type":"string"},"url":{"nullable":true,"type":"string","format":"uri"},"pages":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"limitations":{"type":"array","items":{"type":"string"}},"extractionScope":{"type":"object","properties":{"sampleLabel":{"type":"string"},"description":{"type":"string"},"markerLimit":{"type":"integer","minimum":1,"maximum":100}},"required":["sampleLabel","description","markerLimit"],"additionalProperties":false}},"required":["title","url","pages","limitations"],"additionalProperties":false},"pages":{"type":"array","items":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"imageUrl":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nativeTextAvailable":{"type":"boolean"}},"required":["page","imageUrl","width","height","nativeTextAvailable"],"additionalProperties":false}},"extraction":{"nullable":true,"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false},"reviewed":{"nullable":true,"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false},"confirmedSampleIds":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","farmId","kind","status","version","filename","contentType","bytes","sha256","createdAt","jobId","modelInvocation","originalUrl","referenceSource","pages","extraction","reviewed","confirmedSampleIds","warnings"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"patch":{"tags":["soil"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draft":{"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false}},"required":["expectedVersion","draft"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["field_report","reference_sample"]},"status":{"type":"string","enum":["pending","running","needs_review","confirmed","unavailable","error"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"filename":{"type":"string"},"contentType":{"type":"string"},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"jobId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false},"originalUrl":{"type":"string"},"referenceSource":{"nullable":true,"type":"object","properties":{"title":{"type":"string"},"url":{"nullable":true,"type":"string","format":"uri"},"pages":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"limitations":{"type":"array","items":{"type":"string"}},"extractionScope":{"type":"object","properties":{"sampleLabel":{"type":"string"},"description":{"type":"string"},"markerLimit":{"type":"integer","minimum":1,"maximum":100}},"required":["sampleLabel","description","markerLimit"],"additionalProperties":false}},"required":["title","url","pages","limitations"],"additionalProperties":false},"pages":{"type":"array","items":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"imageUrl":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nativeTextAvailable":{"type":"boolean"}},"required":["page","imageUrl","width","height","nativeTextAvailable"],"additionalProperties":false}},"extraction":{"nullable":true,"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false},"reviewed":{"nullable":true,"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false},"confirmedSampleIds":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","farmId","kind","status","version","filename","contentType","bytes","sha256","createdAt","jobId","modelInvocation","originalUrl","referenceSource","pages","extraction","reviewed","confirmedSampleIds","warnings"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/soil-reports/{id}/confirm":{"post":{"tags":["soil"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sampleIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string"}},"markerIds":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string"}}},"required":["expectedVersion","sampleIds","markerIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["field_report","reference_sample"]},"status":{"type":"string","enum":["pending","running","needs_review","confirmed","unavailable","error"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"filename":{"type":"string"},"contentType":{"type":"string"},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"jobId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false},"originalUrl":{"type":"string"},"referenceSource":{"nullable":true,"type":"object","properties":{"title":{"type":"string"},"url":{"nullable":true,"type":"string","format":"uri"},"pages":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"limitations":{"type":"array","items":{"type":"string"}},"extractionScope":{"type":"object","properties":{"sampleLabel":{"type":"string"},"description":{"type":"string"},"markerLimit":{"type":"integer","minimum":1,"maximum":100}},"required":["sampleLabel","description","markerLimit"],"additionalProperties":false}},"required":["title","url","pages","limitations"],"additionalProperties":false},"pages":{"type":"array","items":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"imageUrl":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nativeTextAvailable":{"type":"boolean"}},"required":["page","imageUrl","width","height","nativeTextAvailable"],"additionalProperties":false}},"extraction":{"nullable":true,"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false},"reviewed":{"nullable":true,"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false},"confirmedSampleIds":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","farmId","kind","status","version","filename","contentType","bytes","sha256","createdAt","jobId","modelInvocation","originalUrl","referenceSource","pages","extraction","reviewed","confirmedSampleIds","warnings"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/soil-reports/{id}/retry":{"post":{"tags":["soil"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["expectedVersion"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["field_report","reference_sample"]},"status":{"type":"string","enum":["pending","running","needs_review","confirmed","unavailable","error"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"filename":{"type":"string"},"contentType":{"type":"string"},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"jobId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false},"originalUrl":{"type":"string"},"referenceSource":{"nullable":true,"type":"object","properties":{"title":{"type":"string"},"url":{"nullable":true,"type":"string","format":"uri"},"pages":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"limitations":{"type":"array","items":{"type":"string"}},"extractionScope":{"type":"object","properties":{"sampleLabel":{"type":"string"},"description":{"type":"string"},"markerLimit":{"type":"integer","minimum":1,"maximum":100}},"required":["sampleLabel","description","markerLimit"],"additionalProperties":false}},"required":["title","url","pages","limitations"],"additionalProperties":false},"pages":{"type":"array","items":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"imageUrl":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nativeTextAvailable":{"type":"boolean"}},"required":["page","imageUrl","width","height","nativeTextAvailable"],"additionalProperties":false}},"extraction":{"nullable":true,"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false},"reviewed":{"nullable":true,"type":"object","properties":{"title":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"samples":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"markers":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings"],"additionalProperties":false}}},"required":["id","sampleLabel","laboratory","collectionDate","reportDate","depth","markers"],"additionalProperties":false}},"warnings":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["title","laboratory","reportDate","samples","warnings"],"additionalProperties":false},"confirmedSampleIds":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","farmId","kind","status","version","filename","contentType","bytes","sha256","createdAt","jobId","modelInvocation","originalUrl","referenceSource","pages","extraction","reviewed","confirmedSampleIds","warnings"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/soil-markers":{"get":{"tags":["soil"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"samples":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reportId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceSampleId":{"type":"string"},"sampleLabel":{"nullable":true,"type":"string","maxLength":300},"laboratory":{"nullable":true,"type":"string","maxLength":300},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"receivedDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reportDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"depth":{"nullable":true,"type":"object","properties":{"from":{"type":"number","minimum":0},"to":{"type":"number","minimum":0},"unit":{"type":"string","enum":["cm","m","inch"]}},"required":["from","to","unit"],"additionalProperties":false},"confirmedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"markers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"parameter":{"type":"string","enum":["ph","electrical_conductivity","organic_carbon","organic_matter","nitrogen_available","nitrogen_total","nitrogen_unspecified","nitrate_n","ammonium_n","phosphorus_available","phosphorus_total","potassium_available","potassium_total","sulphur_available","zinc_available","boron_available","iron_available","manganese_available","copper_available","calcium_exchangeable","magnesium_exchangeable","sodium_exchangeable","cec","texture","sand","silt","clay","bulk_density","moisture_gravimetric","moisture_volumetric","field_capacity","wilting_point","base_saturation","esp","sar","unknown_other"]},"rawLabel":{"type":"string","minLength":1,"maxLength":300},"rawValue":{"type":"string","minLength":1,"maxLength":300},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"numericValue":{"nullable":true,"type":"number"},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","below_detection","unreadable","text"]},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"analyteForm":{"nullable":true,"type":"string","maxLength":300},"method":{"nullable":true,"type":"string","maxLength":300},"extractant":{"nullable":true,"type":"string","maxLength":300},"soilWaterRatio":{"nullable":true,"type":"string","maxLength":300},"temperatureC":{"nullable":true,"type":"number"},"matrix":{"type":"string","enum":["soil","water","plant","unknown"]},"massBasis":{"nullable":true,"type":"string","maxLength":300},"reportedRating":{"nullable":true,"type":"string","maxLength":300},"reportedReference":{"nullable":true,"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":300},"rawText":{"type":"string","minLength":1,"maxLength":1000},"rawUnit":{"nullable":true,"type":"string","maxLength":300},"qualifier":{"type":"string","enum":["exact","less_than","less_or_equal","greater_than","greater_or_equal","range","text"]},"numericValue":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"},"lowInclusive":{"nullable":true,"type":"boolean"},"highInclusive":{"nullable":true,"type":"boolean"}},"required":["low","high","lowInclusive","highInclusive"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false}},"required":["label","rawText","rawUnit","qualifier","numericValue","range","evidence"],"additionalProperties":false},"evidence":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":8},"quote":{"type":"string","maxLength":1500},"nativeTextCheck":{"type":"string","enum":["matched","not_matched","image_review_required"]}},"required":["page","quote","nativeTextCheck"],"additionalProperties":false},"extractionConfidence":{"type":"string","enum":["high","medium","low","unreadable"]},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}},"canonical":{"type":"object","properties":{"value":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string","maxLength":300},"conversion":{"nullable":true,"type":"object","properties":{"formula":{"type":"string"},"version":{"type":"string","enum":["soil-unit-v1"]}},"required":["formula","version"],"additionalProperties":false},"missingReason":{"nullable":true,"type":"string","maxLength":300}},"required":["value","unit","conversion","missingReason"],"additionalProperties":false},"reviewStatus":{"type":"string","enum":["pending","confirmed"]},"confirmedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","parameter","rawLabel","rawValue","rawUnit","numericValue","qualifier","range","analyteForm","method","extractant","soilWaterRatio","temperatureC","matrix","massBasis","reportedRating","evidence","extractionConfidence","warnings","canonical","reviewStatus","confirmedAt"],"additionalProperties":false}}},"required":["id","reportId","sourceSampleId","sampleLabel","laboratory","collectionDate","reportDate","depth","confirmedAt","markers"],"additionalProperties":false}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["farmId","samples","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/soil-reports/{id}/original":{"get":{"tags":["soil"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api/v1/soil-reports/{id}/pages/{page}":{"get":{"tags":["soil"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"integer","minimum":1,"maximum":8},"in":"path","name":"page","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api/v1/farms/{id}/year-plan":{"get":{"tags":["farms"],"description":"Round 3: `from` (YYYY-MM-DD) selects a later 12-month plan year; it must be the start of the current year (navigation.from of year 0) or of years 1 to 3 (navigation.nextFrom chain), else 400 validation_error naming the allowed dates. Without `from`: the current horizon. 2026-11-03 (FIELDS_MULTICROP_SOIL_SPEC.md 12.2): on a farm with fields every year-plan call names the field (`?fieldId=` on GET and POST, `fieldId` in the rescore and apply bodies); without it 400 field_required, an unknown field 404 field_not_found. Each field has its own review, horizon chain and area; apply writes saved seasons with that fieldId and keeps the other fields' seasons. A farm without fields is unchanged.","parameters":[{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"reviewId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jobId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextHash":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["pending","running","partial","ready","unavailable","error"]},"stale":{"type":"boolean"},"inputVersions":{"type":"object","properties":{"farm":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"workspace":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["farm","workspace"],"additionalProperties":false},"generatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"retryAfter":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false},"scenario":{"type":"object","properties":{"kind":{"type":"string","enum":["occupied","fresh","future"]},"horizon":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"yearIndex":{"type":"integer","minimum":0,"maximum":3},"currentCycleId":{"nullable":true,"type":"string"},"previousCropId":{"nullable":true,"type":"string"},"assumedPredecessor":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"basis":{"type":"string","enum":["current_cycle","saved_season","previous_harvest","year_plan_option"]},"optionLabel":{"nullable":true,"type":"string","maxLength":60},"horizonFrom":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["cropId","cropName","basis","optionLabel","horizonFrom"],"additionalProperties":false},"fieldAreaHa":{"nullable":true,"type":"number"},"irrigationCategory":{"nullable":true,"type":"string","maxLength":80},"stateId":{"nullable":true,"type":"string"},"districtId":{"nullable":true,"type":"string"},"soilSummary":{"nullable":true,"type":"string","maxLength":1000},"neighbourhoodActiveMonths":{"nullable":true,"type":"array","items":{"type":"integer","minimum":1,"maximum":12}},"occupied":{"maxItems":24,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":160},"source":{"type":"string","enum":["saved_season","recorded_cycle","assumed_plan"]},"cropId":{"type":"string","maxLength":120},"productId":{"nullable":true,"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"nullable":true,"type":"string","maxLength":120},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"nullable":true,"type":"object","properties":{"systemId":{"nullable":true,"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"rowRatio":{"type":"string","maxLength":20}},"required":["systemId","cropId","cropName","rowRatio"],"additionalProperties":false},"establishmentMethod":{"nullable":true,"type":"string","maxLength":80},"sowing":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvestDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"occupancy":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"occupancyBasis":{"type":"string","enum":["recorded","planned","sourced_duration","assumed_duration"]},"note":{"nullable":true,"type":"string","maxLength":1000},"realisation":{"type":"string","enum":["planned","overdue","sown"]}},"required":["id","source","cropId","productId","cropName","productName","kind","companion","establishmentMethod","sowing","harvestDate","occupancy","occupancyBasis","note"],"additionalProperties":false}}},"required":["kind","horizon","currentCycleId","previousCropId","fieldAreaHa","irrigationCategory","stateId","districtId","soilSummary","neighbourhoodActiveMonths"],"additionalProperties":false},"weights":{"type":"object","properties":{"price":{"type":"number","enum":[40]},"yield":{"type":"number","enum":[30]},"soilRotation":{"type":"number","enum":[15]},"water":{"type":"number","enum":[10]},"confidence":{"type":"number","enum":[5]}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"options":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string","maxLength":120},"label":{"type":"string","maxLength":60},"secondaryLabels":{"maxItems":3,"type":"array","items":{"type":"string","maxLength":60}},"origin":{"type":"string","enum":["model","deterministic","farmer_edit"]},"score":{"type":"number","minimum":0,"maximum":100},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"slots":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"slotId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"establishmentMethod":{"nullable":true,"type":"string","maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"nullable":true,"type":"object","properties":{"systemId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"rowRatio":{"type":"string","maxLength":20},"arrangement":{"nullable":true,"type":"string","enum":["row","paired_row","strip","mixed"]},"yieldShare":{"type":"object","properties":{"main":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"companion":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["main","companion"],"additionalProperties":false},"shareBasis":{"type":"string","enum":["sourced","assumed"]},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"costPerHa":{"nullable":true,"type":"number"},"source":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"locator":{"nullable":true,"type":"string","maxLength":200}},"required":["id","title","url","locator"],"additionalProperties":false}},"required":["systemId","cropId","productId","cropName","productName","rowRatio","arrangement","yieldShare","shareBasis","yieldKgPerHa","yieldBasis","price","nitrogenCreditKgPerHa","source"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"fixed":{"type":"boolean"},"sowing":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvest":{"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"occupancy":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"durationDays":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"yieldForFieldKg":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"cost":{"nullable":true,"type":"object","properties":{"a2flPerHa":{"nullable":true,"type":"number"},"c2PerHa":{"nullable":true,"type":"number"},"reportedPerHa":{"nullable":true,"type":"number","minimum":0},"authority":{"nullable":true,"type":"string","enum":["cacp","des","sau","other"]},"year":{"nullable":true,"type":"string","maxLength":20},"region":{"nullable":true,"type":"string","maxLength":40}},"required":["a2flPerHa","c2PerHa","authority","year","region"],"additionalProperties":false},"revenuePerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"profitPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"revenueEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"score":{"type":"number","minimum":0,"maximum":100},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"confidence":{"type":"string","enum":["high","medium","low"]},"transitionNote":{"nullable":true,"type":"string","maxLength":1000},"reasonCodes":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":60}},"uncertainties":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"basis":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}}},"required":["slotId","cropId","productId","cropName","productName","establishmentMethod","fixed","sowing","harvest","occupancy","durationDays","yieldKgPerHa","yieldBasis","price","cost","revenuePerHa","profitPerHa","score","components","confidence","transitionNote","reasonCodes","uncertainties","basis"],"additionalProperties":false}},"idleMonths":{"type":"number","minimum":0,"maximum":12},"idlePenaltyPoints":{"type":"number","minimum":0,"maximum":100},"reasons":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":60},"text":{"type":"string","maxLength":160}},"required":["code","text"],"additionalProperties":false}},"totalRevenuePerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"totalProfitPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"totalRevenueEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"totalProfitEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"totalProfitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"fieldAreaHa":{"nullable":true,"type":"number"},"gaps":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"days":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","maxLength":300}},"required":["from","to","days","reason"],"additionalProperties":false}},"warnings":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"editable":{"type":"boolean"}},"required":["optionId","label","origin","score","components","slots","idleMonths","reasons","totalRevenuePerHa","totalProfitPerHa","warnings","editable"],"additionalProperties":false}},"navigation":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"previousFrom":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"nextFrom":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"yearIndex":{"type":"integer","minimum":0,"maximum":3},"maxYearIndex":{"type":"integer","minimum":0,"maximum":3}},"required":["from","previousFrom","nextFrom","yearIndex","maxYearIndex"],"additionalProperties":false},"modelSelection":{"nullable":true,"type":"object","properties":{"outcome":{"type":"string","enum":["model","not_needed","not_configured","not_used","cancelled","failed"]},"detail":{"nullable":true,"type":"string","maxLength":200}},"required":["outcome","detail"],"additionalProperties":false},"noFreeWindow":{"type":"boolean"},"alternatives":{"nullable":true,"type":"object","properties":{"basis":{"type":"string","enum":["replace_planned","sown_comparison"]},"summary":{"type":"string","maxLength":1000},"replaces":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"rotationPlanId":{"type":"string","maxLength":160},"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"plannedSowingDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["rotationPlanId","cropId","cropName","plannedSowingDate"],"additionalProperties":false}},"horizon":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"options":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string","maxLength":120},"label":{"type":"string","maxLength":60},"secondaryLabels":{"maxItems":3,"type":"array","items":{"type":"string","maxLength":60}},"origin":{"type":"string","enum":["model","deterministic","farmer_edit"]},"score":{"type":"number","minimum":0,"maximum":100},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"slots":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"slotId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"establishmentMethod":{"nullable":true,"type":"string","maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"nullable":true,"type":"object","properties":{"systemId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"rowRatio":{"type":"string","maxLength":20},"arrangement":{"nullable":true,"type":"string","enum":["row","paired_row","strip","mixed"]},"yieldShare":{"type":"object","properties":{"main":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"companion":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["main","companion"],"additionalProperties":false},"shareBasis":{"type":"string","enum":["sourced","assumed"]},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"costPerHa":{"nullable":true,"type":"number"},"source":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"locator":{"nullable":true,"type":"string","maxLength":200}},"required":["id","title","url","locator"],"additionalProperties":false}},"required":["systemId","cropId","productId","cropName","productName","rowRatio","arrangement","yieldShare","shareBasis","yieldKgPerHa","yieldBasis","price","nitrogenCreditKgPerHa","source"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"fixed":{"type":"boolean"},"sowing":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvest":{"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"occupancy":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"durationDays":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"yieldForFieldKg":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"cost":{"nullable":true,"type":"object","properties":{"a2flPerHa":{"nullable":true,"type":"number"},"c2PerHa":{"nullable":true,"type":"number"},"reportedPerHa":{"nullable":true,"type":"number","minimum":0},"authority":{"nullable":true,"type":"string","enum":["cacp","des","sau","other"]},"year":{"nullable":true,"type":"string","maxLength":20},"region":{"nullable":true,"type":"string","maxLength":40}},"required":["a2flPerHa","c2PerHa","authority","year","region"],"additionalProperties":false},"revenuePerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"profitPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"revenueEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"score":{"type":"number","minimum":0,"maximum":100},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"confidence":{"type":"string","enum":["high","medium","low"]},"transitionNote":{"nullable":true,"type":"string","maxLength":1000},"reasonCodes":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":60}},"uncertainties":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"basis":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}}},"required":["slotId","cropId","productId","cropName","productName","establishmentMethod","fixed","sowing","harvest","occupancy","durationDays","yieldKgPerHa","yieldBasis","price","cost","revenuePerHa","profitPerHa","score","components","confidence","transitionNote","reasonCodes","uncertainties","basis"],"additionalProperties":false}},"idleMonths":{"type":"number","minimum":0,"maximum":12},"idlePenaltyPoints":{"type":"number","minimum":0,"maximum":100},"reasons":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":60},"text":{"type":"string","maxLength":160}},"required":["code","text"],"additionalProperties":false}},"totalRevenuePerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"totalProfitPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"totalRevenueEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"totalProfitEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"totalProfitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"fieldAreaHa":{"nullable":true,"type":"number"},"gaps":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"days":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","maxLength":300}},"required":["from","to","days","reason"],"additionalProperties":false}},"warnings":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"editable":{"type":"boolean"}},"required":["optionId","label","origin","score","components","slots","idleMonths","reasons","totalRevenuePerHa","totalProfitPerHa","warnings","editable"],"additionalProperties":false}},"limitations":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["basis","summary","replaces","horizon","options","limitations"],"additionalProperties":false},"candidatesConsidered":{"type":"integer","minimum":0,"maximum":9007199254740991},"summary":{"type":"string","maxLength":1000},"limitations":{"type":"array","items":{"type":"string","maxLength":1000}},"appliedOptionIds":{"type":"array","items":{"type":"string"}},"fieldId":{"nullable":true,"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"fieldAreaHa":{"nullable":true,"type":"number","minimum":0}},"required":["reviewId","jobId","contextHash","status","stale","inputVersions","generatedAt","retryAfter","modelInvocation","scenario","weights","options","candidatesConsidered","summary","limitations","appliedOptionIds"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"post":{"tags":["farms"],"description":"Start (or return) the year plan for the current inputs. Body {} keeps the 15-minute provider-error cooldown; {\"force\":true} replaces a finished plan at once (never one still being built). Round 3: `from` (YYYY-MM-DD) selects a later 12-month plan year; it must be the start of the current year (navigation.from of year 0) or of years 1 to 3 (navigation.nextFrom chain), else 400 validation_error naming the allowed dates. Without `from`: the current horizon. 2026-11-03 (FIELDS_MULTICROP_SOIL_SPEC.md 12.2): on a farm with fields every year-plan call names the field (`?fieldId=` on GET and POST, `fieldId` in the rescore and apply bodies); without it 400 field_required, an unknown field 404 field_not_found. Each field has its own review, horizon chain and area; apply writes saved seasons with that fieldId and keeps the other fields' seasons. A farm without fields is unchanged.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"force":{"type":"boolean"},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"reviewId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jobId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextHash":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["pending","running","partial","ready","unavailable","error"]},"stale":{"type":"boolean"},"inputVersions":{"type":"object","properties":{"farm":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"workspace":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["farm","workspace"],"additionalProperties":false},"generatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"retryAfter":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false},"scenario":{"type":"object","properties":{"kind":{"type":"string","enum":["occupied","fresh","future"]},"horizon":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"yearIndex":{"type":"integer","minimum":0,"maximum":3},"currentCycleId":{"nullable":true,"type":"string"},"previousCropId":{"nullable":true,"type":"string"},"assumedPredecessor":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"basis":{"type":"string","enum":["current_cycle","saved_season","previous_harvest","year_plan_option"]},"optionLabel":{"nullable":true,"type":"string","maxLength":60},"horizonFrom":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["cropId","cropName","basis","optionLabel","horizonFrom"],"additionalProperties":false},"fieldAreaHa":{"nullable":true,"type":"number"},"irrigationCategory":{"nullable":true,"type":"string","maxLength":80},"stateId":{"nullable":true,"type":"string"},"districtId":{"nullable":true,"type":"string"},"soilSummary":{"nullable":true,"type":"string","maxLength":1000},"neighbourhoodActiveMonths":{"nullable":true,"type":"array","items":{"type":"integer","minimum":1,"maximum":12}},"occupied":{"maxItems":24,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":160},"source":{"type":"string","enum":["saved_season","recorded_cycle","assumed_plan"]},"cropId":{"type":"string","maxLength":120},"productId":{"nullable":true,"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"nullable":true,"type":"string","maxLength":120},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"nullable":true,"type":"object","properties":{"systemId":{"nullable":true,"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"rowRatio":{"type":"string","maxLength":20}},"required":["systemId","cropId","cropName","rowRatio"],"additionalProperties":false},"establishmentMethod":{"nullable":true,"type":"string","maxLength":80},"sowing":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvestDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"occupancy":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"occupancyBasis":{"type":"string","enum":["recorded","planned","sourced_duration","assumed_duration"]},"note":{"nullable":true,"type":"string","maxLength":1000},"realisation":{"type":"string","enum":["planned","overdue","sown"]}},"required":["id","source","cropId","productId","cropName","productName","kind","companion","establishmentMethod","sowing","harvestDate","occupancy","occupancyBasis","note"],"additionalProperties":false}}},"required":["kind","horizon","currentCycleId","previousCropId","fieldAreaHa","irrigationCategory","stateId","districtId","soilSummary","neighbourhoodActiveMonths"],"additionalProperties":false},"weights":{"type":"object","properties":{"price":{"type":"number","enum":[40]},"yield":{"type":"number","enum":[30]},"soilRotation":{"type":"number","enum":[15]},"water":{"type":"number","enum":[10]},"confidence":{"type":"number","enum":[5]}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"options":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string","maxLength":120},"label":{"type":"string","maxLength":60},"secondaryLabels":{"maxItems":3,"type":"array","items":{"type":"string","maxLength":60}},"origin":{"type":"string","enum":["model","deterministic","farmer_edit"]},"score":{"type":"number","minimum":0,"maximum":100},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"slots":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"slotId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"establishmentMethod":{"nullable":true,"type":"string","maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"nullable":true,"type":"object","properties":{"systemId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"rowRatio":{"type":"string","maxLength":20},"arrangement":{"nullable":true,"type":"string","enum":["row","paired_row","strip","mixed"]},"yieldShare":{"type":"object","properties":{"main":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"companion":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["main","companion"],"additionalProperties":false},"shareBasis":{"type":"string","enum":["sourced","assumed"]},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"costPerHa":{"nullable":true,"type":"number"},"source":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"locator":{"nullable":true,"type":"string","maxLength":200}},"required":["id","title","url","locator"],"additionalProperties":false}},"required":["systemId","cropId","productId","cropName","productName","rowRatio","arrangement","yieldShare","shareBasis","yieldKgPerHa","yieldBasis","price","nitrogenCreditKgPerHa","source"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"fixed":{"type":"boolean"},"sowing":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvest":{"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"occupancy":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"durationDays":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"yieldForFieldKg":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"cost":{"nullable":true,"type":"object","properties":{"a2flPerHa":{"nullable":true,"type":"number"},"c2PerHa":{"nullable":true,"type":"number"},"reportedPerHa":{"nullable":true,"type":"number","minimum":0},"authority":{"nullable":true,"type":"string","enum":["cacp","des","sau","other"]},"year":{"nullable":true,"type":"string","maxLength":20},"region":{"nullable":true,"type":"string","maxLength":40}},"required":["a2flPerHa","c2PerHa","authority","year","region"],"additionalProperties":false},"revenuePerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"profitPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"revenueEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"score":{"type":"number","minimum":0,"maximum":100},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"confidence":{"type":"string","enum":["high","medium","low"]},"transitionNote":{"nullable":true,"type":"string","maxLength":1000},"reasonCodes":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":60}},"uncertainties":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"basis":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}}},"required":["slotId","cropId","productId","cropName","productName","establishmentMethod","fixed","sowing","harvest","occupancy","durationDays","yieldKgPerHa","yieldBasis","price","cost","revenuePerHa","profitPerHa","score","components","confidence","transitionNote","reasonCodes","uncertainties","basis"],"additionalProperties":false}},"idleMonths":{"type":"number","minimum":0,"maximum":12},"idlePenaltyPoints":{"type":"number","minimum":0,"maximum":100},"reasons":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":60},"text":{"type":"string","maxLength":160}},"required":["code","text"],"additionalProperties":false}},"totalRevenuePerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"totalProfitPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"totalRevenueEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"totalProfitEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"totalProfitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"fieldAreaHa":{"nullable":true,"type":"number"},"gaps":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"days":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","maxLength":300}},"required":["from","to","days","reason"],"additionalProperties":false}},"warnings":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"editable":{"type":"boolean"}},"required":["optionId","label","origin","score","components","slots","idleMonths","reasons","totalRevenuePerHa","totalProfitPerHa","warnings","editable"],"additionalProperties":false}},"navigation":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"previousFrom":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"nextFrom":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"yearIndex":{"type":"integer","minimum":0,"maximum":3},"maxYearIndex":{"type":"integer","minimum":0,"maximum":3}},"required":["from","previousFrom","nextFrom","yearIndex","maxYearIndex"],"additionalProperties":false},"modelSelection":{"nullable":true,"type":"object","properties":{"outcome":{"type":"string","enum":["model","not_needed","not_configured","not_used","cancelled","failed"]},"detail":{"nullable":true,"type":"string","maxLength":200}},"required":["outcome","detail"],"additionalProperties":false},"noFreeWindow":{"type":"boolean"},"alternatives":{"nullable":true,"type":"object","properties":{"basis":{"type":"string","enum":["replace_planned","sown_comparison"]},"summary":{"type":"string","maxLength":1000},"replaces":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"rotationPlanId":{"type":"string","maxLength":160},"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"plannedSowingDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["rotationPlanId","cropId","cropName","plannedSowingDate"],"additionalProperties":false}},"horizon":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"options":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string","maxLength":120},"label":{"type":"string","maxLength":60},"secondaryLabels":{"maxItems":3,"type":"array","items":{"type":"string","maxLength":60}},"origin":{"type":"string","enum":["model","deterministic","farmer_edit"]},"score":{"type":"number","minimum":0,"maximum":100},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"slots":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"slotId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"establishmentMethod":{"nullable":true,"type":"string","maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"nullable":true,"type":"object","properties":{"systemId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"rowRatio":{"type":"string","maxLength":20},"arrangement":{"nullable":true,"type":"string","enum":["row","paired_row","strip","mixed"]},"yieldShare":{"type":"object","properties":{"main":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"companion":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["main","companion"],"additionalProperties":false},"shareBasis":{"type":"string","enum":["sourced","assumed"]},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"costPerHa":{"nullable":true,"type":"number"},"source":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"locator":{"nullable":true,"type":"string","maxLength":200}},"required":["id","title","url","locator"],"additionalProperties":false}},"required":["systemId","cropId","productId","cropName","productName","rowRatio","arrangement","yieldShare","shareBasis","yieldKgPerHa","yieldBasis","price","nitrogenCreditKgPerHa","source"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"fixed":{"type":"boolean"},"sowing":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvest":{"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"occupancy":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"durationDays":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"yieldForFieldKg":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"cost":{"nullable":true,"type":"object","properties":{"a2flPerHa":{"nullable":true,"type":"number"},"c2PerHa":{"nullable":true,"type":"number"},"reportedPerHa":{"nullable":true,"type":"number","minimum":0},"authority":{"nullable":true,"type":"string","enum":["cacp","des","sau","other"]},"year":{"nullable":true,"type":"string","maxLength":20},"region":{"nullable":true,"type":"string","maxLength":40}},"required":["a2flPerHa","c2PerHa","authority","year","region"],"additionalProperties":false},"revenuePerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"profitPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"revenueEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"score":{"type":"number","minimum":0,"maximum":100},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"confidence":{"type":"string","enum":["high","medium","low"]},"transitionNote":{"nullable":true,"type":"string","maxLength":1000},"reasonCodes":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":60}},"uncertainties":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"basis":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}}},"required":["slotId","cropId","productId","cropName","productName","establishmentMethod","fixed","sowing","harvest","occupancy","durationDays","yieldKgPerHa","yieldBasis","price","cost","revenuePerHa","profitPerHa","score","components","confidence","transitionNote","reasonCodes","uncertainties","basis"],"additionalProperties":false}},"idleMonths":{"type":"number","minimum":0,"maximum":12},"idlePenaltyPoints":{"type":"number","minimum":0,"maximum":100},"reasons":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":60},"text":{"type":"string","maxLength":160}},"required":["code","text"],"additionalProperties":false}},"totalRevenuePerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"totalProfitPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"totalRevenueEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"totalProfitEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"totalProfitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"fieldAreaHa":{"nullable":true,"type":"number"},"gaps":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"days":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","maxLength":300}},"required":["from","to","days","reason"],"additionalProperties":false}},"warnings":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"editable":{"type":"boolean"}},"required":["optionId","label","origin","score","components","slots","idleMonths","reasons","totalRevenuePerHa","totalProfitPerHa","warnings","editable"],"additionalProperties":false}},"limitations":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["basis","summary","replaces","horizon","options","limitations"],"additionalProperties":false},"candidatesConsidered":{"type":"integer","minimum":0,"maximum":9007199254740991},"summary":{"type":"string","maxLength":1000},"limitations":{"type":"array","items":{"type":"string","maxLength":1000}},"appliedOptionIds":{"type":"array","items":{"type":"string"}},"fieldId":{"nullable":true,"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"fieldAreaHa":{"nullable":true,"type":"number","minimum":0}},"required":["reviewId","jobId","contextHash","status","stale","inputVersions","generatedAt","retryAfter","modelInvocation","scenario","weights","options","candidatesConsidered","summary","limitations","appliedOptionIds"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/year-plan/rescore":{"post":{"tags":["farms"],"description":"Re-score a farmer edit by code (no model call). A re-scored (farmer-edited) option is returned with optionId \"<base optionId>:edit\" and kept on the server with the review (the latest edit per base option). ApplyYearPlan carries no slots: to apply \"Your version\", send optionId \"<base optionId>:edit\" (and optionally its slotIds); the server applies the stored edited slots. 2026-11-03 (FIELDS_MULTICROP_SOIL_SPEC.md 12.2): on a farm with fields every year-plan call names the field (`?fieldId=` on GET and POST, `fieldId` in the rescore and apply bodies); without it 400 field_required, an unknown field 404 field_not_found. Each field has its own review, horizon chain and area; apply writes saved seasons with that fieldId and keeps the other fields' seasons. A farm without fields is unchanged.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reviewId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"optionId":{"type":"string","maxLength":120},"slots":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"slotId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"establishmentMethod":{"type":"string","maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"systemId":{"type":"string","maxLength":120},"sowing":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvestLatest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["cropId","productId","sowing"],"additionalProperties":false}},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"}},"required":["reviewId","optionId","slots"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"optionId":{"type":"string","maxLength":120},"label":{"type":"string","maxLength":60},"secondaryLabels":{"maxItems":3,"type":"array","items":{"type":"string","maxLength":60}},"origin":{"type":"string","enum":["model","deterministic","farmer_edit"]},"score":{"type":"number","minimum":0,"maximum":100},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"slots":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"slotId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"establishmentMethod":{"nullable":true,"type":"string","maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"nullable":true,"type":"object","properties":{"systemId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"rowRatio":{"type":"string","maxLength":20},"arrangement":{"nullable":true,"type":"string","enum":["row","paired_row","strip","mixed"]},"yieldShare":{"type":"object","properties":{"main":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"companion":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["main","companion"],"additionalProperties":false},"shareBasis":{"type":"string","enum":["sourced","assumed"]},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"costPerHa":{"nullable":true,"type":"number"},"source":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"locator":{"nullable":true,"type":"string","maxLength":200}},"required":["id","title","url","locator"],"additionalProperties":false}},"required":["systemId","cropId","productId","cropName","productName","rowRatio","arrangement","yieldShare","shareBasis","yieldKgPerHa","yieldBasis","price","nitrogenCreditKgPerHa","source"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"fixed":{"type":"boolean"},"sowing":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvest":{"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"occupancy":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"durationDays":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"yieldForFieldKg":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"cost":{"nullable":true,"type":"object","properties":{"a2flPerHa":{"nullable":true,"type":"number"},"c2PerHa":{"nullable":true,"type":"number"},"reportedPerHa":{"nullable":true,"type":"number","minimum":0},"authority":{"nullable":true,"type":"string","enum":["cacp","des","sau","other"]},"year":{"nullable":true,"type":"string","maxLength":20},"region":{"nullable":true,"type":"string","maxLength":40}},"required":["a2flPerHa","c2PerHa","authority","year","region"],"additionalProperties":false},"revenuePerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"profitPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"revenueEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"score":{"type":"number","minimum":0,"maximum":100},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"confidence":{"type":"string","enum":["high","medium","low"]},"transitionNote":{"nullable":true,"type":"string","maxLength":1000},"reasonCodes":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":60}},"uncertainties":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"basis":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}}},"required":["slotId","cropId","productId","cropName","productName","establishmentMethod","fixed","sowing","harvest","occupancy","durationDays","yieldKgPerHa","yieldBasis","price","cost","revenuePerHa","profitPerHa","score","components","confidence","transitionNote","reasonCodes","uncertainties","basis"],"additionalProperties":false}},"idleMonths":{"type":"number","minimum":0,"maximum":12},"idlePenaltyPoints":{"type":"number","minimum":0,"maximum":100},"reasons":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":60},"text":{"type":"string","maxLength":160}},"required":["code","text"],"additionalProperties":false}},"totalRevenuePerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"totalProfitPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"totalRevenueEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"totalProfitEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"totalProfitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"fieldAreaHa":{"nullable":true,"type":"number"},"gaps":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"days":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","maxLength":300}},"required":["from","to","days","reason"],"additionalProperties":false}},"warnings":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"editable":{"type":"boolean"}},"required":["optionId","label","origin","score","components","slots","idleMonths","reasons","totalRevenuePerHa","totalProfitPerHa","warnings","editable"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/year-plan/apply":{"post":{"tags":["farms"],"description":"Append the option's seasons (the growing crop is skipped) with ids yearplan:{reviewId}:{optionId}:{slotId}; a repeated apply is a no-op. A re-scored (farmer-edited) option is returned with optionId \"<base optionId>:edit\" and kept on the server with the review (the latest edit per base option). ApplyYearPlan carries no slots: to apply \"Your version\", send optionId \"<base optionId>:edit\" (and optionally its slotIds); the server applies the stored edited slots. 2026-11-03 (FIELDS_MULTICROP_SOIL_SPEC.md 12.2): on a farm with fields every year-plan call names the field (`?fieldId=` on GET and POST, `fieldId` in the rescore and apply bodies); without it 400 field_required, an unknown field 404 field_not_found. Each field has its own review, horizon chain and area; apply writes saved seasons with that fieldId and keeps the other fields' seasons. A farm without fields is unchanged.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reviewId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"optionId":{"type":"string","maxLength":120},"slotIds":{"maxItems":6,"type":"array","items":{"type":"string","maxLength":120}},"expectedWorkspaceVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"alternative":{"type":"boolean"}},"required":["reviewId","optionId","expectedWorkspaceVersion"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"workspace":{"type":"object","properties":{"boundary":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"previousHarvest":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["unknown"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["none"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["known"]},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["status","cropId","harvestDate"],"additionalProperties":false}]},"cycles":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"stage":{"type":"string","enum":["sowed","growing","flowering","harvested"]},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"rootPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"latestPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false}},"required":["id","cropId","sowingDate","stage"],"additionalProperties":false}},"rotationPlans":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"year":{"type":"integer","minimum":1900,"maximum":2200},"season":{"type":"string","minLength":1,"maxLength":80},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"plannedSowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"plannedHarvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"}},"required":["id","year","season","cropId"],"additionalProperties":false}},"fields":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"name":{"type":"string","minLength":1,"maxLength":80},"boundary":{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"notes":{"type":"string","maxLength":500},"checkIntervalDays":{"type":"integer","minimum":3,"maximum":30}},"required":["id","name","boundary"],"additionalProperties":false}},"checkIntervalDays":{"type":"integer","minimum":3,"maximum":30},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["boundary","previousHarvest","cycles","rotationPlans","fields","farmId","version","updatedAt"],"additionalProperties":false},"review":{"type":"object","properties":{"reviewId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jobId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextHash":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["pending","running","partial","ready","unavailable","error"]},"stale":{"type":"boolean"},"inputVersions":{"type":"object","properties":{"farm":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"workspace":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["farm","workspace"],"additionalProperties":false},"generatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"retryAfter":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false},"scenario":{"type":"object","properties":{"kind":{"type":"string","enum":["occupied","fresh","future"]},"horizon":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"yearIndex":{"type":"integer","minimum":0,"maximum":3},"currentCycleId":{"nullable":true,"type":"string"},"previousCropId":{"nullable":true,"type":"string"},"assumedPredecessor":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"basis":{"type":"string","enum":["current_cycle","saved_season","previous_harvest","year_plan_option"]},"optionLabel":{"nullable":true,"type":"string","maxLength":60},"horizonFrom":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["cropId","cropName","basis","optionLabel","horizonFrom"],"additionalProperties":false},"fieldAreaHa":{"nullable":true,"type":"number"},"irrigationCategory":{"nullable":true,"type":"string","maxLength":80},"stateId":{"nullable":true,"type":"string"},"districtId":{"nullable":true,"type":"string"},"soilSummary":{"nullable":true,"type":"string","maxLength":1000},"neighbourhoodActiveMonths":{"nullable":true,"type":"array","items":{"type":"integer","minimum":1,"maximum":12}},"occupied":{"maxItems":24,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":160},"source":{"type":"string","enum":["saved_season","recorded_cycle","assumed_plan"]},"cropId":{"type":"string","maxLength":120},"productId":{"nullable":true,"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"nullable":true,"type":"string","maxLength":120},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"nullable":true,"type":"object","properties":{"systemId":{"nullable":true,"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"rowRatio":{"type":"string","maxLength":20}},"required":["systemId","cropId","cropName","rowRatio"],"additionalProperties":false},"establishmentMethod":{"nullable":true,"type":"string","maxLength":80},"sowing":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvestDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"occupancy":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"occupancyBasis":{"type":"string","enum":["recorded","planned","sourced_duration","assumed_duration"]},"note":{"nullable":true,"type":"string","maxLength":1000},"realisation":{"type":"string","enum":["planned","overdue","sown"]}},"required":["id","source","cropId","productId","cropName","productName","kind","companion","establishmentMethod","sowing","harvestDate","occupancy","occupancyBasis","note"],"additionalProperties":false}}},"required":["kind","horizon","currentCycleId","previousCropId","fieldAreaHa","irrigationCategory","stateId","districtId","soilSummary","neighbourhoodActiveMonths"],"additionalProperties":false},"weights":{"type":"object","properties":{"price":{"type":"number","enum":[40]},"yield":{"type":"number","enum":[30]},"soilRotation":{"type":"number","enum":[15]},"water":{"type":"number","enum":[10]},"confidence":{"type":"number","enum":[5]}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"options":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string","maxLength":120},"label":{"type":"string","maxLength":60},"secondaryLabels":{"maxItems":3,"type":"array","items":{"type":"string","maxLength":60}},"origin":{"type":"string","enum":["model","deterministic","farmer_edit"]},"score":{"type":"number","minimum":0,"maximum":100},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"slots":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"slotId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"establishmentMethod":{"nullable":true,"type":"string","maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"nullable":true,"type":"object","properties":{"systemId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"rowRatio":{"type":"string","maxLength":20},"arrangement":{"nullable":true,"type":"string","enum":["row","paired_row","strip","mixed"]},"yieldShare":{"type":"object","properties":{"main":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"companion":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["main","companion"],"additionalProperties":false},"shareBasis":{"type":"string","enum":["sourced","assumed"]},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"costPerHa":{"nullable":true,"type":"number"},"source":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"locator":{"nullable":true,"type":"string","maxLength":200}},"required":["id","title","url","locator"],"additionalProperties":false}},"required":["systemId","cropId","productId","cropName","productName","rowRatio","arrangement","yieldShare","shareBasis","yieldKgPerHa","yieldBasis","price","nitrogenCreditKgPerHa","source"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"fixed":{"type":"boolean"},"sowing":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvest":{"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"occupancy":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"durationDays":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"yieldForFieldKg":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"cost":{"nullable":true,"type":"object","properties":{"a2flPerHa":{"nullable":true,"type":"number"},"c2PerHa":{"nullable":true,"type":"number"},"reportedPerHa":{"nullable":true,"type":"number","minimum":0},"authority":{"nullable":true,"type":"string","enum":["cacp","des","sau","other"]},"year":{"nullable":true,"type":"string","maxLength":20},"region":{"nullable":true,"type":"string","maxLength":40}},"required":["a2flPerHa","c2PerHa","authority","year","region"],"additionalProperties":false},"revenuePerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"profitPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"revenueEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"score":{"type":"number","minimum":0,"maximum":100},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"confidence":{"type":"string","enum":["high","medium","low"]},"transitionNote":{"nullable":true,"type":"string","maxLength":1000},"reasonCodes":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":60}},"uncertainties":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"basis":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}}},"required":["slotId","cropId","productId","cropName","productName","establishmentMethod","fixed","sowing","harvest","occupancy","durationDays","yieldKgPerHa","yieldBasis","price","cost","revenuePerHa","profitPerHa","score","components","confidence","transitionNote","reasonCodes","uncertainties","basis"],"additionalProperties":false}},"idleMonths":{"type":"number","minimum":0,"maximum":12},"idlePenaltyPoints":{"type":"number","minimum":0,"maximum":100},"reasons":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":60},"text":{"type":"string","maxLength":160}},"required":["code","text"],"additionalProperties":false}},"totalRevenuePerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"totalProfitPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"totalRevenueEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"totalProfitEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"totalProfitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"fieldAreaHa":{"nullable":true,"type":"number"},"gaps":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"days":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","maxLength":300}},"required":["from","to","days","reason"],"additionalProperties":false}},"warnings":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"editable":{"type":"boolean"}},"required":["optionId","label","origin","score","components","slots","idleMonths","reasons","totalRevenuePerHa","totalProfitPerHa","warnings","editable"],"additionalProperties":false}},"navigation":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"previousFrom":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"nextFrom":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"yearIndex":{"type":"integer","minimum":0,"maximum":3},"maxYearIndex":{"type":"integer","minimum":0,"maximum":3}},"required":["from","previousFrom","nextFrom","yearIndex","maxYearIndex"],"additionalProperties":false},"modelSelection":{"nullable":true,"type":"object","properties":{"outcome":{"type":"string","enum":["model","not_needed","not_configured","not_used","cancelled","failed"]},"detail":{"nullable":true,"type":"string","maxLength":200}},"required":["outcome","detail"],"additionalProperties":false},"noFreeWindow":{"type":"boolean"},"alternatives":{"nullable":true,"type":"object","properties":{"basis":{"type":"string","enum":["replace_planned","sown_comparison"]},"summary":{"type":"string","maxLength":1000},"replaces":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"rotationPlanId":{"type":"string","maxLength":160},"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"plannedSowingDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["rotationPlanId","cropId","cropName","plannedSowingDate"],"additionalProperties":false}},"horizon":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"options":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string","maxLength":120},"label":{"type":"string","maxLength":60},"secondaryLabels":{"maxItems":3,"type":"array","items":{"type":"string","maxLength":60}},"origin":{"type":"string","enum":["model","deterministic","farmer_edit"]},"score":{"type":"number","minimum":0,"maximum":100},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"slots":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"slotId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"establishmentMethod":{"nullable":true,"type":"string","maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"nullable":true,"type":"object","properties":{"systemId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"rowRatio":{"type":"string","maxLength":20},"arrangement":{"nullable":true,"type":"string","enum":["row","paired_row","strip","mixed"]},"yieldShare":{"type":"object","properties":{"main":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"companion":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["main","companion"],"additionalProperties":false},"shareBasis":{"type":"string","enum":["sourced","assumed"]},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"costPerHa":{"nullable":true,"type":"number"},"source":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"locator":{"nullable":true,"type":"string","maxLength":200}},"required":["id","title","url","locator"],"additionalProperties":false}},"required":["systemId","cropId","productId","cropName","productName","rowRatio","arrangement","yieldShare","shareBasis","yieldKgPerHa","yieldBasis","price","nitrogenCreditKgPerHa","source"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"fixed":{"type":"boolean"},"sowing":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvest":{"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"occupancy":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"durationDays":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"yieldForFieldKg":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"cost":{"nullable":true,"type":"object","properties":{"a2flPerHa":{"nullable":true,"type":"number"},"c2PerHa":{"nullable":true,"type":"number"},"reportedPerHa":{"nullable":true,"type":"number","minimum":0},"authority":{"nullable":true,"type":"string","enum":["cacp","des","sau","other"]},"year":{"nullable":true,"type":"string","maxLength":20},"region":{"nullable":true,"type":"string","maxLength":40}},"required":["a2flPerHa","c2PerHa","authority","year","region"],"additionalProperties":false},"revenuePerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"profitPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"revenueEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"score":{"type":"number","minimum":0,"maximum":100},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"confidence":{"type":"string","enum":["high","medium","low"]},"transitionNote":{"nullable":true,"type":"string","maxLength":1000},"reasonCodes":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":60}},"uncertainties":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"basis":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}}},"required":["slotId","cropId","productId","cropName","productName","establishmentMethod","fixed","sowing","harvest","occupancy","durationDays","yieldKgPerHa","yieldBasis","price","cost","revenuePerHa","profitPerHa","score","components","confidence","transitionNote","reasonCodes","uncertainties","basis"],"additionalProperties":false}},"idleMonths":{"type":"number","minimum":0,"maximum":12},"idlePenaltyPoints":{"type":"number","minimum":0,"maximum":100},"reasons":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":60},"text":{"type":"string","maxLength":160}},"required":["code","text"],"additionalProperties":false}},"totalRevenuePerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"totalProfitPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"totalRevenueEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"totalProfitEstimate":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"totalProfitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"fieldAreaHa":{"nullable":true,"type":"number"},"gaps":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"days":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","maxLength":300}},"required":["from","to","days","reason"],"additionalProperties":false}},"warnings":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"editable":{"type":"boolean"}},"required":["optionId","label","origin","score","components","slots","idleMonths","reasons","totalRevenuePerHa","totalProfitPerHa","warnings","editable"],"additionalProperties":false}},"limitations":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["basis","summary","replaces","horizon","options","limitations"],"additionalProperties":false},"candidatesConsidered":{"type":"integer","minimum":0,"maximum":9007199254740991},"summary":{"type":"string","maxLength":1000},"limitations":{"type":"array","items":{"type":"string","maxLength":1000}},"appliedOptionIds":{"type":"array","items":{"type":"string"}},"fieldId":{"nullable":true,"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"fieldAreaHa":{"nullable":true,"type":"number","minimum":0}},"required":["reviewId","jobId","contextHash","status","stale","inputVersions","generatedAt","retryAfter","modelInvocation","scenario","weights","options","candidatesConsidered","summary","limitations","appliedOptionIds"],"additionalProperties":false}},"required":["workspace","review"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/boundary-context":{"post":{"tags":["farms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"boundary":{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false}},"required":["boundary"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/ai/activity":{"get":{"tags":["assistant"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/demo":{"post":{"tags":["farms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/cycles/{cycleId}/field-photos":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"cycleId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"photos":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"capturedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"createdAt":{"type":"string"},"imagePath":{"type":"string"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"coverage":{"nullable":true,"type":"object","properties":{"photoId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable"]},"method":{"nullable":true,"description":"\"box\": union of SAM proposal boxes / photo area (overstates pixel share; never pixel coverage). \"mask\": union of decoded mask pixels / photo area (not shipped while SAM masks are unsupported, DECISIONS.md D44).","type":"string","enum":["mask","box"]},"modelId":{"nullable":true,"type":"string"},"summaryModelId":{"nullable":true,"type":"string"},"classes":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["crop","weed","water"]},"label":{"type":"string"},"fraction":{"nullable":true,"description":"Share of the PHOTO (0..1), never field area. With method \"box\" it is the union of outline boxes divided by the photo area: boxes include background, so it overstates the pixel share.","type":"number","minimum":0,"maximum":1},"regions":{"type":"integer","minimum":0,"maximum":9007199254740991},"confidence":{"nullable":true,"type":"number","minimum":0,"maximum":1},"phrases":{"maxItems":5,"type":"array","items":{"type":"string"},"description":"SAM concept phrases actually sent for this class, in order; the share is from the last one. The label is a display name, not necessarily a phrase that was searched."}},"required":["key","label","fraction","regions","confidence","phrases"],"additionalProperties":false}},"summary":{"nullable":true,"type":"string","maxLength":600},"limitations":{"type":"array","items":{"type":"string"}},"failureReason":{"nullable":true,"type":"string"},"promptVersion":{"type":"string","enum":["photo-coverage-v2"]},"createdAt":{"type":"string"},"outdated":{"type":"boolean","description":"True when the photo date or the crop of the cycle changed after this measurement; the crop search phrase or the calendar stage in the summary may no longer apply."}},"required":["photoId","status","method","modelId","summaryModelId","classes","summary","limitations","failureReason","promptVersion","createdAt","outdated"],"additionalProperties":false}},"required":["id","mediaId","capturedOn","createdAt","imagePath"],"additionalProperties":false}},"predictions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"photoId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"targetDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable"]},"imagePath":{"nullable":true,"type":"string"},"failureReason":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"evidenceRevision":{"type":"string"},"promptVersion":{"type":"string"},"outdated":{"type":"boolean"},"guidance":{"nullable":true,"type":"object","properties":{"sourceStage":{"type":"string"},"targetStage":{"type":"string"},"elapsedDays":{"type":"integer","minimum":0,"maximum":9007199254740991},"targetAgeDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"growth":{"type":"string"},"weather":{"type":"object","properties":{"kind":{"type":"string","enum":["observed","forecast","typical","unavailable"]},"summary":{"type":"string"},"rainMm":{"nullable":true,"type":"number"},"tMinC":{"nullable":true,"type":"number"},"tMaxC":{"nullable":true,"type":"number"},"sunshineHours":{"nullable":true,"type":"number"},"source":{"nullable":true,"type":"string"},"issuedAt":{"nullable":true,"type":"string"}},"required":["kind","summary","rainMm","tMinC","tMaxC","sunshineHours","source","issuedAt"],"additionalProperties":false},"interval":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"observedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"forecastDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"typicalDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"missingDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rainMm":{"nullable":true,"type":"number"},"meanTempC":{"nullable":true,"type":"number"}},"required":["from","to","observedDays","forecastDays","typicalDays","missingDays","rainMm","meanTempC"],"additionalProperties":false},"change":{"type":"string"},"limitations":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"string"}}},"required":["sourceStage","targetStage","elapsedDays","targetAgeDays","growth","weather","interval","change","limitations","sources"],"additionalProperties":false}},"required":["id","photoId","sourceDate","targetDate","status","imagePath","failureReason"],"additionalProperties":false}},"observations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"capturedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"createdAt":{"type":"string"},"imagePath":{"type":"string"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"coverage":{"nullable":true,"type":"object","properties":{"photoId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable"]},"method":{"nullable":true,"description":"\"box\": union of SAM proposal boxes / photo area (overstates pixel share; never pixel coverage). \"mask\": union of decoded mask pixels / photo area (not shipped while SAM masks are unsupported, DECISIONS.md D44).","type":"string","enum":["mask","box"]},"modelId":{"nullable":true,"type":"string"},"summaryModelId":{"nullable":true,"type":"string"},"classes":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["crop","weed","water"]},"label":{"type":"string"},"fraction":{"nullable":true,"description":"Share of the PHOTO (0..1), never field area. With method \"box\" it is the union of outline boxes divided by the photo area: boxes include background, so it overstates the pixel share.","type":"number","minimum":0,"maximum":1},"regions":{"type":"integer","minimum":0,"maximum":9007199254740991},"confidence":{"nullable":true,"type":"number","minimum":0,"maximum":1},"phrases":{"maxItems":5,"type":"array","items":{"type":"string"},"description":"SAM concept phrases actually sent for this class, in order; the share is from the last one. The label is a display name, not necessarily a phrase that was searched."}},"required":["key","label","fraction","regions","confidence","phrases"],"additionalProperties":false}},"summary":{"nullable":true,"type":"string","maxLength":600},"limitations":{"type":"array","items":{"type":"string"}},"failureReason":{"nullable":true,"type":"string"},"promptVersion":{"type":"string","enum":["photo-coverage-v2"]},"createdAt":{"type":"string"},"outdated":{"type":"boolean","description":"True when the photo date or the crop of the cycle changed after this measurement; the crop search phrase or the calendar stage in the summary may no longer apply."}},"required":["photoId","status","method","modelId","summaryModelId","classes","summary","limitations","failureReason","promptVersion","createdAt","outdated"],"additionalProperties":false}},"required":["id","mediaId","capturedOn","createdAt","imagePath"],"additionalProperties":false}}},"required":["photos","predictions"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"photos":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"capturedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["mediaId","capturedOn"],"additionalProperties":false}}},"required":["photos"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"cycleId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"photos":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"capturedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"createdAt":{"type":"string"},"imagePath":{"type":"string"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"coverage":{"nullable":true,"type":"object","properties":{"photoId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable"]},"method":{"nullable":true,"description":"\"box\": union of SAM proposal boxes / photo area (overstates pixel share; never pixel coverage). \"mask\": union of decoded mask pixels / photo area (not shipped while SAM masks are unsupported, DECISIONS.md D44).","type":"string","enum":["mask","box"]},"modelId":{"nullable":true,"type":"string"},"summaryModelId":{"nullable":true,"type":"string"},"classes":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["crop","weed","water"]},"label":{"type":"string"},"fraction":{"nullable":true,"description":"Share of the PHOTO (0..1), never field area. With method \"box\" it is the union of outline boxes divided by the photo area: boxes include background, so it overstates the pixel share.","type":"number","minimum":0,"maximum":1},"regions":{"type":"integer","minimum":0,"maximum":9007199254740991},"confidence":{"nullable":true,"type":"number","minimum":0,"maximum":1},"phrases":{"maxItems":5,"type":"array","items":{"type":"string"},"description":"SAM concept phrases actually sent for this class, in order; the share is from the last one. The label is a display name, not necessarily a phrase that was searched."}},"required":["key","label","fraction","regions","confidence","phrases"],"additionalProperties":false}},"summary":{"nullable":true,"type":"string","maxLength":600},"limitations":{"type":"array","items":{"type":"string"}},"failureReason":{"nullable":true,"type":"string"},"promptVersion":{"type":"string","enum":["photo-coverage-v2"]},"createdAt":{"type":"string"},"outdated":{"type":"boolean","description":"True when the photo date or the crop of the cycle changed after this measurement; the crop search phrase or the calendar stage in the summary may no longer apply."}},"required":["photoId","status","method","modelId","summaryModelId","classes","summary","limitations","failureReason","promptVersion","createdAt","outdated"],"additionalProperties":false}},"required":["id","mediaId","capturedOn","createdAt","imagePath"],"additionalProperties":false}},"predictions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"photoId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"targetDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable"]},"imagePath":{"nullable":true,"type":"string"},"failureReason":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"evidenceRevision":{"type":"string"},"promptVersion":{"type":"string"},"outdated":{"type":"boolean"},"guidance":{"nullable":true,"type":"object","properties":{"sourceStage":{"type":"string"},"targetStage":{"type":"string"},"elapsedDays":{"type":"integer","minimum":0,"maximum":9007199254740991},"targetAgeDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"growth":{"type":"string"},"weather":{"type":"object","properties":{"kind":{"type":"string","enum":["observed","forecast","typical","unavailable"]},"summary":{"type":"string"},"rainMm":{"nullable":true,"type":"number"},"tMinC":{"nullable":true,"type":"number"},"tMaxC":{"nullable":true,"type":"number"},"sunshineHours":{"nullable":true,"type":"number"},"source":{"nullable":true,"type":"string"},"issuedAt":{"nullable":true,"type":"string"}},"required":["kind","summary","rainMm","tMinC","tMaxC","sunshineHours","source","issuedAt"],"additionalProperties":false},"interval":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"observedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"forecastDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"typicalDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"missingDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rainMm":{"nullable":true,"type":"number"},"meanTempC":{"nullable":true,"type":"number"}},"required":["from","to","observedDays","forecastDays","typicalDays","missingDays","rainMm","meanTempC"],"additionalProperties":false},"change":{"type":"string"},"limitations":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"string"}}},"required":["sourceStage","targetStage","elapsedDays","targetAgeDays","growth","weather","interval","change","limitations","sources"],"additionalProperties":false}},"required":["id","photoId","sourceDate","targetDate","status","imagePath","failureReason"],"additionalProperties":false}},"observations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"capturedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"createdAt":{"type":"string"},"imagePath":{"type":"string"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"coverage":{"nullable":true,"type":"object","properties":{"photoId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable"]},"method":{"nullable":true,"description":"\"box\": union of SAM proposal boxes / photo area (overstates pixel share; never pixel coverage). \"mask\": union of decoded mask pixels / photo area (not shipped while SAM masks are unsupported, DECISIONS.md D44).","type":"string","enum":["mask","box"]},"modelId":{"nullable":true,"type":"string"},"summaryModelId":{"nullable":true,"type":"string"},"classes":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["crop","weed","water"]},"label":{"type":"string"},"fraction":{"nullable":true,"description":"Share of the PHOTO (0..1), never field area. With method \"box\" it is the union of outline boxes divided by the photo area: boxes include background, so it overstates the pixel share.","type":"number","minimum":0,"maximum":1},"regions":{"type":"integer","minimum":0,"maximum":9007199254740991},"confidence":{"nullable":true,"type":"number","minimum":0,"maximum":1},"phrases":{"maxItems":5,"type":"array","items":{"type":"string"},"description":"SAM concept phrases actually sent for this class, in order; the share is from the last one. The label is a display name, not necessarily a phrase that was searched."}},"required":["key","label","fraction","regions","confidence","phrases"],"additionalProperties":false}},"summary":{"nullable":true,"type":"string","maxLength":600},"limitations":{"type":"array","items":{"type":"string"}},"failureReason":{"nullable":true,"type":"string"},"promptVersion":{"type":"string","enum":["photo-coverage-v2"]},"createdAt":{"type":"string"},"outdated":{"type":"boolean","description":"True when the photo date or the crop of the cycle changed after this measurement; the crop search phrase or the calendar stage in the summary may no longer apply."}},"required":["photoId","status","method","modelId","summaryModelId","classes","summary","limitations","failureReason","promptVersion","createdAt","outdated"],"additionalProperties":false}},"required":["id","mediaId","capturedOn","createdAt","imagePath"],"additionalProperties":false}}},"required":["photos","predictions"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/cycles/{cycleId}/season-predictions":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"cycleId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api/v1/farms/{id}/cycles/{cycleId}/field-photos/{photoId}":{"delete":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"cycleId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"photoId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"photos":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"capturedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"createdAt":{"type":"string"},"imagePath":{"type":"string"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"coverage":{"nullable":true,"type":"object","properties":{"photoId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable"]},"method":{"nullable":true,"description":"\"box\": union of SAM proposal boxes / photo area (overstates pixel share; never pixel coverage). \"mask\": union of decoded mask pixels / photo area (not shipped while SAM masks are unsupported, DECISIONS.md D44).","type":"string","enum":["mask","box"]},"modelId":{"nullable":true,"type":"string"},"summaryModelId":{"nullable":true,"type":"string"},"classes":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["crop","weed","water"]},"label":{"type":"string"},"fraction":{"nullable":true,"description":"Share of the PHOTO (0..1), never field area. With method \"box\" it is the union of outline boxes divided by the photo area: boxes include background, so it overstates the pixel share.","type":"number","minimum":0,"maximum":1},"regions":{"type":"integer","minimum":0,"maximum":9007199254740991},"confidence":{"nullable":true,"type":"number","minimum":0,"maximum":1},"phrases":{"maxItems":5,"type":"array","items":{"type":"string"},"description":"SAM concept phrases actually sent for this class, in order; the share is from the last one. The label is a display name, not necessarily a phrase that was searched."}},"required":["key","label","fraction","regions","confidence","phrases"],"additionalProperties":false}},"summary":{"nullable":true,"type":"string","maxLength":600},"limitations":{"type":"array","items":{"type":"string"}},"failureReason":{"nullable":true,"type":"string"},"promptVersion":{"type":"string","enum":["photo-coverage-v2"]},"createdAt":{"type":"string"},"outdated":{"type":"boolean","description":"True when the photo date or the crop of the cycle changed after this measurement; the crop search phrase or the calendar stage in the summary may no longer apply."}},"required":["photoId","status","method","modelId","summaryModelId","classes","summary","limitations","failureReason","promptVersion","createdAt","outdated"],"additionalProperties":false}},"required":["id","mediaId","capturedOn","createdAt","imagePath"],"additionalProperties":false}},"predictions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"photoId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"targetDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable"]},"imagePath":{"nullable":true,"type":"string"},"failureReason":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"evidenceRevision":{"type":"string"},"promptVersion":{"type":"string"},"outdated":{"type":"boolean"},"guidance":{"nullable":true,"type":"object","properties":{"sourceStage":{"type":"string"},"targetStage":{"type":"string"},"elapsedDays":{"type":"integer","minimum":0,"maximum":9007199254740991},"targetAgeDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"growth":{"type":"string"},"weather":{"type":"object","properties":{"kind":{"type":"string","enum":["observed","forecast","typical","unavailable"]},"summary":{"type":"string"},"rainMm":{"nullable":true,"type":"number"},"tMinC":{"nullable":true,"type":"number"},"tMaxC":{"nullable":true,"type":"number"},"sunshineHours":{"nullable":true,"type":"number"},"source":{"nullable":true,"type":"string"},"issuedAt":{"nullable":true,"type":"string"}},"required":["kind","summary","rainMm","tMinC","tMaxC","sunshineHours","source","issuedAt"],"additionalProperties":false},"interval":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"observedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"forecastDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"typicalDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"missingDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rainMm":{"nullable":true,"type":"number"},"meanTempC":{"nullable":true,"type":"number"}},"required":["from","to","observedDays","forecastDays","typicalDays","missingDays","rainMm","meanTempC"],"additionalProperties":false},"change":{"type":"string"},"limitations":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"string"}}},"required":["sourceStage","targetStage","elapsedDays","targetAgeDays","growth","weather","interval","change","limitations","sources"],"additionalProperties":false}},"required":["id","photoId","sourceDate","targetDate","status","imagePath","failureReason"],"additionalProperties":false}},"observations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"capturedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"createdAt":{"type":"string"},"imagePath":{"type":"string"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"coverage":{"nullable":true,"type":"object","properties":{"photoId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable"]},"method":{"nullable":true,"description":"\"box\": union of SAM proposal boxes / photo area (overstates pixel share; never pixel coverage). \"mask\": union of decoded mask pixels / photo area (not shipped while SAM masks are unsupported, DECISIONS.md D44).","type":"string","enum":["mask","box"]},"modelId":{"nullable":true,"type":"string"},"summaryModelId":{"nullable":true,"type":"string"},"classes":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["crop","weed","water"]},"label":{"type":"string"},"fraction":{"nullable":true,"description":"Share of the PHOTO (0..1), never field area. With method \"box\" it is the union of outline boxes divided by the photo area: boxes include background, so it overstates the pixel share.","type":"number","minimum":0,"maximum":1},"regions":{"type":"integer","minimum":0,"maximum":9007199254740991},"confidence":{"nullable":true,"type":"number","minimum":0,"maximum":1},"phrases":{"maxItems":5,"type":"array","items":{"type":"string"},"description":"SAM concept phrases actually sent for this class, in order; the share is from the last one. The label is a display name, not necessarily a phrase that was searched."}},"required":["key","label","fraction","regions","confidence","phrases"],"additionalProperties":false}},"summary":{"nullable":true,"type":"string","maxLength":600},"limitations":{"type":"array","items":{"type":"string"}},"failureReason":{"nullable":true,"type":"string"},"promptVersion":{"type":"string","enum":["photo-coverage-v2"]},"createdAt":{"type":"string"},"outdated":{"type":"boolean","description":"True when the photo date or the crop of the cycle changed after this measurement; the crop search phrase or the calendar stage in the summary may no longer apply."}},"required":["photoId","status","method","modelId","summaryModelId","classes","summary","limitations","failureReason","promptVersion","createdAt","outdated"],"additionalProperties":false}},"required":["id","mediaId","capturedOn","createdAt","imagePath"],"additionalProperties":false}}},"required":["photos","predictions"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/cycles/{cycleId}/field-photos/{photoId}/predict":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["targetDate"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"cycleId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"photoId","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"photoId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"targetDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable"]},"imagePath":{"nullable":true,"type":"string"},"failureReason":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"evidenceRevision":{"type":"string"},"promptVersion":{"type":"string"},"outdated":{"type":"boolean"},"guidance":{"nullable":true,"type":"object","properties":{"sourceStage":{"type":"string"},"targetStage":{"type":"string"},"elapsedDays":{"type":"integer","minimum":0,"maximum":9007199254740991},"targetAgeDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"growth":{"type":"string"},"weather":{"type":"object","properties":{"kind":{"type":"string","enum":["observed","forecast","typical","unavailable"]},"summary":{"type":"string"},"rainMm":{"nullable":true,"type":"number"},"tMinC":{"nullable":true,"type":"number"},"tMaxC":{"nullable":true,"type":"number"},"sunshineHours":{"nullable":true,"type":"number"},"source":{"nullable":true,"type":"string"},"issuedAt":{"nullable":true,"type":"string"}},"required":["kind","summary","rainMm","tMinC","tMaxC","sunshineHours","source","issuedAt"],"additionalProperties":false},"interval":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"observedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"forecastDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"typicalDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"missingDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rainMm":{"nullable":true,"type":"number"},"meanTempC":{"nullable":true,"type":"number"}},"required":["from","to","observedDays","forecastDays","typicalDays","missingDays","rainMm","meanTempC"],"additionalProperties":false},"change":{"type":"string"},"limitations":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"string"}}},"required":["sourceStage","targetStage","elapsedDays","targetAgeDays","growth","weather","interval","change","limitations","sources"],"additionalProperties":false}},"required":["id","photoId","sourceDate","targetDate","status","imagePath","failureReason"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/cycles/{cycleId}/field-photos/{photoId}/coverage":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"nullable":true,"type":"object","properties":{"regenerate":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"cycleId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"photoId","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"photoId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable"]},"method":{"nullable":true,"description":"\"box\": union of SAM proposal boxes / photo area (overstates pixel share; never pixel coverage). \"mask\": union of decoded mask pixels / photo area (not shipped while SAM masks are unsupported, DECISIONS.md D44).","type":"string","enum":["mask","box"]},"modelId":{"nullable":true,"type":"string"},"summaryModelId":{"nullable":true,"type":"string"},"classes":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["crop","weed","water"]},"label":{"type":"string"},"fraction":{"nullable":true,"description":"Share of the PHOTO (0..1), never field area. With method \"box\" it is the union of outline boxes divided by the photo area: boxes include background, so it overstates the pixel share.","type":"number","minimum":0,"maximum":1},"regions":{"type":"integer","minimum":0,"maximum":9007199254740991},"confidence":{"nullable":true,"type":"number","minimum":0,"maximum":1},"phrases":{"maxItems":5,"type":"array","items":{"type":"string"},"description":"SAM concept phrases actually sent for this class, in order; the share is from the last one. The label is a display name, not necessarily a phrase that was searched."}},"required":["key","label","fraction","regions","confidence","phrases"],"additionalProperties":false}},"summary":{"nullable":true,"type":"string","maxLength":600},"limitations":{"type":"array","items":{"type":"string"}},"failureReason":{"nullable":true,"type":"string"},"promptVersion":{"type":"string","enum":["photo-coverage-v2"]},"createdAt":{"type":"string"},"outdated":{"type":"boolean","description":"True when the photo date or the crop of the cycle changed after this measurement; the crop search phrase or the calendar stage in the summary may no longer apply."}},"required":["photoId","status","method","modelId","summaryModelId","classes","summary","limitations","failureReason","promptVersion","createdAt","outdated"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/cycles/{cycleId}/field-photos/predictions/{assetId}/image":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"cycleId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"assetId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api/v1/media":{"post":{"tags":["media"],"description":"Uploads one private image (multipart, field \"file\"; JPEG/PNG/WebP by magic bytes; at most 10485760 bytes, enforced while streaming). Optional farmId as query parameter or as a form field sent BEFORE the file. Stores the original and a metadata-stripped, orientation-normalised JPEG (max 1600 px). Returns a media id; there is no public URL. Supports Idempotency-Key.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"farmId","required":false}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"farmId":{"nullable":true,"type":"string"},"contentType":{"type":"string"},"bytes":{"type":"number"},"sha256":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"exifOrientation":{"nullable":true,"type":"number"},"exifCreatedAt":{"nullable":true,"type":"string"},"orientedWidth":{"type":"number"},"orientedHeight":{"type":"number"},"normalized":{"type":"object","properties":{"width":{"type":"number"},"height":{"type":"number"},"bytes":{"type":"number"},"contentType":{"type":"string","enum":["image/jpeg"]}},"required":["width","height","bytes","contentType"],"additionalProperties":false},"contentPath":{"type":"string"},"region":{"nullable":true,"type":"object","properties":{"polygon":{"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"number"}]},"minItems":2,"maxItems":2}},"source":{"type":"string","enum":["manual","sam_confirmed"]},"transform":{"type":"object","properties":{"orientationApplied":{"type":"boolean"},"normalizedWidth":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":20000},"normalizedHeight":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":20000}},"required":["orientationApplied","normalizedWidth","normalizedHeight"],"additionalProperties":false},"version":{"type":"number"}},"required":["polygon","source","transform","version"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","farmId","contentType","bytes","sha256","width","height","exifOrientation","orientedWidth","orientedHeight","normalized","contentPath","region","createdAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/media/{id}":{"get":{"tags":["media"],"description":"Owner-scoped media metadata.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"farmId":{"nullable":true,"type":"string"},"contentType":{"type":"string"},"bytes":{"type":"number"},"sha256":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"exifOrientation":{"nullable":true,"type":"number"},"exifCreatedAt":{"nullable":true,"type":"string"},"orientedWidth":{"type":"number"},"orientedHeight":{"type":"number"},"normalized":{"type":"object","properties":{"width":{"type":"number"},"height":{"type":"number"},"bytes":{"type":"number"},"contentType":{"type":"string","enum":["image/jpeg"]}},"required":["width","height","bytes","contentType"],"additionalProperties":false},"contentPath":{"type":"string"},"region":{"nullable":true,"type":"object","properties":{"polygon":{"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"number"}]},"minItems":2,"maxItems":2}},"source":{"type":"string","enum":["manual","sam_confirmed"]},"transform":{"type":"object","properties":{"orientationApplied":{"type":"boolean"},"normalizedWidth":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":20000},"normalizedHeight":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":20000}},"required":["orientationApplied","normalizedWidth","normalizedHeight"],"additionalProperties":false},"version":{"type":"number"}},"required":["polygon","source","transform","version"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","farmId","contentType","bytes","sha256","width","height","exifOrientation","orientedWidth","orientedHeight","normalized","contentPath","region","createdAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/media/{id}/content":{"get":{"tags":["media"],"description":"Streams the private image to its owner only (Cache-Control: private, no-store). variant=original|normalized (default normalized).","parameters":[{"schema":{"default":"normalized","type":"string","enum":["original","normalized"]},"in":"query","name":"variant","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api/v1/media/{id}/region":{"put":{"tags":["media"],"description":"Saves a user-confirmed region: 3-64 points in normalised 0..1 coordinates of the orientation-corrected image, with the coordinate transform. Increments region_version. Coordinates are never logged.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"polygon":{"minItems":3,"maxItems":64,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"number","minimum":0,"maximum":1}]},"minItems":2,"maxItems":2}},"source":{"type":"string","enum":["manual","sam_confirmed"]},"transform":{"type":"object","properties":{"orientationApplied":{"type":"boolean"},"normalizedWidth":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":20000},"normalizedHeight":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":20000}},"required":["orientationApplied","normalizedWidth","normalizedHeight"]}},"required":["polygon","source","transform"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"farmId":{"nullable":true,"type":"string"},"contentType":{"type":"string"},"bytes":{"type":"number"},"sha256":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"exifOrientation":{"nullable":true,"type":"number"},"exifCreatedAt":{"nullable":true,"type":"string"},"orientedWidth":{"type":"number"},"orientedHeight":{"type":"number"},"normalized":{"type":"object","properties":{"width":{"type":"number"},"height":{"type":"number"},"bytes":{"type":"number"},"contentType":{"type":"string","enum":["image/jpeg"]}},"required":["width","height","bytes","contentType"],"additionalProperties":false},"contentPath":{"type":"string"},"region":{"nullable":true,"type":"object","properties":{"polygon":{"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"number"}]},"minItems":2,"maxItems":2}},"source":{"type":"string","enum":["manual","sam_confirmed"]},"transform":{"type":"object","properties":{"orientationApplied":{"type":"boolean"},"normalizedWidth":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":20000},"normalizedHeight":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":20000}},"required":["orientationApplied","normalizedWidth","normalizedHeight"],"additionalProperties":false},"version":{"type":"number"}},"required":["polygon","source","transform","version"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","farmId","contentType","bytes","sha256","width","height","exifOrientation","orientedWidth","orientedHeight","normalized","contentPath","region","createdAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/jobs/{id}":{"get":{"tags":["jobs"],"description":"Owner-scoped job status. Other owners' jobs are 404.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"state":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]},"progress":{"type":"number"},"attempt":{"type":"number"},"maxAttempts":{"type":"number"},"retryable":{"nullable":true,"type":"boolean"},"cancelRequested":{"type":"boolean"},"result":{},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","retryable"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"finishedAt":{"nullable":true,"type":"string"}},"required":["id","type","state","progress","attempt","maxAttempts","retryable","cancelRequested","result","error","createdAt","updatedAt","finishedAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/jobs/{id}/cancel":{"post":{"tags":["jobs"],"description":"Requests cancellation. The worker honours the flag; a provider call already in flight may still complete and be billed.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"state":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]},"progress":{"type":"number"},"attempt":{"type":"number"},"maxAttempts":{"type":"number"},"retryable":{"nullable":true,"type":"boolean"},"cancelRequested":{"type":"boolean"},"result":{},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","retryable"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"finishedAt":{"nullable":true,"type":"string"}},"required":["id","type","state","progress","attempt","maxAttempts","retryable","cancelRequested","result","error","createdAt","updatedAt","finishedAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/today":{"get":{"tags":["farms"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"asOf":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"today":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"cycle":{"nullable":true,"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"stage":{"type":"string","enum":["sowed","growing","flowering","harvested"]},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"rootPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"latestPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false}},"required":["id","cropId","sowingDate","stage"],"additionalProperties":false},"product":{"nullable":true,"type":"object","properties":{"productId":{"type":"string"},"productName":{"type":"string"},"cropName":{"type":"string"}},"required":["productId","productName","cropName"],"additionalProperties":false},"timeline":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string"},"productId":{"nullable":true,"type":"string"},"establishmentMethod":{"nullable":true,"type":"string"},"anchorDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"stages":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","maxLength":80},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"basis":{"type":"string","enum":["sourced","fao_generic","estimate"]}},"required":["id","name","from","to","basis"],"additionalProperties":false}},"harvest":{"nullable":true,"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"basis":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}},"required":["cropId","productId","establishmentMethod","anchorDate","stages","harvest","basis"],"additionalProperties":false},"slider":{"nullable":true,"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"todayProgress":{"type":"number","minimum":0,"maximum":1}},"required":["from","to","todayProgress"],"additionalProperties":false},"daysToHarvest":{"nullable":true,"type":"object","properties":{"earliest":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"latest":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["earliest","latest"],"additionalProperties":false},"scenes":{"maxItems":120,"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"kind":{"type":"string","enum":["observed","illustration","predicted"]},"itemId":{"nullable":true,"type":"string","maxLength":200},"acquisitionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"cloudPct":{"nullable":true,"type":"number"},"imagePath":{"nullable":true,"type":"string","maxLength":400},"ndviImagePath":{"nullable":true,"type":"string","maxLength":400},"fieldImagePath":{"nullable":true,"type":"string","maxLength":400},"fieldNdviImagePath":{"nullable":true,"type":"string","maxLength":400},"derivedFromItemId":{"nullable":true,"type":"string","maxLength":200},"stageId":{"nullable":true,"type":"string","maxLength":80},"targetDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"generatedAt":{"type":"string"},"guidance":{"type":"string","maxLength":400}},"required":["date","kind","itemId","acquisitionDate","cloudPct","imagePath","ndviImagePath","derivedFromItemId","stageId"],"additionalProperties":false}},"ndvi":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["available","unavailable"]},"reason":{"nullable":true,"type":"string","maxLength":80},"window":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"polygonBasis":{"nullable":true,"type":"string","enum":["boundary","farm_point_square"]},"polygonPixels":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"smallField":{"type":"boolean"},"imageBbox":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"minItems":4,"maxItems":4},"scenesListed":{"type":"integer","minimum":0,"maximum":9007199254740991},"scenesAnalysed":{"type":"integer","minimum":0,"maximum":9007199254740991},"scenesPending":{"type":"integer","minimum":0,"maximum":9007199254740991},"scenesFailed":{"type":"integer","minimum":0,"maximum":9007199254740991},"readings":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,128}$"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"acquiredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"tileId":{"nullable":true,"type":"string","maxLength":16},"baseline":{"nullable":true,"type":"string","maxLength":16},"offsetApplied":{"type":"boolean"},"sceneCloudPct":{"nullable":true,"type":"number","minimum":0,"maximum":100},"usable":{"type":"boolean"},"field":{"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"median":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p10":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p90":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"clearPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"clearFraction":{"type":"number","minimum":0,"maximum":1},"cloudOrShadowFraction":{"type":"number","minimum":0,"maximum":1},"b04P95":{"nullable":true,"type":"number","minimum":0},"usable":{"type":"boolean"},"rejection":{"nullable":true,"type":"string","enum":["no_pixels","implausible_band_values","insufficient_clear_pixels","low_clear_fraction"]},"indices":{"type":"object","properties":{"evi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndre":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"gndvi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"savi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndmi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"lswi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndwi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false}},"required":["evi","ndre","gndvi","savi","ndmi","lswi","ndwi"],"additionalProperties":false}},"required":["mean","median","p10","p90","clearPixels","totalPixels","clearFraction","cloudOrShadowFraction","b04P95","usable","rejection"],"additionalProperties":false},"neighbourhood":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"median":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p10":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p90":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"clearPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"clearFraction":{"type":"number","minimum":0,"maximum":1},"cloudOrShadowFraction":{"type":"number","minimum":0,"maximum":1},"b04P95":{"nullable":true,"type":"number","minimum":0},"usable":{"type":"boolean"},"rejection":{"nullable":true,"type":"string","enum":["no_pixels","implausible_band_values","insufficient_clear_pixels","low_clear_fraction"]},"indices":{"type":"object","properties":{"evi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndre":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"gndvi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"savi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndmi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"lswi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndwi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false}},"required":["evi","ndre","gndvi","savi","ndmi","lswi","ndwi"],"additionalProperties":false}},"required":["mean","median","p10","p90","clearPixels","totalPixels","clearFraction","cloudOrShadowFraction","b04P95","usable","rejection"],"additionalProperties":false}},"required":["itemId","date","acquiredAt","tileId","baseline","offsetApplied","sceneCloudPct","usable","field","neighbourhood"],"additionalProperties":false}},"latestUsable":{"nullable":true,"type":"object","properties":{"itemId":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,128}$"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"acquiredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"tileId":{"nullable":true,"type":"string","maxLength":16},"baseline":{"nullable":true,"type":"string","maxLength":16},"offsetApplied":{"type":"boolean"},"sceneCloudPct":{"nullable":true,"type":"number","minimum":0,"maximum":100},"usable":{"type":"boolean"},"field":{"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"median":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p10":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p90":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"clearPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"clearFraction":{"type":"number","minimum":0,"maximum":1},"cloudOrShadowFraction":{"type":"number","minimum":0,"maximum":1},"b04P95":{"nullable":true,"type":"number","minimum":0},"usable":{"type":"boolean"},"rejection":{"nullable":true,"type":"string","enum":["no_pixels","implausible_band_values","insufficient_clear_pixels","low_clear_fraction"]},"indices":{"type":"object","properties":{"evi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndre":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"gndvi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"savi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndmi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"lswi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndwi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false}},"required":["evi","ndre","gndvi","savi","ndmi","lswi","ndwi"],"additionalProperties":false}},"required":["mean","median","p10","p90","clearPixels","totalPixels","clearFraction","cloudOrShadowFraction","b04P95","usable","rejection"],"additionalProperties":false},"neighbourhood":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"median":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p10":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p90":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"clearPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"clearFraction":{"type":"number","minimum":0,"maximum":1},"cloudOrShadowFraction":{"type":"number","minimum":0,"maximum":1},"b04P95":{"nullable":true,"type":"number","minimum":0},"usable":{"type":"boolean"},"rejection":{"nullable":true,"type":"string","enum":["no_pixels","implausible_band_values","insufficient_clear_pixels","low_clear_fraction"]},"indices":{"type":"object","properties":{"evi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndre":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"gndvi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"savi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndmi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"lswi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndwi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false}},"required":["evi","ndre","gndvi","savi","ndmi","lswi","ndwi"],"additionalProperties":false}},"required":["mean","median","p10","p90","clearPixels","totalPixels","clearFraction","cloudOrShadowFraction","b04P95","usable","rejection"],"additionalProperties":false}},"required":["itemId","date","acquiredAt","tileId","baseline","offsetApplied","sceneCloudPct","usable","field","neighbourhood"],"additionalProperties":false},"method":{"type":"object","properties":{"version":{"type":"string"},"indexMethodVersion":{"type":"string"},"sclClassesKept":{"type":"array","items":{"type":"integer","minimum":0,"maximum":11}},"minClearFraction":{"type":"number","minimum":0,"maximum":1},"minClearPixels":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxSceneCloudPct":{"type":"number","minimum":0,"maximum":100}},"required":["version","sclClassesKept","minClearFraction","minClearPixels","maxSceneCloudPct"],"additionalProperties":false},"attribution":{"type":"string"},"limitations":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":400}}},"required":["farmId","status","reason","window","polygonBasis","polygonPixels","smallField","imageBbox","scenesListed","scenesAnalysed","scenesPending","scenesFailed","readings","latestUsable","method","attribution","limitations"],"additionalProperties":false},"health":{"nullable":true,"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"ndviMean":{"type":"number"},"neighbourhoodMean":{"nullable":true,"type":"number"},"typicalRange":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"verdict":{"type":"string","enum":["above_typical","near_typical","below_typical","no_reference"]},"clearFraction":{"type":"number"},"basis":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}},"required":["date","ndviMean","neighbourhoodMean","typicalRange","verdict","clearFraction","basis"],"additionalProperties":false},"priceTrack":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"kind":{"type":"string","enum":["observed","reference"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["INR/kg"]}},"required":["date","kind","p50","range","unit"],"additionalProperties":false}},"harvestPrice":{"nullable":true,"type":"object","properties":{"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"status":{"type":"string","enum":["available","insufficient"]},"reason":{"nullable":true,"type":"string","maxLength":80},"scopeLabel":{"type":"string","maxLength":160}},"required":["p50","range","status","reason","scopeLabel"],"additionalProperties":false},"weatherTrack":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"kind":{"type":"string","enum":["observed","forecast","typical","unavailable"]},"rainMm":{"nullable":true,"type":"number"},"tMinC":{"nullable":true,"type":"number"},"tMaxC":{"nullable":true,"type":"number"},"basis":{"type":"object","properties":{"source":{"type":"string","maxLength":120},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"years":{"nullable":true,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["source","issuedAt","years"],"additionalProperties":false},"agro":{"type":"object","properties":{"et0Mm":{"nullable":true,"type":"number"},"rhMeanPct":{"nullable":true,"type":"number"},"rhMinPct":{"nullable":true,"type":"number"},"rhMaxPct":{"nullable":true,"type":"number"},"dewPointC":{"nullable":true,"type":"number"},"vpdMaxKpa":{"nullable":true,"type":"number"},"windMaxKmh":{"nullable":true,"type":"number"},"gustMaxKmh":{"nullable":true,"type":"number"},"soilMoisture0to7":{"nullable":true,"type":"number"},"soilTemp0to7C":{"nullable":true,"type":"number"},"leafWetnessPct":{"nullable":true,"type":"number"},"sunshineHours":{"nullable":true,"type":"number"},"rainHours":{"nullable":true,"type":"number"},"rainProbabilityPct":{"nullable":true,"type":"number"},"basis":{"type":"string","enum":["grid_model_estimate"]}},"required":["et0Mm","rhMeanPct","rhMinPct","rhMaxPct","dewPointC","vpdMaxKpa","windMaxKmh","gustMaxKmh","soilMoisture0to7","soilTemp0to7C","leafWetnessPct","sunshineHours","rainHours","rainProbabilityPct","basis"],"additionalProperties":false}},"required":["date","kind","rainMm","tMinC","tMaxC","basis"],"additionalProperties":false}},"alerts":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string","enum":["weather","price","market_event","crop_threat","satellite"]},"severity":{"type":"string","enum":["info","watch","warning"]},"origin":{"type":"string","enum":["rule","grounded_review"]},"title":{"type":"string","minLength":1,"maxLength":120},"detail":{"type":"string","minLength":1,"maxLength":600},"source":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","format":"uri"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["name","url","date"],"additionalProperties":false},"validFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"validTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"suggestedStep":{"nullable":true,"type":"string","maxLength":300},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"fieldId":{"type":"string","minLength":1,"maxLength":120},"scope":{"type":"string","enum":["field","farm"]}},"required":["id","farmId","type","severity","origin","title","detail","source","validFrom","validTo","suggestedStep","createdAt"],"additionalProperties":false}},"newsReview":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["active","paused","not_run","unavailable"]},"reason":{"nullable":true,"type":"string"},"lastReviewedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["status","reason","lastReviewedAt"],"additionalProperties":false},"imdStatus":{"type":"string","enum":["not_connected"]},"upcoming":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":160},"kind":{"type":"string","enum":["care_task","stage_transition","alert_step","stage_check","field_check"]},"title":{"type":"string","maxLength":160},"detail":{"nullable":true,"type":"string","maxLength":1000},"dueFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dueTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["upcoming","due","overdue","completed"]},"careTask":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"cycleId":{"type":"string"},"cropId":{"type":"string"},"title":{"type":"string"},"action":{"type":"string"},"anchor":{"type":"string"},"geographyIds":{"type":"array","items":{"type":"string"}},"dueFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dueTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"conditions":{"type":"array","items":{"type":"string"}},"sourceRefs":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"locator":{"type":"string"}},"required":["sourceId","locator"],"additionalProperties":false}},"status":{"type":"string","enum":["upcoming","due","overdue","completed"]},"completedOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"evidenceState":{"type":"string","enum":["source_schedule"]}},"required":["id","actionId","cycleId","cropId","title","action","anchor","dueFrom","dueTo","conditions","sourceRefs","status","completedOn","journalEntryId","evidenceState"],"additionalProperties":false},"alertId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldCheck":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":160},"reason":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["interval","recheck","condition"]},"fieldId":{"nullable":true,"type":"string"},"cycleId":{"nullable":true,"type":"string"},"issueId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cropName":{"nullable":true,"type":"string"},"dueFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dueTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["upcoming","due","overdue","completed"]},"intervalDays":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"checklist":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["risk_window","general"]},"sourceName":{"nullable":true,"type":"string","maxLength":200},"sourceUrl":{"nullable":true,"type":"string"},"sourceDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"alertId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["text","kind","sourceName","sourceUrl","sourceDate","alertId"],"additionalProperties":false}},"completedOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scope":{"type":"string","enum":["field","farm"]},"missedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","kind","fieldId","cycleId","issueId","cropName","dueFrom","dueTo","status","intervalDays","checklist","completedOn","journalEntryId","scope"],"additionalProperties":false},"issueId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id","kind","title","detail","dueFrom","dueTo","status","careTask","alertId"],"additionalProperties":false}},"nextAction":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":160},"kind":{"type":"string","enum":["care_task","stage_transition","alert_step","stage_check","field_check"]},"title":{"type":"string","maxLength":160},"detail":{"nullable":true,"type":"string","maxLength":1000},"dueFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dueTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["upcoming","due","overdue","completed"]},"careTask":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"cycleId":{"type":"string"},"cropId":{"type":"string"},"title":{"type":"string"},"action":{"type":"string"},"anchor":{"type":"string"},"geographyIds":{"type":"array","items":{"type":"string"}},"dueFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dueTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"conditions":{"type":"array","items":{"type":"string"}},"sourceRefs":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"locator":{"type":"string"}},"required":["sourceId","locator"],"additionalProperties":false}},"status":{"type":"string","enum":["upcoming","due","overdue","completed"]},"completedOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"evidenceState":{"type":"string","enum":["source_schedule"]}},"required":["id","actionId","cycleId","cropId","title","action","anchor","dueFrom","dueTo","conditions","sourceRefs","status","completedOn","journalEntryId","evidenceState"],"additionalProperties":false},"alertId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldCheck":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":160},"reason":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["interval","recheck","condition"]},"fieldId":{"nullable":true,"type":"string"},"cycleId":{"nullable":true,"type":"string"},"issueId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cropName":{"nullable":true,"type":"string"},"dueFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dueTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["upcoming","due","overdue","completed"]},"intervalDays":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"checklist":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["risk_window","general"]},"sourceName":{"nullable":true,"type":"string","maxLength":200},"sourceUrl":{"nullable":true,"type":"string"},"sourceDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"alertId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["text","kind","sourceName","sourceUrl","sourceDate","alertId"],"additionalProperties":false}},"completedOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scope":{"type":"string","enum":["field","farm"]},"missedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","kind","fieldId","cycleId","issueId","cropName","dueFrom","dueTo","status","intervalDays","checklist","completedOn","journalEntryId","scope"],"additionalProperties":false},"issueId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id","kind","title","detail","dueFrom","dueTo","status","careTask","alertId"],"additionalProperties":false},"outlookNote":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["ready","pending","unavailable"]},"text":{"nullable":true,"type":"string","maxLength":300},"facts":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":200}},"origin":{"nullable":true,"type":"string","enum":["model","deterministic"]},"generatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false}},"required":["status","text","facts","origin","generatedAt","modelInvocation"],"additionalProperties":false},"indexStage":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient","unavailable"]},"reason":{"nullable":true,"type":"string","maxLength":120},"index":{"type":"string","enum":["ndvi"]},"asOf":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"phase":{"type":"string","enum":["bare","green_up","rising","plateau","falling","harvested","unknown"]},"greenUpDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"peakDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"peakValue":{"nullable":true,"type":"number"},"troughDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"troughValue":{"nullable":true,"type":"number"},"latestSmoothed":{"nullable":true,"type":"number"},"change15d":{"nullable":true,"type":"number"},"noise":{"nullable":true,"type":"number"},"changeThreshold":{"nullable":true,"type":"number"},"readingsUsed":{"type":"integer","minimum":0,"maximum":9007199254740991},"window":{"nullable":true,"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"calendarStage":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","maxLength":80},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["id","name","from","to"],"additionalProperties":false},"agreement":{"type":"string","enum":["consistent","curve_earlier","curve_later","no_calendar","unknown"]},"summary":{"type":"string","maxLength":300},"basis":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false},"limitations":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":400}}},"required":["status","reason","index","asOf","phase","greenUpDate","peakDate","peakValue","troughDate","troughValue","latestSmoothed","change15d","noise","changeThreshold","readingsUsed","window","calendarStage","agreement","summary","basis","limitations"],"additionalProperties":false},"harvestEconomics":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","partial","unavailable"]},"reason":{"nullable":true,"type":"string","maxLength":120},"harvest":{"nullable":true,"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"harvestDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"fieldAreaHa":{"nullable":true,"type":"number"},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"yieldForFieldKg":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"keepFraction":{"type":"number","minimum":0,"maximum":1},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"likely":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"scopeLabel":{"type":"string","maxLength":160}},"required":["status","unit","p50","likely","scopeLabel"],"additionalProperties":false},"cost":{"nullable":true,"type":"object","properties":{"a2flPerHa":{"nullable":true,"type":"number"},"c2PerHa":{"nullable":true,"type":"number"},"reportedPerHa":{"nullable":true,"type":"number","minimum":0},"authority":{"nullable":true,"type":"string","enum":["cacp","des","sau","other"]},"year":{"nullable":true,"type":"string","maxLength":20},"region":{"nullable":true,"type":"string","maxLength":40}},"required":["a2flPerHa","c2PerHa","authority","year","region"],"additionalProperties":false},"revenuePerHa":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"revenueForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitPerHa":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"basis":{"maxItems":14,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}},"limitations":{"maxItems":12,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["status","reason","harvest","harvestDate","fieldAreaHa","yieldKgPerHa","yieldBasis","yieldForFieldKg","keepFraction","price","cost","revenuePerHa","revenueForField","profitPerHa","profitForField","basis","limitations"],"additionalProperties":false},"residueIncome":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","unavailable"]},"reason":{"nullable":true,"type":"string","maxLength":120},"residueName":{"nullable":true,"type":"string","maxLength":80},"residueToProductRatio":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"residueForFieldKg":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"surplusFraction":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"surplusForFieldKg":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"options":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"use":{"type":"string","enum":["cbg_feedstock","dry_fodder","biomass_fuel","mushroom_substrate","soil_incorporation","other"]},"label":{"type":"string","maxLength":80},"quantityKg":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"priceInrPerTonne":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"priceBasis":{"nullable":true,"type":"string","maxLength":240},"incomeForField":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"note":{"nullable":true,"type":"string","maxLength":1000},"sourceIds":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":80}}},"required":["use","label","quantityKg","priceInrPerTonne","priceBasis","incomeForField","note","sourceIds"],"additionalProperties":false}},"basis":{"maxItems":14,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}},"limitations":{"maxItems":12,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["status","reason","residueName","residueToProductRatio","residueForFieldKg","surplusFraction","surplusForFieldKg","options","basis","limitations"],"additionalProperties":false},"energyFootprint":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","partial","unavailable"]},"reason":{"nullable":true,"type":"string","maxLength":120},"inputEnergyGJPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"inputEnergyGJForField":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"inputEnergyBasis":{"nullable":true,"type":"string","maxLength":240},"inputBreakdown":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"item":{"type":"string","maxLength":60},"share":{"type":"number","minimum":0,"maximum":1}},"required":["item","share"],"additionalProperties":false}},"calorificValueMJPerKg":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"residueEnergyGJForField":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"equivalents":{"maxItems":4,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":80},"amount":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","maxLength":30},"sourceIds":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":80}}},"required":["label","amount","unit","sourceIds"],"additionalProperties":false}},"basis":{"maxItems":14,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}},"limitations":{"maxItems":12,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["status","reason","inputEnergyGJPerHa","inputEnergyGJForField","inputEnergyBasis","inputBreakdown","calorificValueMJPerKg","residueEnergyGJForField","equivalents","basis","limitations"],"additionalProperties":false},"carbonFootprint":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","partial","unavailable"]},"reason":{"nullable":true,"type":"string","maxLength":120},"fieldAreaHa":{"nullable":true,"type":"number"},"seasonDays":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"emissionsForField":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"emissionsPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"terms":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["rice_methane","fertiliser_n2o","fertiliser_manufacture","fuel_and_machinery","residue_burning","residue_carbon","other"]},"label":{"type":"string","maxLength":80},"tCO2eForField":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"tCO2ePerHa":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"method":{"type":"string","maxLength":400},"kind":{"type":"string","enum":["baseline","scenario"]},"sourceIds":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":80}}},"required":["source","label","tCO2eForField","tCO2ePerHa","method","kind","sourceIds"],"additionalProperties":false}},"residueScenarios":{"maxItems":4,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["burn","incorporate","sell_cbg","sell_fodder"]},"label":{"type":"string","maxLength":80},"netForField":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"note":{"type":"string","maxLength":1000}},"required":["id","label","netForField","note"],"additionalProperties":false}},"comparison":{"nullable":true,"type":"object","properties":{"rank":{"type":"integer","minimum":1,"maximum":9007199254740991},"of":{"type":"integer","minimum":1,"maximum":9007199254740991},"lowest":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"tCO2eForField":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["cropId","cropName","tCO2eForField"],"additionalProperties":false},"highest":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"tCO2eForField":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["cropId","cropName","tCO2eForField"],"additionalProperties":false}},"required":["rank","of","lowest","highest"],"additionalProperties":false},"gwp":{"nullable":true,"type":"object","properties":{"ch4":{"type":"number"},"n2o":{"type":"number"},"basis":{"type":"string","maxLength":160}},"required":["ch4","n2o","basis"],"additionalProperties":false},"summary":{"type":"string","maxLength":300},"basis":{"maxItems":14,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}},"limitations":{"maxItems":12,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["status","reason","fieldAreaHa","seasonDays","emissionsForField","emissionsPerHa","terms","residueScenarios","comparison","gwp","summary","basis","limitations"],"additionalProperties":false},"overview":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["ready","pending","unavailable"]},"headline":{"nullable":true,"type":"string","maxLength":160},"points":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["do_now","watch","money","later","good_news"]},"text":{"type":"string","maxLength":240},"factIds":{"maxItems":6,"type":"array","items":{"type":"string","maxLength":40}},"ref":{"nullable":true,"type":"object","properties":{"kind":{"type":"string","enum":["step","alert","card"]},"id":{"type":"string","maxLength":160}},"required":["kind","id"],"additionalProperties":false}},"required":["kind","text","factIds","ref"],"additionalProperties":false}},"facts":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"text":{"type":"string","maxLength":240},"ref":{"nullable":true,"type":"object","properties":{"kind":{"type":"string","enum":["step","alert","card"]},"id":{"type":"string","maxLength":160}},"required":["kind","id"],"additionalProperties":false}},"required":["id","text","ref"],"additionalProperties":false}},"origin":{"nullable":true,"type":"string","enum":["model","deterministic"]},"generatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false}},"required":["status","headline","points","facts","origin","generatedAt","modelInvocation"],"additionalProperties":false},"conditions":{"nullable":true,"type":"object","properties":{"points":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"kind":{"type":"string","enum":["observed","forecast","typical","unavailable"]},"rain":{"type":"object","properties":{"mm":{"nullable":true,"type":"number"},"class":{"type":"string","enum":["none","very_light","light","moderate","heavy","very_heavy","extremely_heavy","unknown"]}},"required":["mm","class"],"additionalProperties":false},"water":{"type":"object","properties":{"state":{"type":"string","enum":["dry","moist","ponded","flooded","unknown"]},"basis":{"type":"string","enum":["crop_practice","rain_rule","model_soil_moisture","none"]},"soilMoisture0to7":{"nullable":true,"type":"number"}},"required":["state","basis"],"additionalProperties":false},"heat":{"type":"object","properties":{"tMaxC":{"nullable":true,"type":"number"},"stress":{"type":"boolean"},"thresholdC":{"nullable":true,"type":"number"}},"required":["tMaxC","stress","thresholdC"],"additionalProperties":false},"pressure":{"type":"object","properties":{"wetness":{"type":"string","enum":["high","moderate","low","unknown"]},"leafWetnessPct":{"nullable":true,"type":"number"},"rhMeanPct":{"nullable":true,"type":"number"},"vpdMaxKpa":{"nullable":true,"type":"number"},"gustMaxKmh":{"nullable":true,"type":"number"},"basis":{"type":"string","enum":["sourced_threshold","engine_assumption","none"]}},"required":["wetness","leafWetnessPct","rhMeanPct","vpdMaxKpa","gustMaxKmh","basis"],"additionalProperties":false},"greenness":{"type":"object","properties":{"ndvi":{"nullable":true,"type":"number"},"verdict":{"nullable":true,"type":"string","enum":["above_typical","near_typical","below_typical","no_reference"]},"observedOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"daysSince":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["ndvi","verdict","observedOn","daysSince"],"additionalProperties":false},"events":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"alertId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string","maxLength":40},"severity":{"type":"string","enum":["info","watch","warning"]},"title":{"type":"string","maxLength":160}},"required":["alertId","type","severity","title"],"additionalProperties":false}},"stage":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":80},"progress":{"type":"number","minimum":0,"maximum":1}},"required":["id","name","progress"],"additionalProperties":false}},"required":["date","kind","rain","water","heat","greenness","events","stage"],"additionalProperties":false}},"basis":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}},"limitations":{"maxItems":12,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["points","basis","limitations"],"additionalProperties":false},"fieldImageBbox":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"minItems":4,"maxItems":4},"monitoring":{"type":"object","properties":{"enabled":{"type":"boolean"},"lastCheckedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"nextCheckAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["enabled","lastCheckedAt","nextCheckAt"],"additionalProperties":false},"field":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":120},"name":{"type":"string","maxLength":80},"areaHa":{"type":"number","minimum":0}},"required":["id","name","areaHa"],"additionalProperties":false},"fields":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":120},"name":{"type":"string","maxLength":80},"areaHa":{"type":"number","minimum":0},"boundary":{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"cycle":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"companion":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120}},"required":["cropId","cropName"],"additionalProperties":false},"establishmentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"stage":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":80},"progress":{"type":"number","minimum":0,"maximum":1}},"required":["id","name","progress"],"additionalProperties":false},"daysToHarvest":{"nullable":true,"type":"object","properties":{"earliest":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"latest":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["earliest","latest"],"additionalProperties":false}},"required":["id","cropId","cropName","companion","establishmentDate","stage","daysToHarvest"],"additionalProperties":false},"greenness":{"nullable":true,"type":"object","properties":{"ndvi":{"type":"number"},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"verdict":{"type":"string","enum":["above_typical","near_typical","below_typical","no_reference"]}},"required":["ndvi","observedOn","verdict"],"additionalProperties":false},"alertCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","name","areaHa","boundary","cycle","greenness","alertCount"],"additionalProperties":false}},"farmBoundary":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"minItems":1,"maxItems":1,"type":"array","items":{"minItems":4,"maxItems":201,"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"predictions":{"nullable":true,"type":"object","properties":{"autoRequested":{"type":"boolean"},"pending":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["autoRequested","pending","reason"],"additionalProperties":false},"issues":{"type":"object","properties":{"open":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"treating":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"latest":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"category":{"type":"string","enum":["pest","disease","weed","water_stress","nutrient","weather_damage","animal_damage","other"]},"severity":{"type":"string","enum":["low","medium","high"]},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]},"title":{"type":"string","minLength":1,"maxLength":120},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"}},"required":["id","category","severity","status","title","observedOn"],"additionalProperties":false}}},"required":["open","treating","latest"],"additionalProperties":false},"limitations":{"type":"array","items":{"type":"string","maxLength":1000}}},"required":["farmId","asOf","today","cycle","product","timeline","slider","daysToHarvest","scenes","ndvi","health","priceTrack","harvestPrice","weatherTrack","alerts","newsReview","imdStatus","upcoming","monitoring","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/ndvi":{"get":{"tags":["farms"],"parameters":[{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"to","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["available","unavailable"]},"reason":{"nullable":true,"type":"string","maxLength":80},"window":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"polygonBasis":{"nullable":true,"type":"string","enum":["boundary","farm_point_square"]},"polygonPixels":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"smallField":{"type":"boolean"},"imageBbox":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"minItems":4,"maxItems":4},"scenesListed":{"type":"integer","minimum":0,"maximum":9007199254740991},"scenesAnalysed":{"type":"integer","minimum":0,"maximum":9007199254740991},"scenesPending":{"type":"integer","minimum":0,"maximum":9007199254740991},"scenesFailed":{"type":"integer","minimum":0,"maximum":9007199254740991},"readings":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,128}$"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"acquiredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"tileId":{"nullable":true,"type":"string","maxLength":16},"baseline":{"nullable":true,"type":"string","maxLength":16},"offsetApplied":{"type":"boolean"},"sceneCloudPct":{"nullable":true,"type":"number","minimum":0,"maximum":100},"usable":{"type":"boolean"},"field":{"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"median":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p10":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p90":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"clearPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"clearFraction":{"type":"number","minimum":0,"maximum":1},"cloudOrShadowFraction":{"type":"number","minimum":0,"maximum":1},"b04P95":{"nullable":true,"type":"number","minimum":0},"usable":{"type":"boolean"},"rejection":{"nullable":true,"type":"string","enum":["no_pixels","implausible_band_values","insufficient_clear_pixels","low_clear_fraction"]},"indices":{"type":"object","properties":{"evi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndre":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"gndvi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"savi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndmi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"lswi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndwi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false}},"required":["evi","ndre","gndvi","savi","ndmi","lswi","ndwi"],"additionalProperties":false}},"required":["mean","median","p10","p90","clearPixels","totalPixels","clearFraction","cloudOrShadowFraction","b04P95","usable","rejection"],"additionalProperties":false},"neighbourhood":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"median":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p10":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p90":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"clearPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"clearFraction":{"type":"number","minimum":0,"maximum":1},"cloudOrShadowFraction":{"type":"number","minimum":0,"maximum":1},"b04P95":{"nullable":true,"type":"number","minimum":0},"usable":{"type":"boolean"},"rejection":{"nullable":true,"type":"string","enum":["no_pixels","implausible_band_values","insufficient_clear_pixels","low_clear_fraction"]},"indices":{"type":"object","properties":{"evi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndre":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"gndvi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"savi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndmi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"lswi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndwi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false}},"required":["evi","ndre","gndvi","savi","ndmi","lswi","ndwi"],"additionalProperties":false}},"required":["mean","median","p10","p90","clearPixels","totalPixels","clearFraction","cloudOrShadowFraction","b04P95","usable","rejection"],"additionalProperties":false}},"required":["itemId","date","acquiredAt","tileId","baseline","offsetApplied","sceneCloudPct","usable","field","neighbourhood"],"additionalProperties":false}},"latestUsable":{"nullable":true,"type":"object","properties":{"itemId":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,128}$"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"acquiredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"tileId":{"nullable":true,"type":"string","maxLength":16},"baseline":{"nullable":true,"type":"string","maxLength":16},"offsetApplied":{"type":"boolean"},"sceneCloudPct":{"nullable":true,"type":"number","minimum":0,"maximum":100},"usable":{"type":"boolean"},"field":{"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"median":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p10":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p90":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"clearPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"clearFraction":{"type":"number","minimum":0,"maximum":1},"cloudOrShadowFraction":{"type":"number","minimum":0,"maximum":1},"b04P95":{"nullable":true,"type":"number","minimum":0},"usable":{"type":"boolean"},"rejection":{"nullable":true,"type":"string","enum":["no_pixels","implausible_band_values","insufficient_clear_pixels","low_clear_fraction"]},"indices":{"type":"object","properties":{"evi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndre":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"gndvi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"savi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndmi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"lswi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndwi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false}},"required":["evi","ndre","gndvi","savi","ndmi","lswi","ndwi"],"additionalProperties":false}},"required":["mean","median","p10","p90","clearPixels","totalPixels","clearFraction","cloudOrShadowFraction","b04P95","usable","rejection"],"additionalProperties":false},"neighbourhood":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"median":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p10":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"p90":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"clearPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalPixels":{"type":"integer","minimum":0,"maximum":9007199254740991},"clearFraction":{"type":"number","minimum":0,"maximum":1},"cloudOrShadowFraction":{"type":"number","minimum":0,"maximum":1},"b04P95":{"nullable":true,"type":"number","minimum":0},"usable":{"type":"boolean"},"rejection":{"nullable":true,"type":"string","enum":["no_pixels","implausible_band_values","insufficient_clear_pixels","low_clear_fraction"]},"indices":{"type":"object","properties":{"evi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndre":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"gndvi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"savi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndmi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"lswi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false},"ndwi":{"nullable":true,"type":"object","properties":{"mean":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"median":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p10":{"nullable":true,"type":"number","minimum":-2,"maximum":2},"p90":{"nullable":true,"type":"number","minimum":-2,"maximum":2}},"required":["mean","median","p10","p90"],"additionalProperties":false}},"required":["evi","ndre","gndvi","savi","ndmi","lswi","ndwi"],"additionalProperties":false}},"required":["mean","median","p10","p90","clearPixels","totalPixels","clearFraction","cloudOrShadowFraction","b04P95","usable","rejection"],"additionalProperties":false}},"required":["itemId","date","acquiredAt","tileId","baseline","offsetApplied","sceneCloudPct","usable","field","neighbourhood"],"additionalProperties":false},"method":{"type":"object","properties":{"version":{"type":"string"},"indexMethodVersion":{"type":"string"},"sclClassesKept":{"type":"array","items":{"type":"integer","minimum":0,"maximum":11}},"minClearFraction":{"type":"number","minimum":0,"maximum":1},"minClearPixels":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxSceneCloudPct":{"type":"number","minimum":0,"maximum":100}},"required":["version","sclClassesKept","minClearFraction","minClearPixels","maxSceneCloudPct"],"additionalProperties":false},"attribution":{"type":"string"},"limitations":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":400}}},"required":["farmId","status","reason","window","polygonBasis","polygonPixels","smallField","imageBbox","scenesListed","scenesAnalysed","scenesPending","scenesFailed","readings","latestUsable","method","attribution","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/ndvi/{itemId}/image":{"get":{"tags":["farms"],"parameters":[{"schema":{"default":"visual","type":"string","enum":["visual","ndvi"]},"in":"query","name":"kind","required":false},{"schema":{"default":"wide","type":"string","enum":["wide","field"]},"in":"query","name":"zoom","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,128}$"},"in":"path","name":"itemId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api/v1/farms/{id}/alerts":{"get":{"tags":["farms"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"asOf":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"alerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string","enum":["weather","price","market_event","crop_threat","satellite"]},"severity":{"type":"string","enum":["info","watch","warning"]},"origin":{"type":"string","enum":["rule","grounded_review"]},"title":{"type":"string","minLength":1,"maxLength":120},"detail":{"type":"string","minLength":1,"maxLength":600},"source":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","format":"uri"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["name","url","date"],"additionalProperties":false},"validFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"validTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"suggestedStep":{"nullable":true,"type":"string","maxLength":300},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"fieldId":{"type":"string","minLength":1,"maxLength":120},"scope":{"type":"string","enum":["field","farm"]}},"required":["id","farmId","type","severity","origin","title","detail","source","validFrom","validTo","suggestedStep","createdAt"],"additionalProperties":false}},"imdStatus":{"type":"string","enum":["not_connected"]},"newsReview":{"type":"object","properties":{"status":{"type":"string","enum":["active","paused","not_run","unavailable"]},"reason":{"nullable":true,"type":"string"},"lastReviewedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["status","reason","lastReviewedAt"],"additionalProperties":false},"limitations":{"type":"array","items":{"type":"string"}}},"required":["farmId","asOf","alerts","imdStatus","newsReview","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/alerts/{alertId}/dismiss":{"post":{"tags":["farms"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"alertId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string","enum":["weather","price","market_event","crop_threat","satellite"]},"severity":{"type":"string","enum":["info","watch","warning"]},"origin":{"type":"string","enum":["rule","grounded_review"]},"title":{"type":"string","minLength":1,"maxLength":120},"detail":{"type":"string","minLength":1,"maxLength":600},"source":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","format":"uri"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["name","url","date"],"additionalProperties":false},"validFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"validTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"suggestedStep":{"nullable":true,"type":"string","maxLength":300},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"fieldId":{"type":"string","minLength":1,"maxLength":120},"scope":{"type":"string","enum":["field","farm"]}},"required":["id","farmId","type","severity","origin","title","detail","source","validFrom","validTo","suggestedStep","createdAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/stage-timeline":{"get":{"tags":["farms"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"cycleId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cycleId":{"nullable":true,"type":"string"},"timeline":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string"},"productId":{"nullable":true,"type":"string"},"establishmentMethod":{"nullable":true,"type":"string"},"anchorDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"stages":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","maxLength":80},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"basis":{"type":"string","enum":["sourced","fao_generic","estimate"]}},"required":["id","name","from","to","basis"],"additionalProperties":false}},"harvest":{"nullable":true,"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"basis":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}},"required":["cropId","productId","establishmentMethod","anchorDate","stages","harvest","basis"],"additionalProperties":false},"limitations":{"type":"array","items":{"type":"string"}}},"required":["farmId","cycleId","timeline","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/weather-track":{"get":{"tags":["farms"],"parameters":[{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"from","required":true},{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"to","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"pointBasis":{"type":"string","enum":["boundary_centroid","farm_point","none"]},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"kind":{"type":"string","enum":["observed","forecast","typical","unavailable"]},"rainMm":{"nullable":true,"type":"number"},"tMinC":{"nullable":true,"type":"number"},"tMaxC":{"nullable":true,"type":"number"},"basis":{"type":"object","properties":{"source":{"nullable":true,"type":"string"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"years":{"nullable":true,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["source","issuedAt","years"],"additionalProperties":false},"agro":{"type":"object","properties":{"et0Mm":{"nullable":true,"type":"number"},"rhMeanPct":{"nullable":true,"type":"number"},"rhMinPct":{"nullable":true,"type":"number"},"rhMaxPct":{"nullable":true,"type":"number"},"dewPointC":{"nullable":true,"type":"number"},"vpdMaxKpa":{"nullable":true,"type":"number"},"windMaxKmh":{"nullable":true,"type":"number"},"gustMaxKmh":{"nullable":true,"type":"number"},"soilMoisture0to7":{"nullable":true,"type":"number"},"soilTemp0to7C":{"nullable":true,"type":"number"},"leafWetnessPct":{"nullable":true,"type":"number"},"sunshineHours":{"nullable":true,"type":"number"},"rainHours":{"nullable":true,"type":"number"},"rainProbabilityPct":{"nullable":true,"type":"number"},"basis":{"type":"string","enum":["grid_model_estimate"]}},"required":["et0Mm","rhMeanPct","rhMinPct","rhMaxPct","dewPointC","vpdMaxKpa","windMaxKmh","gustMaxKmh","soilMoisture0to7","soilTemp0to7C","leafWetnessPct","sunshineHours","rainHours","rainProbabilityPct","basis"],"additionalProperties":false}},"required":["date","kind","rainMm","tMinC","tMaxC","basis"],"additionalProperties":false}},"forecastHorizonEnd":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"limitations":{"type":"array","items":{"type":"string"}}},"required":["farmId","pointBasis","days","forecastHorizonEnd","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/ndvi/{itemId}/future":{"post":{"tags":["farms"],"description":"Requests a generated look made by editing the latest usable satellite scene (only inside the field outline), live mode only. kind=stage (default; stageId query required): a typical look of a current or future stage, at most once per stage per crop cycle. kind=gap (2026-11-03; targetDate body field required): the AI-predicted look of the field on a date after the latest real scene and at most 120 days after today, at most one per crop cycle per calendar week (stored on the week start). Both are code-guided (calendar stage, satellite curve, conditions) and never observations; FUTURE_LOOK_DAILY_LIMIT per crop cycle in a rolling 24 hours (default 24; 0 disables the cap). regenerate=true (gap only, 2026-11-04) replaces the existing ready look of that week with a new one from the latest scene (the per-cycle daily cap still applies; a look already queued or running is returned as deduplicated). 202 while queued or running, 200 when the existing look is ready, failed or unavailable (synthetic/replay mode, no model key, cycle limit).","requestBody":{"required":true,"content":{"application/json":{"schema":{"nullable":true,"type":"object","properties":{"kind":{"default":"stage","type":"string","enum":["stage","gap","journey"]},"targetDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"regenerate":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80},"in":"query","name":"stageId","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"cycleId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,128}$"},"in":"path","name":"itemId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"assetId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable"]},"reason":{"nullable":true,"type":"string","maxLength":80},"cycleId":{"nullable":true,"type":"string","maxLength":120},"stageId":{"type":"string","maxLength":80},"deduplicated":{"type":"boolean"},"kind":{"type":"string","enum":["stage","gap","journey"]},"targetDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["assetId","status","reason","cycleId","stageId","deduplicated"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"assetId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable"]},"reason":{"nullable":true,"type":"string","maxLength":80},"cycleId":{"nullable":true,"type":"string","maxLength":120},"stageId":{"type":"string","maxLength":80},"deduplicated":{"type":"boolean"},"kind":{"type":"string","enum":["stage","gap","journey"]},"targetDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["assetId","status","reason","cycleId","stageId","deduplicated"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/future-look/{assetId}":{"get":{"tags":["farms"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"assetId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"assetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cycleId":{"type":"string"},"stageId":{"type":"string"},"stageName":{"type":"string"},"cropId":{"type":"string"},"cropName":{"type":"string"},"sourceItemId":{"type":"string"},"sourceAcquiredAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"derivedFromDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable"]},"failureReason":{"nullable":true,"type":"string"},"label":{"type":"string"},"disclaimer":{"type":"string"},"imagePath":{"nullable":true,"type":"string"},"qa":{"nullable":true,"type":"object","properties":{"version":{"type":"string"},"passed":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"string","enum":["output_undecodable","aspect_mismatch","outside_region_too_small","scene_changed_outside_field"]}},"scores":{"type":"object","properties":{"outsideChannelMad":{"nullable":true,"type":"object","properties":{"r":{"type":"number"},"g":{"type":"number"},"b":{"type":"number"}},"required":["r","g","b"],"additionalProperties":false},"outsideMaxChannelMad":{"nullable":true,"type":"number"},"insideMeanAbsDiff":{"nullable":true,"type":"number"},"outsideFraction":{"nullable":true,"type":"number"},"aspectError":{"nullable":true,"type":"number"},"outputWidth":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outputHeight":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["outsideChannelMad","outsideMaxChannelMad","insideMeanAbsDiff","outsideFraction","aspectError","outputWidth","outputHeight"],"additionalProperties":false},"thresholds":{"type":"object","properties":{"outsideChannelMadMax":{"type":"number"},"boundaryMarginPx":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"aspectTolerance":{"type":"number"},"minOutsideFraction":{"type":"number"},"grid":{"type":"string"}},"required":["outsideChannelMadMax","boundaryMarginPx","aspectTolerance","minOutsideFraction","grid"],"additionalProperties":false}},"required":["version","passed","reasons","scores","thresholds"],"additionalProperties":false},"model":{"nullable":true,"type":"string"},"responseDeleted":{"nullable":true,"type":"boolean"},"promptVersion":{"type":"string"},"attempt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"kind":{"type":"string","enum":["stage","gap","journey"]},"targetDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"guidance":{"nullable":true,"type":"string","maxLength":400},"journeyId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["assetId","farmId","cycleId","stageId","stageName","cropId","cropName","sourceItemId","sourceAcquiredAt","derivedFromDate","status","failureReason","label","disclaimer","imagePath","qa","model","responseDeleted","promptVersion","attempt","kind","targetDate","guidance","createdAt","updatedAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/future-look/{assetId}/image":{"get":{"tags":["farms"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"in":"query","name":"v","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"assetId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api/v1/price-series":{"get":{"tags":["market"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"in":"query","name":"productId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"stateName","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"districtName","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"state","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"district","required":false},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"marketIds","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":true},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":true},{"schema":{"default":"month","type":"string","enum":["week","month"]},"in":"query","name":"bucket","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"asOf","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"productId":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["available","insufficient"]},"missingReason":{"nullable":true,"type":"string","enum":["price_history_not_ingested","price_history_insufficient","market_not_in_history","price_residuals_insufficient","price_interval_crossing"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"requestedLevel":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"marketIds":{"type":"array","items":{"type":"string"}},"fallbackNote":{"nullable":true,"type":"string","maxLength":1000}},"required":["level","requestedLevel","stateName","districtName","marketCount","marketIds","fallbackNote"],"additionalProperties":false},"unit":{"type":"string","enum":["INR/kg"]},"priceBasis":{"type":"string","enum":["wholesale_mandi_modal"]},"basisLabel":{"type":"string","maxLength":1000},"limitations":{"type":"array","items":{"type":"string","maxLength":1000}},"bucket":{"type":"string","enum":["week","month"]},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"buckets":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"end":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"p50":{"nullable":true,"type":"number","minimum":0},"min":{"nullable":true,"type":"number","minimum":0},"max":{"nullable":true,"type":"number","minimum":0},"n":{"type":"integer","minimum":0,"maximum":9007199254740991},"markets":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["start","end","p50","min","max","n","markets"],"additionalProperties":false}},"coverage":{"type":"object","properties":{"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"markets":{"type":"integer","minimum":0,"maximum":9007199254740991},"firstDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"lastDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"validDays":{"type":"integer","minimum":0,"maximum":9007199254740991},"excludedRows":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["observations","markets","firstDate","lastDate","validDays","excludedRows"],"additionalProperties":false},"gaps":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false}}},"required":["productId","status","missingReason","scope","unit","priceBasis","basisLabel","limitations","bucket","from","to","buckets","coverage","gaps"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/price-outlook":{"get":{"tags":["market"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"in":"query","name":"productId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"stateName","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"districtName","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"state","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"district","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"harvestDate","required":true},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"asOf","required":false},{"schema":{"default":2,"type":"integer","minimum":0,"maximum":4},"in":"query","name":"weekWindow","required":false},{"schema":{"default":3,"type":"integer","minimum":2,"maximum":6},"in":"query","name":"years","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"productId":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["available","insufficient"]},"missingReason":{"nullable":true,"type":"string","enum":["price_history_not_ingested","price_history_insufficient","market_not_in_history","price_residuals_insufficient","price_interval_crossing"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"requestedLevel":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"marketIds":{"type":"array","items":{"type":"string"}},"fallbackNote":{"nullable":true,"type":"string","maxLength":1000}},"required":["level","requestedLevel","stateName","districtName","marketCount","marketIds","fallbackNote"],"additionalProperties":false},"unit":{"type":"string","enum":["INR/kg"]},"priceBasis":{"type":"string","enum":["wholesale_mandi_modal"]},"basisLabel":{"type":"string","maxLength":1000},"limitations":{"type":"array","items":{"type":"string","maxLength":1000}},"method":{"type":"string","enum":["B_seasonal_reference/pooled-v1"]},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvestWeek":{"type":"object","properties":{"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"week":{"type":"integer","minimum":1,"maximum":53}},"required":["year","week"],"additionalProperties":false},"asOf":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"weekWindow":{"type":"integer","minimum":0,"maximum":8},"yearsRequested":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"yearsConsidered":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"perYear":{"type":"array","items":{"type":"object","properties":{"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"weeks":{"type":"integer","minimum":0,"maximum":9007199254740991},"median":{"type":"number","minimum":0}},"required":["year","weeks","median"],"additionalProperties":false}},"p10":{"nullable":true,"type":"number","minimum":0},"p25":{"nullable":true,"type":"number","minimum":0},"p50":{"nullable":true,"type":"number","minimum":0},"p75":{"nullable":true,"type":"number","minimum":0},"p90":{"nullable":true,"type":"number","minimum":0},"annualMean":{"nullable":true,"type":"number","minimum":0},"annualWeeks":{"type":"integer","minimum":0,"maximum":9007199254740991},"weeksUsed":{"type":"integer","minimum":0,"maximum":9007199254740991},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"marketsUsed":{"type":"integer","minimum":0,"maximum":9007199254740991},"residualCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["productId","status","missingReason","scope","unit","priceBasis","basisLabel","limitations","method","harvestDate","harvestWeek","asOf","weekWindow","yearsRequested","yearsConsidered","yearsUsed","perYear","p10","p25","p50","p75","p90","annualMean","annualWeeks","weeksUsed","observations","marketsUsed","residualCount"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/price-trend":{"get":{"tags":["market"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"in":"query","name":"productId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"stateName","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"districtName","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"state","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"district","required":false},{"schema":{"default":36,"type":"integer","minimum":12,"maximum":60},"in":"query","name":"months","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"asOf","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"productId":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["available","insufficient"]},"missingReason":{"nullable":true,"type":"string","enum":["price_history_not_ingested","price_history_insufficient","market_not_in_history","price_residuals_insufficient","price_interval_crossing"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"requestedLevel":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"marketIds":{"type":"array","items":{"type":"string"}},"fallbackNote":{"nullable":true,"type":"string","maxLength":1000}},"required":["level","requestedLevel","stateName","districtName","marketCount","marketIds","fallbackNote"],"additionalProperties":false},"unit":{"type":"string","enum":["INR/kg"]},"priceBasis":{"type":"string","enum":["wholesale_mandi_modal"]},"basisLabel":{"type":"string","maxLength":1000},"limitations":{"type":"array","items":{"type":"string","maxLength":1000}},"months":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"asOf":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"series":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"p50":{"nullable":true,"type":"number","minimum":0},"n":{"type":"integer","minimum":0,"maximum":9007199254740991},"markets":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["month","p50","n","markets"],"additionalProperties":false}},"yoy":{"nullable":true,"type":"object","properties":{"lastMonthsWithData":{"type":"integer","minimum":0,"maximum":9007199254740991},"priorMonthsWithData":{"type":"integer","minimum":0,"maximum":9007199254740991},"pairedMonths":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastMean":{"type":"number","minimum":0},"priorMean":{"type":"number","minimum":0},"changePct":{"type":"number"}},"required":["lastMonthsWithData","priorMonthsWithData","pairedMonths","lastMean","priorMean","changePct"],"additionalProperties":false},"yoyMissingReason":{"nullable":true,"type":"string","maxLength":1000},"coverage":{"type":"object","properties":{"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"markets":{"type":"integer","minimum":0,"maximum":9007199254740991},"firstDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"lastDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"validDays":{"type":"integer","minimum":0,"maximum":9007199254740991},"excludedRows":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["observations","markets","firstDate","lastDate","validDays","excludedRows"],"additionalProperties":false}},"required":["productId","status","missingReason","scope","unit","priceBasis","basisLabel","limitations","months","asOf","from","to","series","yoy","yoyMissingReason","coverage"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/market-timeline":{"get":{"tags":["market"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"in":"query","name":"productId","required":false},{"schema":{"default":36,"type":"integer","minimum":1,"maximum":60},"in":"query","name":"monthsBack","required":false},{"schema":{"default":12,"type":"integer","minimum":0,"maximum":18},"in":"query","name":"monthsAhead","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"productId":{"type":"string","maxLength":200},"productName":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"asOf":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"today":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"todayIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"label":{"type":"string","maxLength":160}},"required":["level","stateName","districtName","marketCount","label"],"additionalProperties":false},"unit":{"type":"string","enum":["INR/kg"]},"forecastHorizonEnd":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvestWindow":{"nullable":true,"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"points":{"maxItems":400,"type":"array","items":{"type":"object","properties":{"weekStart":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"weekEnd":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"isoWeek":{"type":"string","maxLength":10},"price":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["observed"]},"p50":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"n":{"type":"integer","minimum":0,"maximum":9007199254740991},"markets":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","p50","min","max","n","markets"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["reference"]},"p50":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yearsUsed":{"maxItems":6,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","p50","likely","possible","yearsUsed","observations"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["none"]},"reason":{"type":"string","maxLength":80}},"required":["kind","reason"],"additionalProperties":false}]},"weather":{"type":"object","properties":{"kind":{"type":"string","enum":["observed","forecast","typical","unavailable"]},"rainMm":{"nullable":true,"type":"number"},"tMaxC":{"nullable":true,"type":"number"},"tMinC":{"nullable":true,"type":"number"},"days":{"type":"integer","minimum":0,"maximum":7}},"required":["kind","rainMm","tMaxC","tMinC","days"],"additionalProperties":false},"events":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":160},"kind":{"type":"string","enum":["alert","price_move"]},"type":{"nullable":true,"type":"string","enum":["weather","price","market_event","crop_threat","satellite"]},"severity":{"type":"string","enum":["info","watch","warning"]},"title":{"type":"string","maxLength":120},"detail":{"type":"string","maxLength":600},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"source":{"nullable":true,"type":"object","properties":{"name":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"date":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["name","url","date"],"additionalProperties":false},"alertId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dismissed":{"type":"boolean"},"validTo":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["id","kind","type","severity","title","detail","date","source","alertId","dismissed"],"additionalProperties":false}}},"required":["weekStart","weekEnd","isoWeek","price","weather","events"],"additionalProperties":false}},"analogues":{"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"reason":{"nullable":true,"type":"string","maxLength":200},"thisSeason":{"nullable":true,"type":"object","properties":{"cropYear":{"type":"string","maxLength":10},"rainMm":{"nullable":true,"type":"number"},"observedThrough":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"typicalRemainderMm":{"nullable":true,"type":"number"}},"required":["cropYear","rainMm","observedThrough","typicalRemainderMm"],"additionalProperties":false},"years":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"cropYear":{"type":"string","maxLength":10},"rainMm":{"type":"number"},"similarity":{"type":"number","minimum":0,"maximum":1},"pricePath":{"maxItems":60,"type":"array","items":{"type":"object","properties":{"isoWeek":{"type":"integer","minimum":1,"maximum":53},"p50":{"type":"number"}},"required":["isoWeek","p50"],"additionalProperties":false}},"harvestChangePct":{"nullable":true,"type":"number"}},"required":["cropYear","rainMm","similarity","pricePath","harvestChangePct"],"additionalProperties":false}}},"required":["status","reason","thisSeason","years"],"additionalProperties":false},"band":{"type":"object","properties":{"likely":{"type":"string","enum":["p25_p75"]},"possible":{"type":"string","enum":["p10_p90"]}},"required":["likely","possible"],"additionalProperties":false},"limitations":{"type":"array","items":{"type":"string","maxLength":600}}},"required":["farmId","productId","productName","cropName","asOf","today","from","to","todayIndex","scope","unit","forecastHorizonEnd","harvestWindow","points","analogues","band","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/crop-fit":{"get":{"tags":["farms"],"description":"Crop fit v3 (ROUND3_SPEC 5): next and season use the year plan candidates, dates, normaliser and slot scores (next ranks by score less the wait penalty); date scores every pool crop for one sowing date (optional after = previous crop), compared with the confirmed soil markers, and three picks (Meta, or calculated when Meta is unavailable). GET returns the ready review for the current inputs or starts one (status pending) and enqueues farm.crop-fit once; poll GET while pending or running. fieldId (2026-11-03): rank for that field (its crops, saved seasons, year plan and area; its own cached review); absent = the whole farm.","parameters":[{"schema":{"type":"string","enum":["next","season","date"]},"in":"query","name":"mode","required":false},{"schema":{"type":"string","enum":["kharif","rabi","summer"]},"in":"query","name":"season","required":false},{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"sowing","required":false},{"schema":{"type":"string","maxLength":120,"pattern":"^(?:ic:)?[a-z0-9][a-z0-9_.-]{0,119}$"},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"reviewId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jobId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextHash":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["pending","running","ready","unavailable","error"]},"stale":{"type":"boolean"},"request":{"type":"object","properties":{"mode":{"type":"string","enum":["next","season","date"]},"season":{"nullable":true,"type":"string","enum":["kharif","rabi","summer"]},"sowing":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"after":{"nullable":true,"type":"string","maxLength":120}},"required":["mode","season","sowing"],"additionalProperties":false},"resolvedSowing":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"previousCropId":{"nullable":true,"type":"string"},"currentCycleId":{"nullable":true,"type":"string"},"fieldAreaHa":{"nullable":true,"type":"number"},"generatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false},"picks":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"systemId":{"nullable":true,"type":"string","maxLength":120},"rank":{"type":"integer","minimum":1,"maximum":3},"headline":{"type":"string","maxLength":120},"reasons":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":60},"text":{"type":"string","maxLength":160}},"required":["code","text"],"additionalProperties":false}}},"required":["cropId","productId","rank","headline","reasons"],"additionalProperties":false}},"pickOrigin":{"nullable":true,"type":"string","enum":["model","deterministic"]},"candidates":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"establishmentMethod":{"nullable":true,"type":"string","maxLength":80},"kind":{"type":"string","enum":["crop","intercrop"]},"companion":{"nullable":true,"type":"object","properties":{"systemId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"rowRatio":{"type":"string","maxLength":20},"arrangement":{"nullable":true,"type":"string","enum":["row","paired_row","strip","mixed"]},"yieldShare":{"type":"object","properties":{"main":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"companion":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["main","companion"],"additionalProperties":false},"shareBasis":{"type":"string","enum":["sourced","assumed"]},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"costPerHa":{"nullable":true,"type":"number"},"source":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"locator":{"nullable":true,"type":"string","maxLength":200}},"required":["id","title","url","locator"],"additionalProperties":false}},"required":["systemId","cropId","productId","cropName","productName","rowRatio","arrangement","yieldShare","shareBasis","yieldKgPerHa","yieldBasis","price","nitrogenCreditKgPerHa","source"],"additionalProperties":false},"rank":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"score":{"type":"number","minimum":0,"maximum":100},"rankScore":{"type":"number","minimum":0,"maximum":100},"waitDays":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"waitPenalty":{"nullable":true,"type":"number","minimum":0,"maximum":100},"yearPlanLabels":{"maxItems":5,"type":"array","items":{"type":"string","maxLength":60}},"grownBefore":{"nullable":true,"type":"object","properties":{"cycles":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastSowing":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"lastHarvest":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["cycles","lastSowing","lastHarvest"],"additionalProperties":false},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"sowing":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvest":{"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"durationDays":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"occupancy":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"companionHarvest":{"nullable":true,"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"replaces":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"rotationPlanId":{"type":"string","maxLength":160},"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"plannedSowingDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["rotationPlanId","cropId","cropName","plannedSowingDate"],"additionalProperties":false}},"window":{"nullable":true,"type":"object","properties":{"scope":{"type":"string","enum":["district","state"]},"season":{"type":"string","enum":["kharif","rabi","summer"]},"fit":{"type":"number","minimum":0,"maximum":1},"shiftedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["scope","season","fit","shiftedDays"],"additionalProperties":false},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"yieldForFieldKg":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"marketNow":{"nullable":true,"type":"object","properties":{"p50":{"type":"number"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"markets":{"type":"integer","minimum":0,"maximum":9007199254740991},"scopeLabel":{"type":"string","maxLength":160}},"required":["p50","date","markets","scopeLabel"],"additionalProperties":false},"cost":{"nullable":true,"type":"object","properties":{"a2flPerHa":{"nullable":true,"type":"number"},"c2PerHa":{"nullable":true,"type":"number"},"reportedPerHa":{"nullable":true,"type":"number","minimum":0},"authority":{"nullable":true,"type":"string","enum":["cacp","des","sau","other"]},"year":{"nullable":true,"type":"string","maxLength":20},"region":{"nullable":true,"type":"string","maxLength":40}},"required":["a2flPerHa","c2PerHa","authority","year","region"],"additionalProperties":false},"profitPerHa":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"soil":{"type":"object","properties":{"status":{"type":"string","enum":["no_report","compared"]},"checks":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"parameter":{"type":"string","maxLength":60},"label":{"type":"string","maxLength":80},"value":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string","maxLength":30},"rating":{"type":"string","enum":["very_low","low","medium","high","very_high","strongly_acidic","acidic","neutral","alkaline","strongly_alkaline","normal","critical","injurious","deficient","sufficient","unrated"]},"need":{"nullable":true,"type":"string","enum":["low","medium","high"]},"verdict":{"type":"string","enum":["ok","watch","short","unknown"]},"note":{"nullable":true,"type":"string","maxLength":600},"assumption":{"nullable":true,"type":"string","maxLength":300},"markerId":{"nullable":true,"type":"string","maxLength":100},"sampleId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"ratingSource":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"}},"required":["id","title","url"],"additionalProperties":false}},"required":["parameter","label","value","unit","rating","need","verdict","note","assumption","markerId","sampleId","collectionDate","ratingSource"],"additionalProperties":false}}},"required":["status","checks"],"additionalProperties":false},"water":{"type":"object","properties":{"fit":{"type":"number","minimum":0,"maximum":1},"needMm":{"nullable":true,"type":"number"},"rainMm":{"nullable":true,"type":"number"},"verdict":{"type":"string","maxLength":160}},"required":["fit","needMm","rainMm","verdict"],"additionalProperties":false},"rotation":{"type":"object","properties":{"previousCropId":{"nullable":true,"type":"string"},"rule":{"type":"string","maxLength":60},"note":{"nullable":true,"type":"string","maxLength":600}},"required":["previousCropId","rule","note"],"additionalProperties":false},"confidence":{"type":"string","enum":["high","medium","low"]},"reasonCodes":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":60}},"uncertainties":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":600}},"basis":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}}},"required":["cropId","productId","cropName","productName","establishmentMethod","rank","score","components","sowing","harvest","durationDays","window","yieldKgPerHa","yieldBasis","price","marketNow","cost","profitPerHa","profitForField","soil","water","rotation","confidence","reasonCodes","uncertainties","basis"],"additionalProperties":false}},"yearPlanReviewId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"weights":{"type":"object","properties":{"price":{"type":"number","enum":[40]},"yield":{"type":"number","enum":[30]},"soilRotation":{"type":"number","enum":[15]},"water":{"type":"number","enum":[10]},"confidence":{"type":"number","enum":[5]}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"soilReportStatus":{"type":"string","enum":["none","unconfirmed","confirmed"]},"summary":{"type":"string","maxLength":600},"limitations":{"type":"array","items":{"type":"string","maxLength":600}},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"replacePass":{"type":"boolean"}},"required":["reviewId","jobId","contextHash","status","stale","request","resolvedSowing","previousCropId","currentCycleId","fieldAreaHa","generatedAt","modelInvocation","picks","pickOrigin","candidates","weights","soilReportStatus","summary","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"post":{"tags":["farms"],"description":"Crop fit v3 (ROUND3_SPEC 5): next and season use the year plan candidates, dates, normaliser and slot scores (next ranks by score less the wait penalty); date scores every pool crop for one sowing date (optional after = previous crop), compared with the confirmed soil markers, and three picks (Meta, or calculated when Meta is unavailable). GET returns the ready review for the current inputs or starts one (status pending) and enqueues farm.crop-fit once; poll GET while pending or running. fieldId (2026-11-03): rank for that field (its crops, saved seasons, year plan and area; its own cached review); absent = the whole farm. POST with the same query replaces a finished review at once (never one still being built). Body {} or none.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","enum":["next","season","date"]},"in":"query","name":"mode","required":false},{"schema":{"type":"string","enum":["kharif","rabi","summer"]},"in":"query","name":"season","required":false},{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"sowing","required":false},{"schema":{"type":"string","maxLength":120,"pattern":"^(?:ic:)?[a-z0-9][a-z0-9_.-]{0,119}$"},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"reviewId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jobId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextHash":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["pending","running","ready","unavailable","error"]},"stale":{"type":"boolean"},"request":{"type":"object","properties":{"mode":{"type":"string","enum":["next","season","date"]},"season":{"nullable":true,"type":"string","enum":["kharif","rabi","summer"]},"sowing":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"after":{"nullable":true,"type":"string","maxLength":120}},"required":["mode","season","sowing"],"additionalProperties":false},"resolvedSowing":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"previousCropId":{"nullable":true,"type":"string"},"currentCycleId":{"nullable":true,"type":"string"},"fieldAreaHa":{"nullable":true,"type":"number"},"generatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false},"picks":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"systemId":{"nullable":true,"type":"string","maxLength":120},"rank":{"type":"integer","minimum":1,"maximum":3},"headline":{"type":"string","maxLength":120},"reasons":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":60},"text":{"type":"string","maxLength":160}},"required":["code","text"],"additionalProperties":false}}},"required":["cropId","productId","rank","headline","reasons"],"additionalProperties":false}},"pickOrigin":{"nullable":true,"type":"string","enum":["model","deterministic"]},"candidates":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"establishmentMethod":{"nullable":true,"type":"string","maxLength":80},"kind":{"type":"string","enum":["crop","intercrop"]},"companion":{"nullable":true,"type":"object","properties":{"systemId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"rowRatio":{"type":"string","maxLength":20},"arrangement":{"nullable":true,"type":"string","enum":["row","paired_row","strip","mixed"]},"yieldShare":{"type":"object","properties":{"main":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"companion":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["main","companion"],"additionalProperties":false},"shareBasis":{"type":"string","enum":["sourced","assumed"]},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"costPerHa":{"nullable":true,"type":"number"},"source":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"locator":{"nullable":true,"type":"string","maxLength":200}},"required":["id","title","url","locator"],"additionalProperties":false}},"required":["systemId","cropId","productId","cropName","productName","rowRatio","arrangement","yieldShare","shareBasis","yieldKgPerHa","yieldBasis","price","nitrogenCreditKgPerHa","source"],"additionalProperties":false},"rank":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"score":{"type":"number","minimum":0,"maximum":100},"rankScore":{"type":"number","minimum":0,"maximum":100},"waitDays":{"nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"waitPenalty":{"nullable":true,"type":"number","minimum":0,"maximum":100},"yearPlanLabels":{"maxItems":5,"type":"array","items":{"type":"string","maxLength":60}},"grownBefore":{"nullable":true,"type":"object","properties":{"cycles":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastSowing":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"lastHarvest":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["cycles","lastSowing","lastHarvest"],"additionalProperties":false},"components":{"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"sowing":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvest":{"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"durationDays":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"occupancy":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"companionHarvest":{"nullable":true,"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"replaces":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"rotationPlanId":{"type":"string","maxLength":160},"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"plannedSowingDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["rotationPlanId","cropId","cropName","plannedSowingDate"],"additionalProperties":false}},"window":{"nullable":true,"type":"object","properties":{"scope":{"type":"string","enum":["district","state"]},"season":{"type":"string","enum":["kharif","rabi","summer"]},"fit":{"type":"number","minimum":0,"maximum":1},"shiftedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["scope","season","fit","shiftedDays"],"additionalProperties":false},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"yieldForFieldKg":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"marketNow":{"nullable":true,"type":"object","properties":{"p50":{"type":"number"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"markets":{"type":"integer","minimum":0,"maximum":9007199254740991},"scopeLabel":{"type":"string","maxLength":160}},"required":["p50","date","markets","scopeLabel"],"additionalProperties":false},"cost":{"nullable":true,"type":"object","properties":{"a2flPerHa":{"nullable":true,"type":"number"},"c2PerHa":{"nullable":true,"type":"number"},"reportedPerHa":{"nullable":true,"type":"number","minimum":0},"authority":{"nullable":true,"type":"string","enum":["cacp","des","sau","other"]},"year":{"nullable":true,"type":"string","maxLength":20},"region":{"nullable":true,"type":"string","maxLength":40}},"required":["a2flPerHa","c2PerHa","authority","year","region"],"additionalProperties":false},"profitPerHa":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"soil":{"type":"object","properties":{"status":{"type":"string","enum":["no_report","compared"]},"checks":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"parameter":{"type":"string","maxLength":60},"label":{"type":"string","maxLength":80},"value":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string","maxLength":30},"rating":{"type":"string","enum":["very_low","low","medium","high","very_high","strongly_acidic","acidic","neutral","alkaline","strongly_alkaline","normal","critical","injurious","deficient","sufficient","unrated"]},"need":{"nullable":true,"type":"string","enum":["low","medium","high"]},"verdict":{"type":"string","enum":["ok","watch","short","unknown"]},"note":{"nullable":true,"type":"string","maxLength":600},"assumption":{"nullable":true,"type":"string","maxLength":300},"markerId":{"nullable":true,"type":"string","maxLength":100},"sampleId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"ratingSource":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"}},"required":["id","title","url"],"additionalProperties":false}},"required":["parameter","label","value","unit","rating","need","verdict","note","assumption","markerId","sampleId","collectionDate","ratingSource"],"additionalProperties":false}}},"required":["status","checks"],"additionalProperties":false},"water":{"type":"object","properties":{"fit":{"type":"number","minimum":0,"maximum":1},"needMm":{"nullable":true,"type":"number"},"rainMm":{"nullable":true,"type":"number"},"verdict":{"type":"string","maxLength":160}},"required":["fit","needMm","rainMm","verdict"],"additionalProperties":false},"rotation":{"type":"object","properties":{"previousCropId":{"nullable":true,"type":"string"},"rule":{"type":"string","maxLength":60},"note":{"nullable":true,"type":"string","maxLength":600}},"required":["previousCropId","rule","note"],"additionalProperties":false},"confidence":{"type":"string","enum":["high","medium","low"]},"reasonCodes":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":60}},"uncertainties":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":600}},"basis":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}}},"required":["cropId","productId","cropName","productName","establishmentMethod","rank","score","components","sowing","harvest","durationDays","window","yieldKgPerHa","yieldBasis","price","marketNow","cost","profitPerHa","profitForField","soil","water","rotation","confidence","reasonCodes","uncertainties","basis"],"additionalProperties":false}},"yearPlanReviewId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"weights":{"type":"object","properties":{"price":{"type":"number","enum":[40]},"yield":{"type":"number","enum":[30]},"soilRotation":{"type":"number","enum":[15]},"water":{"type":"number","enum":[10]},"confidence":{"type":"number","enum":[5]}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"soilReportStatus":{"type":"string","enum":["none","unconfirmed","confirmed"]},"summary":{"type":"string","maxLength":600},"limitations":{"type":"array","items":{"type":"string","maxLength":600}},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"replacePass":{"type":"boolean"}},"required":["reviewId","jobId","contextHash","status","stale","request","resolvedSowing","previousCropId","currentCycleId","fieldAreaHa","generatedAt","modelInvocation","picks","pickOrigin","candidates","weights","soilReportStatus","summary","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/soil-review":{"get":{"tags":["farms"],"description":"The soil review for this field's confirmed soil values: readings rated against cited bands, code facts and the narrative. Creates a pending review and enqueues one job when none exists for the current values.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"reviewId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jobId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextHash":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["pending","running","ready","unavailable","error","no_report"]},"stale":{"type":"boolean"},"generatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false},"readings":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"markerId":{"type":"string","maxLength":100},"sampleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reportId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parameter":{"type":"string","maxLength":60},"label":{"type":"string","maxLength":120},"value":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string","maxLength":30},"ratedValue":{"nullable":true,"type":"number"},"ratedUnit":{"nullable":true,"type":"string","maxLength":30},"rating":{"type":"string","enum":["very_low","low","medium","high","very_high","strongly_acidic","acidic","neutral","alkaline","strongly_alkaline","normal","critical","injurious","deficient","sufficient","unrated"]},"status":{"type":"string","enum":["rated","unrated","unit_mismatch","qualifier"]},"assumption":{"nullable":true,"type":"string","maxLength":300},"note":{"nullable":true,"type":"string","maxLength":300},"bands":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["very_low","low","medium","high","very_high","strongly_acidic","acidic","neutral","alkaline","strongly_alkaline","normal","critical","injurious","deficient","sufficient","unrated"]},"from":{"nullable":true,"type":"number"},"to":{"nullable":true,"type":"number"},"note":{"nullable":true,"type":"string","maxLength":200}},"required":["label","from","to","note"],"additionalProperties":false}},"axis":{"nullable":true,"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}},"required":["min","max"],"additionalProperties":false},"source":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"locator":{"nullable":true,"type":"string","maxLength":200},"verified":{"type":"boolean"}},"required":["id","title","url","locator","verified"],"additionalProperties":false},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"method":{"nullable":true,"type":"string","maxLength":300},"cropNeed":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"need":{"nullable":true,"type":"string","enum":["low","medium","high"]},"note":{"nullable":true,"type":"string","maxLength":600}},"required":["cropId","cropName","need","note"],"additionalProperties":false},"nextCropNeed":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"need":{"nullable":true,"type":"string","enum":["low","medium","high"]},"note":{"nullable":true,"type":"string","maxLength":600}},"required":["cropId","cropName","need","note"],"additionalProperties":false}},"required":["markerId","sampleId","reportId","parameter","label","value","unit","ratedValue","ratedUnit","rating","status","assumption","bands","axis","source","collectionDate","method","cropNeed","nextCropNeed"],"additionalProperties":false}},"currentCrop":{"nullable":true,"type":"object","properties":{"cycleId":{"type":"string"},"cropId":{"type":"string"},"cropName":{"type":"string","maxLength":120}},"required":["cycleId","cropId","cropName"],"additionalProperties":false},"nextCrop":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string"},"cropName":{"type":"string","maxLength":120},"source":{"type":"string","enum":["year_plan_applied","saved_season"]}},"required":["cropId","cropName","source"],"additionalProperties":false},"facts":{"maxItems":12,"type":"array","items":{"type":"string","maxLength":200}},"narrative":{"nullable":true,"type":"object","properties":{"lines":{"maxItems":5,"type":"array","items":{"type":"string","maxLength":160}},"afterHarvest":{"maxItems":3,"type":"array","items":{"type":"string","maxLength":160}},"nextCrop":{"maxItems":3,"type":"array","items":{"type":"string","maxLength":160}}},"required":["lines","afterHarvest","nextCrop"],"additionalProperties":false},"narrativeOrigin":{"nullable":true,"type":"string","enum":["model","deterministic"]},"ratingsVersion":{"type":"string","maxLength":40},"limitations":{"type":"array","items":{"type":"string","maxLength":600}},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"}},"required":["reviewId","jobId","farmId","contextHash","status","stale","generatedAt","modelInvocation","readings","currentCrop","nextCrop","facts","narrative","narrativeOrigin","ratingsVersion","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"post":{"tags":["farms"],"description":"Refresh: a finished review is archived and rebuilt; a review still being built is returned. Body {}.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"reviewId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jobId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextHash":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["pending","running","ready","unavailable","error","no_report"]},"stale":{"type":"boolean"},"generatedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"modelInvocation":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"purpose":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"processing":{"type":"string","enum":["standard"]},"requestedStorage":{"type":"boolean","enum":[false]},"responseDeleted":{"nullable":true,"type":"boolean"}},"required":["id","provider","requestedModel","model","purpose","status","startedAt","finishedAt","processing","requestedStorage","responseDeleted"],"additionalProperties":false},"readings":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"markerId":{"type":"string","maxLength":100},"sampleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reportId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parameter":{"type":"string","maxLength":60},"label":{"type":"string","maxLength":120},"value":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string","maxLength":30},"ratedValue":{"nullable":true,"type":"number"},"ratedUnit":{"nullable":true,"type":"string","maxLength":30},"rating":{"type":"string","enum":["very_low","low","medium","high","very_high","strongly_acidic","acidic","neutral","alkaline","strongly_alkaline","normal","critical","injurious","deficient","sufficient","unrated"]},"status":{"type":"string","enum":["rated","unrated","unit_mismatch","qualifier"]},"assumption":{"nullable":true,"type":"string","maxLength":300},"note":{"nullable":true,"type":"string","maxLength":300},"bands":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["very_low","low","medium","high","very_high","strongly_acidic","acidic","neutral","alkaline","strongly_alkaline","normal","critical","injurious","deficient","sufficient","unrated"]},"from":{"nullable":true,"type":"number"},"to":{"nullable":true,"type":"number"},"note":{"nullable":true,"type":"string","maxLength":200}},"required":["label","from","to","note"],"additionalProperties":false}},"axis":{"nullable":true,"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}},"required":["min","max"],"additionalProperties":false},"source":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"locator":{"nullable":true,"type":"string","maxLength":200},"verified":{"type":"boolean"}},"required":["id","title","url","locator","verified"],"additionalProperties":false},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"method":{"nullable":true,"type":"string","maxLength":300},"cropNeed":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"need":{"nullable":true,"type":"string","enum":["low","medium","high"]},"note":{"nullable":true,"type":"string","maxLength":600}},"required":["cropId","cropName","need","note"],"additionalProperties":false},"nextCropNeed":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"need":{"nullable":true,"type":"string","enum":["low","medium","high"]},"note":{"nullable":true,"type":"string","maxLength":600}},"required":["cropId","cropName","need","note"],"additionalProperties":false}},"required":["markerId","sampleId","reportId","parameter","label","value","unit","ratedValue","ratedUnit","rating","status","assumption","bands","axis","source","collectionDate","method","cropNeed","nextCropNeed"],"additionalProperties":false}},"currentCrop":{"nullable":true,"type":"object","properties":{"cycleId":{"type":"string"},"cropId":{"type":"string"},"cropName":{"type":"string","maxLength":120}},"required":["cycleId","cropId","cropName"],"additionalProperties":false},"nextCrop":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string"},"cropName":{"type":"string","maxLength":120},"source":{"type":"string","enum":["year_plan_applied","saved_season"]}},"required":["cropId","cropName","source"],"additionalProperties":false},"facts":{"maxItems":12,"type":"array","items":{"type":"string","maxLength":200}},"narrative":{"nullable":true,"type":"object","properties":{"lines":{"maxItems":5,"type":"array","items":{"type":"string","maxLength":160}},"afterHarvest":{"maxItems":3,"type":"array","items":{"type":"string","maxLength":160}},"nextCrop":{"maxItems":3,"type":"array","items":{"type":"string","maxLength":160}}},"required":["lines","afterHarvest","nextCrop"],"additionalProperties":false},"narrativeOrigin":{"nullable":true,"type":"string","enum":["model","deterministic"]},"ratingsVersion":{"type":"string","maxLength":40},"limitations":{"type":"array","items":{"type":"string","maxLength":600}},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"}},"required":["reviewId","jobId","farmId","contextHash","status","stale","generatedAt","modelInvocation","readings","currentCrop","nextCrop","facts","narrative","narrativeOrigin","ratingsVersion","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/season-preview":{"get":{"tags":["plans"],"parameters":[{"schema":{"type":"string","maxLength":120},"in":"query","name":"planId","required":false},{"schema":{"type":"string","maxLength":120},"in":"query","name":"cropId","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"productId","required":false},{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"sowing","required":false},{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"harvestLatest","required":false},{"schema":{"type":"string","maxLength":80},"in":"query","name":"establishmentMethod","required":false},{"schema":{"type":"string","maxLength":120},"in":"query","name":"systemId","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"planId":{"nullable":true,"type":"string","maxLength":120},"origin":{"type":"string","enum":["saved_season","custom"]},"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"productId":{"nullable":true,"type":"string","maxLength":200},"productName":{"nullable":true,"type":"string","maxLength":120},"establishmentMethod":{"nullable":true,"type":"string","maxLength":80},"kind":{"type":"string","enum":["crop","green_manure","intercrop"]},"companion":{"nullable":true,"type":"object","properties":{"systemId":{"type":"string","maxLength":120},"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"cropName":{"type":"string","maxLength":120},"productName":{"type":"string","maxLength":120},"rowRatio":{"type":"string","maxLength":20},"arrangement":{"nullable":true,"type":"string","enum":["row","paired_row","strip","mixed"]},"yieldShare":{"type":"object","properties":{"main":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"companion":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["main","companion"],"additionalProperties":false},"shareBasis":{"type":"string","enum":["sourced","assumed"]},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"p50":{"nullable":true,"type":"number"},"range":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"observations":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["market","district","state","national"]},"stateName":{"nullable":true,"type":"string"},"districtName":{"nullable":true,"type":"string"},"marketCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["level","stateName","districtName","marketCount"],"additionalProperties":false},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","p50","range","harvestWeek","yearsUsed","observations","scope","reason"],"additionalProperties":false},"nitrogenCreditKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"costPerHa":{"nullable":true,"type":"number"},"source":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"locator":{"nullable":true,"type":"string","maxLength":200}},"required":["id","title","url","locator"],"additionalProperties":false}},"required":["systemId","cropId","productId","cropName","productName","rowRatio","arrangement","yieldShare","shareBasis","yieldKgPerHa","yieldBasis","price","nitrogenCreditKgPerHa","source"],"additionalProperties":false},"today":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"sowing":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvest":{"nullable":true,"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"fieldAreaHa":{"nullable":true,"type":"number"},"timeline":{"nullable":true,"type":"object","properties":{"cropId":{"type":"string"},"productId":{"nullable":true,"type":"string"},"establishmentMethod":{"nullable":true,"type":"string"},"anchorDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"stages":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","maxLength":80},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"basis":{"type":"string","enum":["sourced","fao_generic","estimate"]}},"required":["id","name","from","to","basis"],"additionalProperties":false}},"harvest":{"nullable":true,"type":"object","properties":{"earliest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"latest":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["earliest","latest"],"additionalProperties":false},"basis":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}},"required":["cropId","productId","establishmentMethod","anchorDate","stages","harvest","basis"],"additionalProperties":false},"weather":{"type":"object","properties":{"status":{"type":"string","enum":["typical","unavailable"]},"months":{"maxItems":14,"type":"array","items":{"type":"object","properties":{"month":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"label":{"type":"string","maxLength":20},"rainMm":{"nullable":true,"type":"number"},"tMaxC":{"nullable":true,"type":"number"},"tMinC":{"nullable":true,"type":"number"},"days":{"type":"integer","minimum":0,"maximum":31}},"required":["month","label","rainMm","tMaxC","tMinC","days"],"additionalProperties":false}},"source":{"nullable":true,"type":"object","properties":{"sourceId":{"type":"string","maxLength":120},"years":{"type":"object","properties":{"from":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"to":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to"],"additionalProperties":false}},"required":["sourceId","years"],"additionalProperties":false},"note":{"type":"string","maxLength":600}},"required":["status","months","source","note"],"additionalProperties":false},"water":{"nullable":true,"type":"object","properties":{"fit":{"type":"number","minimum":0,"maximum":1},"needMm":{"nullable":true,"type":"number"},"rainMm":{"nullable":true,"type":"number"},"verdict":{"type":"string","maxLength":160}},"required":["fit","needMm","rainMm","verdict"],"additionalProperties":false},"price":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["available","insufficient"]},"unit":{"type":"string","enum":["INR/kg"]},"harvestWeek":{"nullable":true,"type":"string","maxLength":10},"p50":{"nullable":true,"type":"number"},"likely":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"scopeLabel":{"type":"string","maxLength":160},"yearsUsed":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"path":{"maxItems":60,"type":"array","items":{"type":"object","properties":{"weekStart":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"p50":{"nullable":true,"type":"number"},"likely":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["weekStart","p50","likely"],"additionalProperties":false}},"reason":{"nullable":true,"type":"string","maxLength":80}},"required":["status","unit","harvestWeek","p50","likely","scopeLabel","yearsUsed","path","reason"],"additionalProperties":false},"marketNow":{"nullable":true,"type":"object","properties":{"p50":{"type":"number"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"markets":{"type":"integer","minimum":0,"maximum":9007199254740991},"scopeLabel":{"type":"string","maxLength":160}},"required":["p50","date","markets","scopeLabel"],"additionalProperties":false},"yieldKgPerHa":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"yieldBasis":{"nullable":true,"type":"string","enum":["district","state","reference","farmer"]},"yieldForFieldKg":{"nullable":true,"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"cost":{"nullable":true,"type":"object","properties":{"a2flPerHa":{"nullable":true,"type":"number"},"c2PerHa":{"nullable":true,"type":"number"},"reportedPerHa":{"nullable":true,"type":"number","minimum":0},"authority":{"nullable":true,"type":"string","enum":["cacp","des","sau","other"]},"year":{"nullable":true,"type":"string","maxLength":20},"region":{"nullable":true,"type":"string","maxLength":40}},"required":["a2flPerHa","c2PerHa","authority","year","region"],"additionalProperties":false},"profitPerHa":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"profitForField":{"nullable":true,"type":"object","properties":{"central":{"type":"number"},"likely":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false},"possible":{"type":"object","properties":{"low":{"type":"number"},"high":{"type":"number"}},"required":["low","high"],"additionalProperties":false}},"required":["central","likely","possible"],"additionalProperties":false},"score":{"nullable":true,"type":"number","minimum":0,"maximum":100},"components":{"nullable":true,"type":"object","properties":{"price":{"type":"number","minimum":0,"maximum":1},"yield":{"type":"number","minimum":0,"maximum":1},"soilRotation":{"type":"number","minimum":0,"maximum":1},"water":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["price","yield","soilRotation","water","confidence"],"additionalProperties":false},"reasonCodes":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":60}},"steps":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["care","stage","harvest"]},"title":{"type":"string","maxLength":160},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"detail":{"nullable":true,"type":"string","maxLength":1000},"source":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"publisher":{"type":"string","maxLength":200}},"required":["id","publisher"],"additionalProperties":false}},"required":["kind","title","from","to","detail","source"],"additionalProperties":false}},"soil":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["no_report","compared"]},"checks":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"parameter":{"type":"string","maxLength":60},"label":{"type":"string","maxLength":80},"value":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string","maxLength":30},"rating":{"type":"string","enum":["very_low","low","medium","high","very_high","strongly_acidic","acidic","neutral","alkaline","strongly_alkaline","normal","critical","injurious","deficient","sufficient","unrated"]},"need":{"nullable":true,"type":"string","enum":["low","medium","high"]},"verdict":{"type":"string","enum":["ok","watch","short","unknown"]},"note":{"nullable":true,"type":"string","maxLength":600},"assumption":{"nullable":true,"type":"string","maxLength":300},"markerId":{"nullable":true,"type":"string","maxLength":100},"sampleId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"collectionDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"ratingSource":{"nullable":true,"type":"object","properties":{"id":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"}},"required":["id","title","url"],"additionalProperties":false}},"required":["parameter","label","value","unit","rating","need","verdict","note","assumption","markerId","sampleId","collectionDate","ratingSource"],"additionalProperties":false}}},"required":["status","checks"],"additionalProperties":false},"basis":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["price_history","yield_reference","cost_reference","sowing_window","duration","rotation","water","soil","ndvi","climatology","model","residue_reference","emission_factor","energy_reference"]},"label":{"type":"string","maxLength":200},"sourceId":{"nullable":true,"type":"string","maxLength":200},"url":{"nullable":true,"type":"string","format":"uri"},"scope":{"nullable":true,"type":"string","maxLength":120},"note":{"nullable":true,"type":"string","maxLength":1000}},"required":["kind","label","sourceId","url","scope","note"],"additionalProperties":false}},"limitations":{"type":"array","items":{"type":"string","maxLength":600}},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"}},"required":["farmId","planId","origin","cropId","cropName","productId","productName","establishmentMethod","kind","companion","today","sowing","harvest","fieldAreaHa","timeline","weather","water","price","marketNow","yieldKgPerHa","yieldBasis","yieldForFieldKg","cost","profitPerHa","profitForField","score","components","reasonCodes","steps","soil","basis","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/checks":{"get":{"tags":["farms"],"description":"Field checks computed on read (the next one per growing crop at your own interval, rechecks of open issues, completions of the last 30 days). On a farm with fields the check list names the field (`?fieldId=`): without it 400 field_required, an unknown field 404 field_not_found (as the year plan). A farm without fields lists every check.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"asOf":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":160},"reason":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["interval","recheck","condition"]},"fieldId":{"nullable":true,"type":"string"},"cycleId":{"nullable":true,"type":"string"},"issueId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cropName":{"nullable":true,"type":"string"},"dueFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dueTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["upcoming","due","overdue","completed"]},"intervalDays":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"checklist":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["risk_window","general"]},"sourceName":{"nullable":true,"type":"string","maxLength":200},"sourceUrl":{"nullable":true,"type":"string"},"sourceDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"alertId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["text","kind","sourceName","sourceUrl","sourceDate","alertId"],"additionalProperties":false}},"completedOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scope":{"type":"string","enum":["field","farm"]},"missedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","kind","fieldId","cycleId","issueId","cropName","dueFrom","dueTo","status","intervalDays","checklist","completedOn","journalEntryId","scope"],"additionalProperties":false}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["farmId","asOf","checks","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/checks/complete":{"post":{"tags":["farms"],"description":"Complete a scheduled check: 201 when recorded, 200 with alreadyCompleted on a replay or when the check was already completed. 400 when completedOn is in the future or before establishment; 404 when the check id is not in the schedule. Idempotent per clientEntryId: the same id and payload returns the stored result with 200; the same id with a different payload is 409 idempotency_conflict. Every write adds one immutable journal entry.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientEntryId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$"},"checkId":{"type":"string","maxLength":160},"completedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"result":{"type":"string","enum":["nothing_found","issues_found"]},"note":{"type":"string","maxLength":2000},"issueIds":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["clientEntryId","checkId","completedOn","result"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"check":{"type":"object","properties":{"id":{"type":"string","maxLength":160},"reason":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["interval","recheck","condition"]},"fieldId":{"nullable":true,"type":"string"},"cycleId":{"nullable":true,"type":"string"},"issueId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cropName":{"nullable":true,"type":"string"},"dueFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dueTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["upcoming","due","overdue","completed"]},"intervalDays":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"checklist":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["risk_window","general"]},"sourceName":{"nullable":true,"type":"string","maxLength":200},"sourceUrl":{"nullable":true,"type":"string"},"sourceDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"alertId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["text","kind","sourceName","sourceUrl","sourceDate","alertId"],"additionalProperties":false}},"completedOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scope":{"type":"string","enum":["field","farm"]},"missedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","kind","fieldId","cycleId","issueId","cropName","dueFrom","dueTo","status","intervalDays","checklist","completedOn","journalEntryId","scope"],"additionalProperties":false},"journalEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"alreadyCompleted":{"type":"boolean"}},"required":["check","journalEntryId","alreadyCompleted"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"check":{"type":"object","properties":{"id":{"type":"string","maxLength":160},"reason":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["interval","recheck","condition"]},"fieldId":{"nullable":true,"type":"string"},"cycleId":{"nullable":true,"type":"string"},"issueId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cropName":{"nullable":true,"type":"string"},"dueFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dueTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["upcoming","due","overdue","completed"]},"intervalDays":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"checklist":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["risk_window","general"]},"sourceName":{"nullable":true,"type":"string","maxLength":200},"sourceUrl":{"nullable":true,"type":"string"},"sourceDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"alertId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["text","kind","sourceName","sourceUrl","sourceDate","alertId"],"additionalProperties":false}},"completedOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scope":{"type":"string","enum":["field","farm"]},"missedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","kind","fieldId","cycleId","issueId","cropName","dueFrom","dueTo","status","intervalDays","checklist","completedOn","journalEntryId","scope"],"additionalProperties":false},"journalEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"alreadyCompleted":{"type":"boolean"}},"required":["check","journalEntryId","alreadyCompleted"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/issues":{"get":{"tags":["farms"],"description":"The farmer-reported issue log: with `fieldId`, that field's issues plus the farm-wide ones; `status` filters the list (counts cover the field or farm before the filter).","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","enum":["open","treating","resolved","dismissed"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"asOf":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"issues":{"type":"array","items":{"type":"object","properties":{"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"cycleId":{"type":"string","minLength":1,"maxLength":120},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"category":{"type":"string","enum":["pest","disease","weed","water_stress","nutrient","weather_damage","animal_damage","other"]},"severity":{"type":"string","enum":["low","medium","high"]},"title":{"type":"string","minLength":1,"maxLength":120},"detail":{"type":"string","maxLength":2000},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"mediaIds":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"photoMarks":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"label":{"type":"string","maxLength":40}},"required":["mediaId","x","y"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]},"cropId":{"nullable":true,"type":"string"},"cropName":{"nullable":true,"type":"string"},"journalEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["reported","status_changed","response_recorded","recheck_scheduled","note_added"]},"occurredOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"nullable":true,"type":"string","enum":["open","treating","resolved","dismissed"]},"response":{"nullable":true,"type":"object","properties":{"method":{"type":"string","enum":["cultural","mechanical","biological","irrigation","nutrition","product_applied","other"]},"description":{"type":"string","minLength":1,"maxLength":1000},"productName":{"type":"string","maxLength":120},"quantity":{"type":"object","properties":{"value":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000000},"unit":{"type":"string","enum":["kg","g","L","mL","ha","acre","other"]}},"required":["value","unit"],"additionalProperties":false},"labelWaitDays":{"type":"integer","minimum":0,"maximum":365},"recheckOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["method","description"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"mediaIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","occurredOn","status","response","note","mediaIds","journalEntryId","createdAt"],"additionalProperties":false}},"recheckOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"earliestHarvestOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"seenBefore":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"issueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"cropName":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]}},"required":["issueId","observedOn","cropName","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"scope":{"type":"string","enum":["field","farm"]}},"required":["observedOn","category","severity","title","mediaIds","photoMarks","id","farmId","status","cropId","cropName","journalEntryId","events","recheckOn","earliestHarvestOn","seenBefore","createdAt","updatedAt","scope"],"additionalProperties":false}},"counts":{"type":"object","properties":{"open":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"treating":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"resolved":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dismissed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["open","treating","resolved","dismissed"],"additionalProperties":false},"limitations":{"type":"array","items":{"type":"string"}}},"required":["farmId","asOf","issues","counts","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"post":{"tags":["farms"],"description":"Log an issue you saw (201). The field is required on a farm with fields; a location must be inside the farm (and the field). Idempotent per clientEntryId: the same id and payload returns the stored result with 200; the same id with a different payload is 409 idempotency_conflict. Every write adds one immutable journal entry.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientEntryId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$"},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"cycleId":{"type":"string","minLength":1,"maxLength":120},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"category":{"type":"string","enum":["pest","disease","weed","water_stress","nutrient","weather_damage","animal_damage","other"]},"severity":{"type":"string","enum":["low","medium","high"]},"title":{"type":"string","minLength":1,"maxLength":120},"detail":{"type":"string","maxLength":2000},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"mediaIds":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"photoMarks":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"label":{"type":"string","maxLength":40}},"required":["mediaId","x","y"],"additionalProperties":false}},"fromFactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["clientEntryId","observedOn","category","severity","title"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"cycleId":{"type":"string","minLength":1,"maxLength":120},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"category":{"type":"string","enum":["pest","disease","weed","water_stress","nutrient","weather_damage","animal_damage","other"]},"severity":{"type":"string","enum":["low","medium","high"]},"title":{"type":"string","minLength":1,"maxLength":120},"detail":{"type":"string","maxLength":2000},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"mediaIds":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"photoMarks":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"label":{"type":"string","maxLength":40}},"required":["mediaId","x","y"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]},"cropId":{"nullable":true,"type":"string"},"cropName":{"nullable":true,"type":"string"},"journalEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["reported","status_changed","response_recorded","recheck_scheduled","note_added"]},"occurredOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"nullable":true,"type":"string","enum":["open","treating","resolved","dismissed"]},"response":{"nullable":true,"type":"object","properties":{"method":{"type":"string","enum":["cultural","mechanical","biological","irrigation","nutrition","product_applied","other"]},"description":{"type":"string","minLength":1,"maxLength":1000},"productName":{"type":"string","maxLength":120},"quantity":{"type":"object","properties":{"value":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000000},"unit":{"type":"string","enum":["kg","g","L","mL","ha","acre","other"]}},"required":["value","unit"],"additionalProperties":false},"labelWaitDays":{"type":"integer","minimum":0,"maximum":365},"recheckOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["method","description"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"mediaIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","occurredOn","status","response","note","mediaIds","journalEntryId","createdAt"],"additionalProperties":false}},"recheckOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"earliestHarvestOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"seenBefore":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"issueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"cropName":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]}},"required":["issueId","observedOn","cropName","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"scope":{"type":"string","enum":["field","farm"]}},"required":["observedOn","category","severity","title","mediaIds","photoMarks","id","farmId","status","cropId","cropName","journalEntryId","events","recheckOn","earliestHarvestOn","seenBefore","createdAt","updatedAt","scope"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"cycleId":{"type":"string","minLength":1,"maxLength":120},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"category":{"type":"string","enum":["pest","disease","weed","water_stress","nutrient","weather_damage","animal_damage","other"]},"severity":{"type":"string","enum":["low","medium","high"]},"title":{"type":"string","minLength":1,"maxLength":120},"detail":{"type":"string","maxLength":2000},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"mediaIds":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"photoMarks":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"label":{"type":"string","maxLength":40}},"required":["mediaId","x","y"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]},"cropId":{"nullable":true,"type":"string"},"cropName":{"nullable":true,"type":"string"},"journalEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["reported","status_changed","response_recorded","recheck_scheduled","note_added"]},"occurredOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"nullable":true,"type":"string","enum":["open","treating","resolved","dismissed"]},"response":{"nullable":true,"type":"object","properties":{"method":{"type":"string","enum":["cultural","mechanical","biological","irrigation","nutrition","product_applied","other"]},"description":{"type":"string","minLength":1,"maxLength":1000},"productName":{"type":"string","maxLength":120},"quantity":{"type":"object","properties":{"value":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000000},"unit":{"type":"string","enum":["kg","g","L","mL","ha","acre","other"]}},"required":["value","unit"],"additionalProperties":false},"labelWaitDays":{"type":"integer","minimum":0,"maximum":365},"recheckOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["method","description"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"mediaIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","occurredOn","status","response","note","mediaIds","journalEntryId","createdAt"],"additionalProperties":false}},"recheckOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"earliestHarvestOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"seenBefore":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"issueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"cropName":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]}},"required":["issueId","observedOn","cropName","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"scope":{"type":"string","enum":["field","farm"]}},"required":["observedOn","category","severity","title","mediaIds","photoMarks","id","farmId","status","cropId","cropName","journalEntryId","events","recheckOn","earliestHarvestOn","seenBefore","createdAt","updatedAt","scope"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/issues/{issueId}":{"get":{"tags":["farms"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"issueId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"cycleId":{"type":"string","minLength":1,"maxLength":120},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"category":{"type":"string","enum":["pest","disease","weed","water_stress","nutrient","weather_damage","animal_damage","other"]},"severity":{"type":"string","enum":["low","medium","high"]},"title":{"type":"string","minLength":1,"maxLength":120},"detail":{"type":"string","maxLength":2000},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"mediaIds":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"photoMarks":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"label":{"type":"string","maxLength":40}},"required":["mediaId","x","y"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]},"cropId":{"nullable":true,"type":"string"},"cropName":{"nullable":true,"type":"string"},"journalEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["reported","status_changed","response_recorded","recheck_scheduled","note_added"]},"occurredOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"nullable":true,"type":"string","enum":["open","treating","resolved","dismissed"]},"response":{"nullable":true,"type":"object","properties":{"method":{"type":"string","enum":["cultural","mechanical","biological","irrigation","nutrition","product_applied","other"]},"description":{"type":"string","minLength":1,"maxLength":1000},"productName":{"type":"string","maxLength":120},"quantity":{"type":"object","properties":{"value":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000000},"unit":{"type":"string","enum":["kg","g","L","mL","ha","acre","other"]}},"required":["value","unit"],"additionalProperties":false},"labelWaitDays":{"type":"integer","minimum":0,"maximum":365},"recheckOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["method","description"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"mediaIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","occurredOn","status","response","note","mediaIds","journalEntryId","createdAt"],"additionalProperties":false}},"recheckOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"earliestHarvestOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"seenBefore":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"issueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"cropName":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]}},"required":["issueId","observedOn","cropName","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"scope":{"type":"string","enum":["field","farm"]}},"required":["observedOn","category","severity","title","mediaIds","photoMarks","id","farmId","status","cropId","cropName","journalEntryId","events","recheckOn","earliestHarvestOn","seenBefore","createdAt","updatedAt","scope"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/issues/{issueId}/events":{"post":{"tags":["farms"],"description":"Add a status change, a response (what you did) or a note (201 with the updated issue). A response with recheckOn schedules a recheck; resolving or dismissing clears it. Idempotent per clientEntryId: the same id and payload returns the stored result with 200; the same id with a different payload is 409 idempotency_conflict. Every write adds one immutable journal entry.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientEntryId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$"},"occurredOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"kind":{"type":"string","enum":["status_changed","response_recorded","note_added"]},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]},"response":{"type":"object","properties":{"method":{"type":"string","enum":["cultural","mechanical","biological","irrigation","nutrition","product_applied","other"]},"description":{"type":"string","minLength":1,"maxLength":1000},"productName":{"type":"string","maxLength":120},"quantity":{"type":"object","properties":{"value":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000000},"unit":{"type":"string","enum":["kg","g","L","mL","ha","acre","other"]}},"required":["value","unit"],"additionalProperties":false},"labelWaitDays":{"type":"integer","minimum":0,"maximum":365},"recheckOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["method","description"],"additionalProperties":false},"note":{"type":"string","maxLength":2000},"mediaIds":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["clientEntryId","occurredOn","kind"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"issueId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"cycleId":{"type":"string","minLength":1,"maxLength":120},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"category":{"type":"string","enum":["pest","disease","weed","water_stress","nutrient","weather_damage","animal_damage","other"]},"severity":{"type":"string","enum":["low","medium","high"]},"title":{"type":"string","minLength":1,"maxLength":120},"detail":{"type":"string","maxLength":2000},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"mediaIds":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"photoMarks":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"label":{"type":"string","maxLength":40}},"required":["mediaId","x","y"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]},"cropId":{"nullable":true,"type":"string"},"cropName":{"nullable":true,"type":"string"},"journalEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["reported","status_changed","response_recorded","recheck_scheduled","note_added"]},"occurredOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"nullable":true,"type":"string","enum":["open","treating","resolved","dismissed"]},"response":{"nullable":true,"type":"object","properties":{"method":{"type":"string","enum":["cultural","mechanical","biological","irrigation","nutrition","product_applied","other"]},"description":{"type":"string","minLength":1,"maxLength":1000},"productName":{"type":"string","maxLength":120},"quantity":{"type":"object","properties":{"value":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000000},"unit":{"type":"string","enum":["kg","g","L","mL","ha","acre","other"]}},"required":["value","unit"],"additionalProperties":false},"labelWaitDays":{"type":"integer","minimum":0,"maximum":365},"recheckOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["method","description"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"mediaIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","occurredOn","status","response","note","mediaIds","journalEntryId","createdAt"],"additionalProperties":false}},"recheckOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"earliestHarvestOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"seenBefore":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"issueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"cropName":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]}},"required":["issueId","observedOn","cropName","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"scope":{"type":"string","enum":["field","farm"]}},"required":["observedOn","category","severity","title","mediaIds","photoMarks","id","farmId","status","cropId","cropName","journalEntryId","events","recheckOn","earliestHarvestOn","seenBefore","createdAt","updatedAt","scope"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"cycleId":{"type":"string","minLength":1,"maxLength":120},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"category":{"type":"string","enum":["pest","disease","weed","water_stress","nutrient","weather_damage","animal_damage","other"]},"severity":{"type":"string","enum":["low","medium","high"]},"title":{"type":"string","minLength":1,"maxLength":120},"detail":{"type":"string","maxLength":2000},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"mediaIds":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"photoMarks":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"label":{"type":"string","maxLength":40}},"required":["mediaId","x","y"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]},"cropId":{"nullable":true,"type":"string"},"cropName":{"nullable":true,"type":"string"},"journalEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["reported","status_changed","response_recorded","recheck_scheduled","note_added"]},"occurredOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"nullable":true,"type":"string","enum":["open","treating","resolved","dismissed"]},"response":{"nullable":true,"type":"object","properties":{"method":{"type":"string","enum":["cultural","mechanical","biological","irrigation","nutrition","product_applied","other"]},"description":{"type":"string","minLength":1,"maxLength":1000},"productName":{"type":"string","maxLength":120},"quantity":{"type":"object","properties":{"value":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000000},"unit":{"type":"string","enum":["kg","g","L","mL","ha","acre","other"]}},"required":["value","unit"],"additionalProperties":false},"labelWaitDays":{"type":"integer","minimum":0,"maximum":365},"recheckOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["method","description"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"mediaIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","occurredOn","status","response","note","mediaIds","journalEntryId","createdAt"],"additionalProperties":false}},"recheckOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"earliestHarvestOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"seenBefore":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"issueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"cropName":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]}},"required":["issueId","observedOn","cropName","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"scope":{"type":"string","enum":["field","farm"]}},"required":["observedOn","category","severity","title","mediaIds","photoMarks","id","farmId","status","cropId","cropName","journalEntryId","events","recheckOn","earliestHarvestOn","seenBefore","createdAt","updatedAt","scope"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/season-report":{"get":{"tags":["farms"],"description":"One crop cycle's journal entries, completed field checks, issues, care completions, alerts and stored satellite readings for printing. Select the crop with `cycleId`, or with `fieldId` (that field's current cycle). A farm with fields needs one of them (400 field_required); an unknown field is 404 field_not_found, an unknown cycle 404 cycle_not_found. A farm without fields defaults to its current crop.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"cycleId","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farm":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"district":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"areaHa":{"nullable":true,"type":"number"}},"required":["id","name","district","state","areaHa"],"additionalProperties":false},"field":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"areaHa":{"type":"number"}},"required":["id","name","areaHa"],"additionalProperties":false},"cycle":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"establishmentMethod":{"type":"string","minLength":1,"maxLength":80},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"stage":{"type":"string","enum":["sowed","growing","flowering","harvested"]},"harvestDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"rootPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"latestPlanId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"companion":{"type":"object","properties":{"systemId":{"type":"string","minLength":1,"maxLength":120},"cropId":{"type":"string","minLength":1,"maxLength":120},"cropName":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1,"maxLength":200},"productName":{"type":"string","minLength":1,"maxLength":120},"rowRatio":{"type":"string","minLength":1,"maxLength":20}},"required":["cropId","rowRatio"],"additionalProperties":false}},"required":["id","cropId","sowingDate","stage"],"additionalProperties":false},"period":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"activity":{"nullable":true,"type":"string"},"note":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"object","properties":{"value":{"type":"number"},"unit":{"type":"string"}},"required":["value","unit"],"additionalProperties":false},"expense":{"nullable":true,"type":"object","properties":{"amountInr":{"type":"string"},"category":{"type":"string"}},"required":["amountInr","category"],"additionalProperties":false},"sale":{"nullable":true,"type":"object","properties":{"amountInr":{"type":"string"},"note":{"nullable":true,"type":"string"}},"required":["amountInr","note"],"additionalProperties":false},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"contentPath":{"type":"string"},"label":{"type":"string"}},"required":["id","contentPath","label"],"additionalProperties":false}},"facts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"field":{"type":"string"},"kind":{"type":"string","enum":["original","proposed","confirmed"]},"source":{"type":"string","enum":["farmer","ai"]},"status":{"type":"string","enum":["proposed","confirmed","rejected","recorded"]},"value":{},"unit":{"nullable":true,"type":"string"},"evidenceState":{"type":"string","enum":["farmer_reported","derived","illustrative"]}},"required":["id","field","kind","source","status","value","unit","evidenceState"],"additionalProperties":false}},"provenanceLabel":{"type":"string"}},"required":["id","observedOn","activity","note","quantity","expense","sale","media","facts","provenanceLabel"],"additionalProperties":false}},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":160},"reason":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["interval","recheck","condition"]},"fieldId":{"nullable":true,"type":"string"},"cycleId":{"nullable":true,"type":"string"},"issueId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cropName":{"nullable":true,"type":"string"},"dueFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dueTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["upcoming","due","overdue","completed"]},"intervalDays":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"checklist":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["risk_window","general"]},"sourceName":{"nullable":true,"type":"string","maxLength":200},"sourceUrl":{"nullable":true,"type":"string"},"sourceDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"alertId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["text","kind","sourceName","sourceUrl","sourceDate","alertId"],"additionalProperties":false}},"completedOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scope":{"type":"string","enum":["field","farm"]},"missedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","kind","fieldId","cycleId","issueId","cropName","dueFrom","dueTo","status","intervalDays","checklist","completedOn","journalEntryId","scope"],"additionalProperties":false}},"issues":{"type":"array","items":{"type":"object","properties":{"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"cycleId":{"type":"string","minLength":1,"maxLength":120},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"category":{"type":"string","enum":["pest","disease","weed","water_stress","nutrient","weather_damage","animal_damage","other"]},"severity":{"type":"string","enum":["low","medium","high"]},"title":{"type":"string","minLength":1,"maxLength":120},"detail":{"type":"string","maxLength":2000},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"mediaIds":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"photoMarks":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"label":{"type":"string","maxLength":40}},"required":["mediaId","x","y"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]},"cropId":{"nullable":true,"type":"string"},"cropName":{"nullable":true,"type":"string"},"journalEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["reported","status_changed","response_recorded","recheck_scheduled","note_added"]},"occurredOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"nullable":true,"type":"string","enum":["open","treating","resolved","dismissed"]},"response":{"nullable":true,"type":"object","properties":{"method":{"type":"string","enum":["cultural","mechanical","biological","irrigation","nutrition","product_applied","other"]},"description":{"type":"string","minLength":1,"maxLength":1000},"productName":{"type":"string","maxLength":120},"quantity":{"type":"object","properties":{"value":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000000},"unit":{"type":"string","enum":["kg","g","L","mL","ha","acre","other"]}},"required":["value","unit"],"additionalProperties":false},"labelWaitDays":{"type":"integer","minimum":0,"maximum":365},"recheckOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["method","description"],"additionalProperties":false},"note":{"nullable":true,"type":"string"},"mediaIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"journalEntryId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","occurredOn","status","response","note","mediaIds","journalEntryId","createdAt"],"additionalProperties":false}},"recheckOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"earliestHarvestOn":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"seenBefore":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"issueId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"observedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"cropName":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["open","treating","resolved","dismissed"]}},"required":["issueId","observedOn","cropName","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"scope":{"type":"string","enum":["field","farm"]}},"required":["observedOn","category","severity","title","mediaIds","photoMarks","id","farmId","status","cropId","cropName","journalEntryId","events","recheckOn","earliestHarvestOn","seenBefore","createdAt","updatedAt","scope"],"additionalProperties":false}},"careCompletions":{"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string"},"title":{"type":"string"},"completedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["taskId","title","completedOn"],"additionalProperties":false}},"alerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string","enum":["weather","price","market_event","crop_threat","satellite"]},"severity":{"type":"string","enum":["info","watch","warning"]},"origin":{"type":"string","enum":["rule","grounded_review"]},"title":{"type":"string","minLength":1,"maxLength":120},"detail":{"type":"string","minLength":1,"maxLength":600},"source":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","format":"uri"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["name","url","date"],"additionalProperties":false},"validFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"validTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"suggestedStep":{"nullable":true,"type":"string","maxLength":300},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"fieldId":{"type":"string","minLength":1,"maxLength":120},"scope":{"type":"string","enum":["field","farm"]},"dismissedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","farmId","type","severity","origin","title","detail","source","validFrom","validTo","suggestedStep","createdAt","dismissedAt"],"additionalProperties":false}},"ndvi":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"meanNdvi":{"nullable":true,"type":"number","minimum":-1,"maximum":1},"clearFraction":{"nullable":true,"type":"number","minimum":0,"maximum":1},"verdict":{"type":"string","maxLength":80}},"required":["date","meanNdvi","clearFraction","verdict"],"additionalProperties":false}},"issueTrend":{"type":"array","items":{"type":"object","properties":{"weekStart":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"counts":{"type":"object","properties":{"pest":{"type":"integer","minimum":0,"maximum":9007199254740991},"disease":{"type":"integer","minimum":0,"maximum":9007199254740991},"weed":{"type":"integer","minimum":0,"maximum":9007199254740991},"water_stress":{"type":"integer","minimum":0,"maximum":9007199254740991},"nutrient":{"type":"integer","minimum":0,"maximum":9007199254740991},"weather_damage":{"type":"integer","minimum":0,"maximum":9007199254740991},"animal_damage":{"type":"integer","minimum":0,"maximum":9007199254740991},"other":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["pest","disease","weed","water_stress","nutrient","weather_damage","animal_damage","other"],"additionalProperties":false}},"required":["weekStart","counts"],"additionalProperties":false}},"previousSeasons":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"cycleId":{"type":"string"},"cropName":{"type":"string"},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"harvestDate":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"issueCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"checksCompleted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["cycleId","cropName","sowingDate","harvestDate","issueCount","checksCompleted"],"additionalProperties":false}},"generatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"limitations":{"type":"array","items":{"type":"string"}}},"required":["farm","field","cycle","period","entries","checks","issues","careCompletions","alerts","ndvi","issueTrend","previousSeasons","generatedAt","limitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/season-report.csv":{"get":{"tags":["farms"],"description":"The same report as UTF-8 CSV (header row; one row per dated record; every cell quoted; a cell starting with = + - or @ is prefixed with a quote; details are capped at 500 characters). Select the crop with `cycleId`, or with `fieldId` (that field's current cycle). A farm with fields needs one of them (400 field_required); an unknown field is 404 field_not_found, an unknown cycle 404 cycle_not_found. A farm without fields defaults to its current crop.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"query","name":"cycleId","required":false},{"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"in":"query","name":"fieldId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api/v1/farms/{id}/crop-journey":{"post":{"tags":["farms"],"description":"Requests generated stage illustrations of a crop's growth cycle on this field (Meta image edits of the latest usable satellite scene, else the latest field photo with a confirmed region, inside the field outline; QA-checked). Live mode with a model key only. Up to 5 illustrated stages (first, last and up to three evenly spaced), the rest schematic. One journey per crop, field and IST day (a repeat returns it, deduplicated), at most 3 per farm per day. 202 while queued or running, 200 otherwise (ready, partial, failed, unavailable: runtime_mode, no_source_image, field_required, daily_cap, budget).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cropId":{"type":"string","maxLength":120},"productId":{"type":"string","maxLength":200},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["cropId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"journeyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldId":{"nullable":true,"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"productId":{"nullable":true,"type":"string","maxLength":200},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["queued","running","ready","partial","failed","unavailable"]},"reason":{"nullable":true,"type":"string","maxLength":80},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["satellite","photo","none"]},"itemId":{"nullable":true,"type":"string","maxLength":200},"date":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["kind","itemId","date"],"additionalProperties":false},"deduplicated":{"type":"boolean"},"stages":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"stageId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":80},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"targetDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"illustrated":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable","schematic"]},"reason":{"nullable":true,"type":"string","maxLength":80},"assetId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"imagePath":{"nullable":true,"type":"string"},"guidance":{"nullable":true,"type":"string","maxLength":400},"label":{"type":"string","maxLength":120}},"required":["stageId","name","from","to","targetDate","illustrated","status","reason","assetId","imagePath","guidance","label"],"additionalProperties":false}},"disclaimer":{"type":"string","maxLength":300},"limitations":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":300}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["journeyId","farmId","fieldId","cropId","cropName","productId","sowingDate","status","reason","source","deduplicated","stages","disclaimer","limitations","createdAt","updatedAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"journeyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldId":{"nullable":true,"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"productId":{"nullable":true,"type":"string","maxLength":200},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["queued","running","ready","partial","failed","unavailable"]},"reason":{"nullable":true,"type":"string","maxLength":80},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["satellite","photo","none"]},"itemId":{"nullable":true,"type":"string","maxLength":200},"date":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["kind","itemId","date"],"additionalProperties":false},"deduplicated":{"type":"boolean"},"stages":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"stageId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":80},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"targetDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"illustrated":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable","schematic"]},"reason":{"nullable":true,"type":"string","maxLength":80},"assetId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"imagePath":{"nullable":true,"type":"string"},"guidance":{"nullable":true,"type":"string","maxLength":400},"label":{"type":"string","maxLength":120}},"required":["stageId","name","from","to","targetDate","illustrated","status","reason","assetId","imagePath","guidance","label"],"additionalProperties":false}},"disclaimer":{"type":"string","maxLength":300},"limitations":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":300}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["journeyId","farmId","fieldId","cropId","cropName","productId","sowingDate","status","reason","source","deduplicated","stages","disclaimer","limitations","createdAt","updatedAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/crop-journey/{journeyId}":{"get":{"tags":["farms"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"journeyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"journeyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldId":{"nullable":true,"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"cropId":{"type":"string","maxLength":120},"cropName":{"type":"string","maxLength":120},"productId":{"nullable":true,"type":"string","maxLength":200},"sowingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"status":{"type":"string","enum":["queued","running","ready","partial","failed","unavailable"]},"reason":{"nullable":true,"type":"string","maxLength":80},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["satellite","photo","none"]},"itemId":{"nullable":true,"type":"string","maxLength":200},"date":{"nullable":true,"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["kind","itemId","date"],"additionalProperties":false},"deduplicated":{"type":"boolean"},"stages":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"stageId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":80},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"targetDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"illustrated":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","ready","failed","unavailable","schematic"]},"reason":{"nullable":true,"type":"string","maxLength":80},"assetId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"imagePath":{"nullable":true,"type":"string"},"guidance":{"nullable":true,"type":"string","maxLength":400},"label":{"type":"string","maxLength":120}},"required":["stageId","name","from","to","targetDate","illustrated","status","reason","assetId","imagePath","guidance","label"],"additionalProperties":false}},"disclaimer":{"type":"string","maxLength":300},"limitations":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":300}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["journeyId","farmId","fieldId","cropId","cropName","productId","sowingDate","status","reason","source","deduplicated","stages","disclaimer","limitations","createdAt","updatedAt"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/plans":{"post":{"tags":["plans"],"description":"Creates an immutable plan snapshot and its computed outputs. Mode is server-derived; ownerId comes from the session. Identical inputs return the existing snapshot. Supports Idempotency-Key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cropId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"productId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"plantingDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"areaHa":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100000},"irrigationCategory":{"type":"string","enum":["rainfed","supplemental","irrigated"]},"assumedPriceInrPerKg":{"type":"number","minimum":0,"maximum":1000000},"scenarioId":{"type":"string","enum":["early","late"]},"decisionCutoff":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["farmId","cropId","productId","plantingDate"],"additionalProperties":false},{"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cropId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"productId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"confirmedInputs":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["quantity"]},"value":{"nullable":true,"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["range"]},"value":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["category"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false}]}},"required":["key","value"],"additionalProperties":false}},"assumptions":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"description":{"type":"string","minLength":1},"value":{"nullable":true,"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["quantity"]},"value":{"nullable":true,"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["range"]},"value":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["category"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false}]},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}}},"required":["id","description","value","evidenceIds"],"additionalProperties":false}},"ruleVersions":{"default":[],"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","minLength":1}]}},"required":["id","version"],"additionalProperties":false}},"stageDefinitions":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"cropId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"varietyId":{"nullable":true,"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"seasons":{"type":"array","items":{"type":"string","enum":["kharif","rabi","zaid","perennial"]}},"stageId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"name":{"type":"string","minLength":1},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"startsAfter":{"nullable":true,"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"prerequisites":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"method":{"type":"string","enum":["calendar_days","thermal_time"]},"durationDays":{"type":"object","properties":{"min":{"type":"integer","minimum":0,"maximum":9007199254740991},"max":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"thermal":{"nullable":true,"type":"object","properties":{"baseTempC":{"type":"number"},"gddMin":{"type":"number","minimum":0,"exclusiveMinimum":true},"gddMax":{"type":"number","minimum":0,"exclusiveMinimum":true},"validated":{"type":"boolean","enum":[true]},"evidenceIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}}},"required":["baseTempC","gddMin","gddMax","validated","evidenceIds"],"additionalProperties":false},"isHarvest":{"type":"boolean"},"repeat":{"nullable":true,"type":"object","properties":{"intervalDays":{"type":"object","properties":{"min":{"type":"integer","minimum":0,"maximum":9007199254740991},"max":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"maxOccurrences":{"type":"integer","minimum":2,"maximum":9007199254740991}},"required":["intervalDays","maxOccurrences"],"additionalProperties":false},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"limitations":{"type":"array","items":{"type":"string","minLength":1}},"reviewStatus":{"type":"string","enum":["synthetic","candidate","approved","disabled"]}},"required":["schemaVersion","id","mode","cropId","varietyId","scope","seasons","stageId","name","order","startsAfter","prerequisites","method","durationDays","thermal","isHarvest","repeat","evidenceIds","limitations","reviewStatus"],"additionalProperties":false}},"parameters":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"taskTemplateSet":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","minLength":1}]}},"required":["id","version"],"additionalProperties":false},"taskTemplates":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"stageId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"taskType":{"type":"string","enum":["prepare_land","plant","irrigate","scout","weed","nutrient","protect","harvest","sell","record_observation","other"]},"description":{"type":"string","minLength":1,"maxLength":500},"anchor":{"type":"string","enum":["stage_start","stage_end","stage_span"]},"startOffsetDays":{"type":"integer","minimum":-365,"maximum":365},"endOffsetDays":{"type":"integer","minimum":-365,"maximum":365},"offsetBasis":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["rule"]},"ruleId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"ruleVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","ruleId","ruleVersion"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["assumption"]},"assumptionId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"required":["kind","assumptionId"],"additionalProperties":false}]},"reasonCode":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,80}$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"dependsOn":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"irrigation":{"type":"array","items":{"type":"string","enum":["rainfed","supplemental","irrigated"]}},"amount":{"nullable":true,"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["quantity"]},"value":{"nullable":true,"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["range"]},"value":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["category"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false}]},"trigger":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["daily_rain_gte"]},"thresholdAssumptionId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"required":["type","thresholdAssumptionId"],"additionalProperties":false}},"required":["id","stageId","taskType","description","anchor","startOffsetDays","endOffsetDays","offsetBasis","reasonCode","evidenceIds","dependsOn","irrigation","amount","trigger"],"additionalProperties":false}},"water":{"nullable":true,"type":"object","properties":{"kcByStage":{"type":"array","items":{"type":"object","properties":{"stageId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"kc":{"type":"number","minimum":0,"maximum":2},"kcSource":{"type":"string","minLength":1}},"required":["stageId","kc","kcSource"],"additionalProperties":false}},"rootZone":{"type":"object","properties":{"totalAvailableWaterMm":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true},"depletionFraction":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1,"exclusiveMaximum":true},"initialDepletionMm":{"type":"number","minimum":0},"basis":{"type":"string","minLength":1}},"required":["totalAvailableWaterMm","depletionFraction","initialDepletionMm","basis"],"additionalProperties":false},"effectiveRain":{"oneOf":[{"type":"object","properties":{"method":{"type":"string","enum":["fixed_fraction"]},"fraction":{"type":"number","minimum":0,"maximum":1}},"required":["method","fraction"],"additionalProperties":false},{"type":"object","properties":{"method":{"type":"string","enum":["usda_scs_monthly"]}},"required":["method"],"additionalProperties":false}]},"forecastRainPolicy":{"type":"string","enum":["use_forecast","ignore_forecast"]},"irrigationEfficiency":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1},"tawScenariosMm":{"type":"array","items":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"required":["kcByStage","rootZone","effectiveRain","forecastRainPolicy","irrigationEfficiency","tawScenariosMm"],"additionalProperties":false},"economics":{"nullable":true,"type":"object","properties":{"marketIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"priceProductBasis":{"type":"string","enum":["fresh","dry","green","grain","paddy","milled","kapas","lint","seed","tuber","bulb","rhizome","pod","kernel","fruit","whole","split","other"]},"yield":{"nullable":true,"type":"object","properties":{"productBasis":{"type":"string","enum":["fresh","dry","green","grain","paddy","milled","kapas","lint","seed","tuber","bulb","rhizome","pod","kernel","fruit","whole","split","other"]},"unit":{"type":"string","enum":["kg/ha","kg/acre"]},"amount":{"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"central":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","central","high"],"additionalProperties":false},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}}},"required":["productBasis","unit","amount","evidenceState","evidenceIds"],"additionalProperties":false},"marketableFraction":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"central":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","central","high"],"additionalProperties":false},"harvestShares":{"nullable":true,"type":"array","items":{"type":"number","minimum":0,"maximum":1}},"conversion":{"nullable":true,"type":"object","properties":{"fromBasis":{"type":"string","enum":["fresh","dry","green","grain","paddy","milled","kapas","lint","seed","tuber","bulb","rhizome","pod","kernel","fruit","whole","split","other"]},"toBasis":{"type":"string","enum":["fresh","dry","green","grain","paddy","milled","kapas","lint","seed","tuber","bulb","rhizome","pod","kernel","fruit","whole","split","other"]},"outputKgPerInputKg":{"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"central":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","central","high"],"additionalProperties":false},"processingCostInrPerOutputKg":{"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"central":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","central","high"],"additionalProperties":false},"evidenceIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}}},"required":["fromBasis","toBasis","outputKgPerInputKg","processingCostInrPerOutputKg","evidenceIds"],"additionalProperties":false},"costs":{"type":"object","properties":{"cashProduction":{"nullable":true,"type":"object","properties":{"basis":{"type":"string","enum":["per_ha","per_kg_marketable"]},"amountInr":{"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"central":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","central","high"],"additionalProperties":false},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"definition":{"type":"string","minLength":1}},"required":["basis","amountInr","evidenceIds","definition"],"additionalProperties":false},"harvest":{"nullable":true,"type":"object","properties":{"basis":{"type":"string","enum":["per_ha","per_kg_marketable"]},"amountInr":{"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"central":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","central","high"],"additionalProperties":false},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"definition":{"type":"string","minLength":1}},"required":["basis","amountInr","evidenceIds","definition"],"additionalProperties":false},"saleAndTransport":{"nullable":true,"type":"object","properties":{"basis":{"type":"string","enum":["per_ha","per_kg_marketable"]},"amountInr":{"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"central":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","central","high"],"additionalProperties":false},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"definition":{"type":"string","minLength":1}},"required":["basis","amountInr","evidenceIds","definition"],"additionalProperties":false},"fullEconomic":{"nullable":true,"type":"object","properties":{"amountInrPerHa":{"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"central":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","central","high"],"additionalProperties":false},"definition":{"type":"string","enum":["A2+FL","C2","C3","farmer_defined","other_documented"]},"includesHarvest":{"type":"boolean"},"includesSaleAndTransport":{"type":"boolean"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}}},"required":["amountInrPerHa","definition","includesHarvest","includesSaleAndTransport","evidenceIds"],"additionalProperties":false}},"required":["cashProduction","harvest","saleAndTransport","fullEconomic"],"additionalProperties":false},"unpricedItems":{"type":"array","items":{"type":"string","minLength":1}}},"required":["marketIds","priceProductBasis","yield","marketableFraction","harvestShares","conversion","costs","unpricedItems"],"additionalProperties":false}},"required":["schemaVersion","taskTemplateSet","taskTemplates","water","economics"],"additionalProperties":false},"sourceSnapshotId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"decisionCutoff":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["farmId","cropId","productId","confirmedInputs","stageDefinitions","parameters"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"snapshot":{"readOnly":true,"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"parentId":{"nullable":true,"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"parentContentHash":{"nullable":true,"type":"string","pattern":"^[0-9a-f]{64}$"},"ownerId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"farmId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"cropId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"productId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"decidedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"sourceSnapshotId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"confirmedInputs":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["quantity"]},"value":{"nullable":true,"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["range"]},"value":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["category"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false}]}},"required":["key","value"],"additionalProperties":false}},"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"description":{"type":"string","minLength":1},"value":{"nullable":true,"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["quantity"]},"value":{"nullable":true,"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["range"]},"value":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["category"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false}]},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}}},"required":["id","description","value","evidenceIds"],"additionalProperties":false}},"ruleVersions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","minLength":1}]}},"required":["id","version"],"additionalProperties":false}},"modelVersions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","minLength":1}]}},"required":["id","version"],"additionalProperties":false}},"outputIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"contentHash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["schemaVersion","id","parentId","parentContentHash","ownerId","farmId","cropId","productId","createdAt","decidedAt","mode","sourceSnapshotId","confirmedInputs","assumptions","ruleVersions","modelVersions","outputIds","contentHash"],"additionalProperties":false},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["inputs","stage_windows","harvest_windows","tasks","water","market_outlook","economics","change_summary"]},"planId":{"type":"string"},"methodVersion":{"nullable":true,"type":"string"},"contentHash":{"type":"string"},"output":{}},"required":["id","kind","planId","methodVersion","contentHash","output"],"additionalProperties":false}},"lineage":{"type":"object","properties":{"parentId":{"nullable":true,"type":"string"},"childIds":{"type":"array","items":{"type":"string"}}},"required":["parentId","childIds"],"additionalProperties":false},"deduplicated":{"type":"boolean"}},"required":["snapshot","outputs","lineage","deduplicated"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"snapshot":{"readOnly":true,"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"parentId":{"nullable":true,"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"parentContentHash":{"nullable":true,"type":"string","pattern":"^[0-9a-f]{64}$"},"ownerId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"farmId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"cropId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"productId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"decidedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"sourceSnapshotId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"confirmedInputs":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["quantity"]},"value":{"nullable":true,"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["range"]},"value":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["category"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false}]}},"required":["key","value"],"additionalProperties":false}},"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"description":{"type":"string","minLength":1},"value":{"nullable":true,"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["quantity"]},"value":{"nullable":true,"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["range"]},"value":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["category"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false}]},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}}},"required":["id","description","value","evidenceIds"],"additionalProperties":false}},"ruleVersions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","minLength":1}]}},"required":["id","version"],"additionalProperties":false}},"modelVersions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","minLength":1}]}},"required":["id","version"],"additionalProperties":false}},"outputIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"contentHash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["schemaVersion","id","parentId","parentContentHash","ownerId","farmId","cropId","productId","createdAt","decidedAt","mode","sourceSnapshotId","confirmedInputs","assumptions","ruleVersions","modelVersions","outputIds","contentHash"],"additionalProperties":false},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["inputs","stage_windows","harvest_windows","tasks","water","market_outlook","economics","change_summary"]},"planId":{"type":"string"},"methodVersion":{"nullable":true,"type":"string"},"contentHash":{"type":"string"},"output":{}},"required":["id","kind","planId","methodVersion","contentHash","output"],"additionalProperties":false}},"lineage":{"type":"object","properties":{"parentId":{"nullable":true,"type":"string"},"childIds":{"type":"array","items":{"type":"string"}}},"required":["parentId","childIds"],"additionalProperties":false},"deduplicated":{"type":"boolean"}},"required":["snapshot","outputs","lineage","deduplicated"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/plans/{id}":{"get":{"tags":["plans"],"description":"Owner-scoped saved snapshot with all supporting outputs. Other owners' plans are 404.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"snapshot":{"readOnly":true,"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"parentId":{"nullable":true,"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"parentContentHash":{"nullable":true,"type":"string","pattern":"^[0-9a-f]{64}$"},"ownerId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"farmId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"cropId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"productId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"decidedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"sourceSnapshotId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"confirmedInputs":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["quantity"]},"value":{"nullable":true,"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["range"]},"value":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["category"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false}]}},"required":["key","value"],"additionalProperties":false}},"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"description":{"type":"string","minLength":1},"value":{"nullable":true,"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["quantity"]},"value":{"nullable":true,"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["range"]},"value":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["category"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false}]},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}}},"required":["id","description","value","evidenceIds"],"additionalProperties":false}},"ruleVersions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","minLength":1}]}},"required":["id","version"],"additionalProperties":false}},"modelVersions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","minLength":1}]}},"required":["id","version"],"additionalProperties":false}},"outputIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"contentHash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["schemaVersion","id","parentId","parentContentHash","ownerId","farmId","cropId","productId","createdAt","decidedAt","mode","sourceSnapshotId","confirmedInputs","assumptions","ruleVersions","modelVersions","outputIds","contentHash"],"additionalProperties":false},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["inputs","stage_windows","harvest_windows","tasks","water","market_outlook","economics","change_summary"]},"planId":{"type":"string"},"methodVersion":{"nullable":true,"type":"string"},"contentHash":{"type":"string"},"output":{}},"required":["id","kind","planId","methodVersion","contentHash","output"],"additionalProperties":false}},"lineage":{"type":"object","properties":{"parentId":{"nullable":true,"type":"string"},"childIds":{"type":"array","items":{"type":"string"}}},"required":["parentId","childIds"],"additionalProperties":false},"deduplicated":{"type":"boolean"}},"required":["snapshot","outputs","lineage","deduplicated"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/plans/{id}/revisions":{"post":{"tags":["plans"],"description":"Creates a revision from typed, user-confirmed changes. expectedParentContentHash must match the plan and the plan must be the latest version (409 version_conflict otherwise). The old plan and outputs stay readable.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedParentContentHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"changes":{"minItems":1,"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["planting_date"]},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","date"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["area"]},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string","enum":["ha","acre"]}},"required":["type","amount","unit"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["irrigation_category"]},"category":{"type":"string","enum":["rainfed","supplemental","irrigated"]}},"required":["type","category"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["observed_stage"]},"stageId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"observedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"journalEntryId":{"nullable":true,"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"basis":{"type":"string","enum":["observed","farmer_reported"]}},"required":["type","stageId","observedOn","journalEntryId","basis"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["cost_override"]},"line":{"type":"string","enum":["cashProduction","harvest","saleAndTransport"]},"cost":{"nullable":true,"type":"object","properties":{"basis":{"type":"string","enum":["per_ha","per_kg_marketable"]},"amountInr":{"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"central":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","central","high"],"additionalProperties":false},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"definition":{"type":"string","minLength":1}},"required":["basis","amountInr","evidenceIds","definition"],"additionalProperties":false}},"required":["type","line","cost"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["assumed_price"]},"price":{"nullable":true,"type":"object","properties":{"unit":{"type":"string","enum":["INR/kg","INR/quintal"]},"low":{"type":"number","minimum":0},"high":{"type":"number","minimum":0}},"required":["unit","low","high"],"additionalProperties":false}},"required":["type","price"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["scenario_selection"]},"selection":{"type":"object","properties":{"stageTiming":{"type":"string","enum":["early","late"]},"economicsScenario":{"type":"string","enum":["low","central","high","yield_shortfall_price_rise"]}},"required":["stageTiming","economicsScenario"],"additionalProperties":false}},"required":["type","selection"],"additionalProperties":false}]}}},"required":["expectedParentContentHash","changes"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"snapshot":{"readOnly":true,"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"parentId":{"nullable":true,"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"parentContentHash":{"nullable":true,"type":"string","pattern":"^[0-9a-f]{64}$"},"ownerId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"farmId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"cropId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"productId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"decidedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"sourceSnapshotId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"confirmedInputs":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["quantity"]},"value":{"nullable":true,"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["range"]},"value":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["category"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false}]}},"required":["key","value"],"additionalProperties":false}},"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"description":{"type":"string","minLength":1},"value":{"nullable":true,"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["quantity"]},"value":{"nullable":true,"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["range"]},"value":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["category"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false}]},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}}},"required":["id","description","value","evidenceIds"],"additionalProperties":false}},"ruleVersions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","minLength":1}]}},"required":["id","version"],"additionalProperties":false}},"modelVersions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","minLength":1}]}},"required":["id","version"],"additionalProperties":false}},"outputIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"contentHash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["schemaVersion","id","parentId","parentContentHash","ownerId","farmId","cropId","productId","createdAt","decidedAt","mode","sourceSnapshotId","confirmedInputs","assumptions","ruleVersions","modelVersions","outputIds","contentHash"],"additionalProperties":false},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["inputs","stage_windows","harvest_windows","tasks","water","market_outlook","economics","change_summary"]},"planId":{"type":"string"},"methodVersion":{"nullable":true,"type":"string"},"contentHash":{"type":"string"},"output":{}},"required":["id","kind","planId","methodVersion","contentHash","output"],"additionalProperties":false}},"lineage":{"type":"object","properties":{"parentId":{"nullable":true,"type":"string"},"childIds":{"type":"array","items":{"type":"string"}}},"required":["parentId","childIds"],"additionalProperties":false},"deduplicated":{"type":"boolean"}},"required":["snapshot","outputs","lineage","deduplicated"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"snapshot":{"readOnly":true,"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"parentId":{"nullable":true,"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"parentContentHash":{"nullable":true,"type":"string","pattern":"^[0-9a-f]{64}$"},"ownerId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"farmId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"cropId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"productId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"decidedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"sourceSnapshotId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"confirmedInputs":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["quantity"]},"value":{"nullable":true,"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["range"]},"value":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["category"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false}]}},"required":["key","value"],"additionalProperties":false}},"assumptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"description":{"type":"string","minLength":1},"value":{"nullable":true,"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["quantity"]},"value":{"nullable":true,"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["range"]},"value":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["category"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false}]},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}}},"required":["id","description","value","evidenceIds"],"additionalProperties":false}},"ruleVersions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","minLength":1}]}},"required":["id","version"],"additionalProperties":false}},"modelVersions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","minLength":1}]}},"required":["id","version"],"additionalProperties":false}},"outputIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"contentHash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["schemaVersion","id","parentId","parentContentHash","ownerId","farmId","cropId","productId","createdAt","decidedAt","mode","sourceSnapshotId","confirmedInputs","assumptions","ruleVersions","modelVersions","outputIds","contentHash"],"additionalProperties":false},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["inputs","stage_windows","harvest_windows","tasks","water","market_outlook","economics","change_summary"]},"planId":{"type":"string"},"methodVersion":{"nullable":true,"type":"string"},"contentHash":{"type":"string"},"output":{}},"required":["id","kind","planId","methodVersion","contentHash","output"],"additionalProperties":false}},"lineage":{"type":"object","properties":{"parentId":{"nullable":true,"type":"string"},"childIds":{"type":"array","items":{"type":"string"}}},"required":["parentId","childIds"],"additionalProperties":false},"deduplicated":{"type":"boolean"}},"required":["snapshot","outputs","lineage","deduplicated"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/plans/{id}/timeline":{"get":{"tags":["plans"],"description":"Date-indexed stages, tasks, weather horizon, water, outlook and visual map. Computed once per (plan, scenario, data version) and cached; from/to slice the cached season.","parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false},{"schema":{"type":"string","enum":["early","late"]},"in":"query","name":"scenarioId","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"planId":{"type":"string"},"planContentHash":{"type":"string"},"scenarioId":{"type":"string","enum":["early","late"]},"dataVersion":{"type":"string"},"asOfDate":{"type":"string"},"cached":{"type":"boolean"},"range":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},"days":{"type":"array","items":{"type":"object","properties":{"calendarDate":{"type":"string"},"daysAfterPlanting":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"markers":{"type":"object","properties":{"planting":{"type":"boolean"},"asOf":{"type":"boolean"},"past":{"type":"boolean"}},"required":["planting","asOf","past"],"additionalProperties":false},"expectedStage":{"nullable":true,"type":"object","properties":{"stageId":{"type":"string"},"occurrence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"window":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"required":["start","end"],"additionalProperties":false},"inferred":{"type":"boolean","enum":[true]},"basis":{"type":"string","enum":["calendar_estimate","observed_stage_override"]},"possibleStageIds":{"type":"array","items":{"type":"string"}}},"required":["stageId","occurrence","window","inferred","basis","possibleStageIds"],"additionalProperties":false},"tasks":{"type":"object","properties":{"due":{"type":"array","items":{"type":"string"}},"overdue":{"type":"array","items":{"type":"string"}},"done":{"type":"array","items":{"type":"string"}},"conditionFlags":{"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string"},"rainMm":{"type":"number"},"weatherState":{"type":"string","enum":["observed","forecast"]},"thresholdMm":{"type":"number"},"thresholdAssumptionId":{"type":"string"}},"required":["taskId","rainMm","weatherState","thresholdMm","thresholdAssumptionId"],"additionalProperties":false}}},"required":["due","overdue","done","conditionFlags"],"additionalProperties":false},"weather":{"type":"object","properties":{"state":{"type":"string","enum":["observed","forecast","scenario","unavailable"]},"values":{"nullable":true,"type":"object","properties":{"rainMm":{"nullable":true,"type":"number"},"et0Mm":{"nullable":true,"type":"number"},"tMaxC":{"nullable":true,"type":"number"},"tMinC":{"nullable":true,"type":"number"}},"required":["rainMm","et0Mm","tMaxC","tMinC"],"additionalProperties":false},"issuedAt":{"nullable":true,"type":"string"},"horizonDays":{"nullable":true,"type":"number"},"assumptionId":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"missingReason":{"nullable":true,"type":"string"}},"required":["state","values","issuedAt","horizonDays","assumptionId","sourceId","missingReason"],"additionalProperties":false},"water":{"type":"object","properties":{"state":{"type":"string","enum":["derived","scenario","unavailable"]},"outputId":{"nullable":true,"type":"string"},"missingReason":{"nullable":true,"type":"string"}},"required":["state","outputId","missingReason"],"additionalProperties":false},"outlook":{"type":"object","properties":{"state":{"type":"string","enum":["forecast","farmer_reported","unavailable"]},"harvestPeriodId":{"nullable":true,"type":"string"},"artifactId":{"nullable":true,"type":"string"},"issuedAt":{"nullable":true,"type":"string"},"missingReason":{"nullable":true,"type":"string"}},"required":["state","harvestPeriodId","artifactId","issuedAt","missingReason"],"additionalProperties":false},"visual":{"type":"object","properties":{"assetId":{"nullable":true,"type":"string"},"state":{"type":"string","enum":["observed_photo","illustrative","schematic","none"]}},"required":["assetId","state"],"additionalProperties":false},"evidenceRefs":{"type":"array","items":{"type":"string"}}},"required":["calendarDate","daysAfterPlanting","markers","expectedStage","tasks","weather","water","outlook","visual","evidenceRefs"],"additionalProperties":false}}},"required":["planId","planContentHash","scenarioId","dataVersion","asOfDate","cached","range","days"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/assistant/turns":{"post":{"tags":["assistant"],"description":"Runs one assistant turn: interpretation, allowlisted tool calls, strict structured synthesis and the independent output gate. Only gate-approved answer blocks are returned. Mode and owner are server-derived. In synthetic mode answers replay recorded synthetic fixtures (provenance synthetic_fixture); live mode without a Meta key returns 503 provider_unavailable. costEstimate is an estimate, not a billed amount. Supports Idempotency-Key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":2000},"confirmedTranscript":{"type":"string","minLength":1,"maxLength":2000},"language":{"type":"string","enum":["en","ta","hi"]},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z0-9_.-]+$"},"planId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"selectedDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"scenarioId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"required":["language"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"status":{"type":"string","enum":["approved","partial","incomplete","provider_unavailable","budget_exceeded","cancelled","failed"]},"provenance":{"type":"string","enum":["meta_live","synthetic_fixture"]},"traceId":{"type":"string"},"intent":{"nullable":true,"type":"string"},"language":{"type":"string"},"gateStatus":{"nullable":true,"type":"string","enum":["approved","partial","correction_requested","unverified"]},"answerBlocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"kind":{"type":"string","enum":["text","numeric","warning","limitation","evidence"]},"text":{"type":"string","minLength":1,"maxLength":4000},"numericRefIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"claimIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}}},"required":["id","kind","text","numericRefIds","claimIds"],"additionalProperties":false}},"numericRefs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"toolResultId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"jsonPointer":{"type":"string","pattern":"^(\\/([^~\\/]|~[01])*)*$"},"presentation":{"type":"object","properties":{"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]},"sourceUnit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]},"rounding":{"type":"object","properties":{"mode":{"type":"string","enum":["decimals","significant"]},"digits":{"type":"integer","minimum":0,"maximum":6}},"required":["mode","digits"],"additionalProperties":false},"intervalLabel":{"default":"none","type":"string","enum":["none","low","central","high","quantile"]}},"required":["unit","sourceUnit","rounding","intervalLabel"],"additionalProperties":false}},"required":["id","toolResultId","jsonPointer","presentation"],"additionalProperties":false}},"claimEvidenceRefs":{"type":"array","items":{"type":"object","properties":{"claimId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"text":{"type":"string","minLength":1,"maxLength":1000},"evidenceIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"cropIds":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"productIds":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"granularity":{"type":"string","enum":["district","state","region","national"]}},"required":["claimId","text","evidenceIds"],"additionalProperties":false}},"proposedFacts":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"value":{"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["quantity"]},"value":{"nullable":true,"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["range"]},"value":{"nullable":true,"type":"object","properties":{"low":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]},"high":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^-?(0|[1-9]\\d*)(\\.\\d{1,6})?$"}]}},"required":["low","high"],"additionalProperties":false},"unit":{"type":"string","enum":["ha","acre","kg","quintal","t","INR","INR/kg","INR/quintal","INR/ha","mm","L","m3","kg/ha","kg/acre","days","celsius","percent","m","cm","g","months","index","GJ","kgCO2e","tCO2e","pH","dS/m","ppm","mg/kg","mm/week"]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["category"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"evidenceState":{"type":"string","enum":["observed","farmer_reported","derived","forecast","scenario","illustrative","unavailable"]},"scope":{"type":"object","properties":{"level":{"type":"string","enum":["farm","district","state","market","region","national"]},"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"boundaryVersion":{"type":"string","minLength":1}},"required":["level","ids"],"additionalProperties":false},"validFrom":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"validTo":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"issuedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"assumptionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"}},"methodVersion":{"nullable":true,"type":"string","minLength":1},"validationStatus":{"type":"string","enum":["validated","grounded","unsupported","pending","rejected"]},"missingReason":{"nullable":true,"type":"string","minLength":1},"sourceUnit":{"type":"string","minLength":1},"kind":{"type":"string","enum":["text"]},"value":{"nullable":true,"type":"string","minLength":1},"unit":{"type":"string","nullable":true,"enum":[null]}},"required":["schemaVersion","evidenceState","scope","validFrom","validTo","issuedAt","evidenceIds","assumptionIds","methodVersion","validationStatus","missingReason","kind","value","unit"],"additionalProperties":false}]},"sourceSpan":{"nullable":true,"type":"string","maxLength":500},"requiresConfirmation":{"type":"boolean","enum":[true]}},"required":["field","value","sourceSpan","requiresConfirmation"],"additionalProperties":false}},"clarifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:\\/-]*$"},"question":{"type":"string","minLength":1,"maxLength":500},"field":{"nullable":true,"type":"string"},"options":{"maxItems":6,"type":"array","items":{"type":"string"}}},"required":["id","question","field","options"],"additionalProperties":false}},"approvedText":{"nullable":true,"type":"string"},"approvedTextHash":{"nullable":true,"type":"string"},"limitations":{"type":"array","items":{"type":"string"}},"incomplete":{"nullable":true,"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"}}},"required":["reasons"],"additionalProperties":false},"gateReport":{"nullable":true,"type":"object","properties":{"removed":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["answerBlock","claimEvidenceRef","limitation","clarification","clarificationOption"]},"id":{"nullable":true,"type":"string"},"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"codes":{"type":"array","items":{"type":"string"}}},"required":["field","id","index","codes"],"additionalProperties":false}},"groundedEvidenceIds":{"type":"array","items":{"type":"string"}},"templateSubstituted":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string"},"template":{"type":"string"}},"required":["blockId","template"],"additionalProperties":false}}},"required":["removed","groundedEvidenceIds","templateSubstituted"],"additionalProperties":false},"costEstimate":{"type":"object","properties":{"estimatedUsd":{"type":"number"},"settledUsd":{"type":"number"},"providerCalls":{"type":"number"},"billable":{"type":"boolean"},"basis":{"type":"string","enum":["estimated_not_billed"]}},"required":["estimatedUsd","settledUsd","providerCalls","billable","basis"],"additionalProperties":false},"ui":{"nullable":true,"type":"object","properties":{"version":{"type":"string","enum":["1"]},"origin":{"type":"string","enum":["model","fallback"]},"root":{"$ref":"#/components/schemas/schema0"},"dropped":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"line":{"type":"integer","minimum":0,"maximum":9007199254740991},"code":{"type":"string","enum":["parse-failed","unknown-component","unknown-action","missing-required","type-mismatch","excess-args","unknown-ref","cycle","prose-not-allowed","unknown-id","not-replaceable","empty-after-resolve","no-root"]},"detail":{"nullable":true,"type":"string","maxLength":200}},"required":["line","code","detail"],"additionalProperties":false}}},"required":["version","origin","root","dropped"],"additionalProperties":false}},"required":["status","provenance","traceId","intent","language","gateStatus","answerBlocks","numericRefs","claimEvidenceRefs","proposedFacts","clarifications","approvedText","approvedTextHash","limitations","incomplete","gateReport","costEstimate","ui"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"string","enum":[null]},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/media/{id}/segmentation":{"post":{"tags":["vision"],"description":"Queues a SAM region proposal job (vision.segment) for an owned image. Prompt coordinates are normalised 0..1 in the normalised image. Identical requests (same session, image hash, prompt, model) return the same job. The result is a proposal only: poll GET /jobs/:id, then confirm with PUT /media/:id/region (source sam_confirmed). Without a model credential, or in synthetic/replay mode, the job succeeds with status 'unavailable'.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["concept"]},"text":{"type":"string","minLength":1,"maxLength":40}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["box"]},"x0":{"type":"number","minimum":0,"maximum":1},"y0":{"type":"number","minimum":0,"maximum":1},"x1":{"type":"number","minimum":0,"maximum":1},"y1":{"type":"number","minimum":0,"maximum":1}},"required":["kind","x0","y0","x1","y1"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["points"]},"points":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"positive":{"type":"boolean"}},"required":["x","y"],"additionalProperties":false}}},"required":["kind","points"],"additionalProperties":false}]}},"required":["prompt"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"jobId":{"type":"string"},"state":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]},"deduplicated":{"type":"boolean"},"manualFallbackAvailable":{"type":"boolean","enum":[true]},"label":{"type":"string"}},"required":["jobId","state","deduplicated","manualFallbackAvailable","label"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/media":{"get":{"tags":["vision"],"description":"Owner-scoped list of this farm's images, newest first (at most 20), so a reloaded page can find its photo and saved region. Other owners' farms are 404.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"farmId":{"nullable":true,"type":"string"},"contentType":{"type":"string"},"bytes":{"type":"number"},"sha256":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"exifOrientation":{"nullable":true,"type":"number"},"exifCreatedAt":{"nullable":true,"type":"string"},"orientedWidth":{"type":"number"},"orientedHeight":{"type":"number"},"normalized":{"type":"object","properties":{"width":{"type":"number"},"height":{"type":"number"},"bytes":{"type":"number"},"contentType":{"type":"string","enum":["image/jpeg"]}},"required":["width","height","bytes","contentType"],"additionalProperties":false},"contentPath":{"type":"string"},"region":{"nullable":true,"type":"object","properties":{"polygon":{"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"number"}]},"minItems":2,"maxItems":2}},"source":{"type":"string","enum":["manual","sam_confirmed"]},"transform":{"type":"object","properties":{"orientationApplied":{"type":"boolean"},"normalizedWidth":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":20000},"normalizedHeight":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":20000}},"required":["orientationApplied","normalizedWidth","normalizedHeight"],"additionalProperties":false},"version":{"type":"number"}},"required":["polygon","source","transform","version"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","farmId","contentType","bytes","sha256","width","height","exifOrientation","orientedWidth","orientedHeight","normalized","contentPath","region","createdAt"],"additionalProperties":false}}},"required":["media"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/speech/status":{"get":{"tags":["speech"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"available":{"type":"boolean"},"live":{"type":"boolean"},"provider":{"nullable":true,"type":"string","enum":["meta"]},"model":{"type":"string"},"languages":{"type":"array","items":{"type":"string","enum":["en","ta","hi"]}},"maxSeconds":{"type":"number"},"maxBytes":{"type":"number"},"qualified":{"type":"boolean","enum":[false]},"ttsVoiceConfigured":{"type":"boolean","enum":[false]},"synthesisAvailable":{"type":"boolean","enum":[false]},"disabledReason":{"nullable":true,"type":"string"},"privacy":{"type":"object","properties":{"processing":{"type":"string","enum":["standard"]},"appStoresAudio":{"type":"boolean","enum":[false]},"appStoresTranscript":{"type":"boolean","enum":[false]},"responseDeletionAvailable":{"type":"boolean","enum":[false]}},"required":["processing","appStoresAudio","appStoresTranscript","responseDeletionAvailable"],"additionalProperties":false}},"required":["available","live","provider","model","languages","maxSeconds","maxBytes","qualified","ttsVoiceConfigured","synthesisAvailable","disabledReason","privacy"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/speech/synthesis":{"post":{"tags":["speech"],"description":"Retired synthesis endpoint. Always unavailable.","responses":{"200":{"description":"Default Response"}}}},"/api/v1/speech/transcriptions":{"post":{"tags":["speech"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"transcript":{"type":"string"},"detectedLanguage":{"type":"string","nullable":true,"enum":[null]},"languageProbability":{"type":"string","nullable":true,"enum":[null]},"languageMismatch":{"type":"boolean","enum":[false]},"provider":{"type":"object","properties":{"name":{"type":"string","enum":["meta"]},"requestedModel":{"type":"string"},"model":{"nullable":true,"type":"string"},"requestId":{"type":"string"}},"required":["name","requestedModel","model","requestId"],"additionalProperties":false},"usageSeconds":{"type":"number"},"synthetic":{"type":"boolean","enum":[false]}},"required":["transcript","detectedLanguage","languageProbability","languageMismatch","provider","usageSeconds","synthetic"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/crops":{"get":{"tags":["crops"],"description":"Catalogue summary with per-crop coverage summary. Coverage is per capability; there is no single quality score.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/crops/{id}":{"get":{"tags":["crops"],"description":"Crop profile, regional contexts, rules and evidence excerpts with citations.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9][a-z0-9-]*$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/crops/{id}/coverage":{"get":{"tags":["crops"],"description":"CoverageRecords for the crop.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9][a-z0-9-]*$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/districts":{"get":{"tags":["crops"],"description":"States and agro-regions, or the districts of ?state=IN-KA. District lists exist only for some states.","parameters":[{"schema":{"type":"string","pattern":"^IN-[A-Z]{2}$"},"in":"query","name":"state","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/crop-comparisons":{"post":{"tags":["crops"],"description":"Screens the catalogue against a validated profile and returns per-crop-product outcome, applied rule ids, evidence ids and supported dimensions. Anonymous use is allowed (rate limited). With farmId a guest session and CSRF token are required and the farm must belong to the caller (otherwise 404).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"location":{"type":"object","properties":{"stateId":{"type":"string","pattern":"^IN-[A-Z]{2}$"},"districtId":{"type":"string","pattern":"^IN-[A-Za-z0-9-]{2,100}$"}},"required":["stateId"],"additionalProperties":false},"planting":{"type":"object","properties":{"month":{"type":"integer","minimum":1,"maximum":12},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["month"],"additionalProperties":false},"irrigation":{"type":"string","enum":["rainfed","supplemental","irrigated","unknown"]},"soil":{"type":"object","properties":{"drainage":{"type":"string","enum":["poor","moderate","good"]},"texture":{"type":"string","enum":["sand","loamy_sand","sandy_loam","loam","silt_loam","clay_loam","silty_clay","clay"]},"ph":{"type":"number","minimum":0,"maximum":14}},"additionalProperties":false},"rainfallSeasonalMm":{"type":"number","minimum":0,"maximum":20000},"elevationM":{"type":"number","minimum":-500,"maximum":9000},"area":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000},"unit":{"type":"string","enum":["ha","acre"]}},"required":["amount","unit"],"additionalProperties":false},"budgetInrPerHa":{"type":"number","minimum":0,"maximum":100000000},"excludedCropIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"cropIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"assumedPrices":{"default":[],"maxItems":60,"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"maxLength":100},"amountInrPerKg":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000},"lowInrPerKg":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000},"highInrPerKg":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000}},"required":["productId","amountInrPerKg"],"additionalProperties":false}},"preferencePolicy":{"type":"object","properties":{"weights":{"type":"object","additionalProperties":{"type":"number","minimum":0,"maximum":10},"required":["waterFit","timeToFirstIncome","harvestWindows","evidenceQuality","marketAccess","economics"]}},"required":["weights"],"additionalProperties":false}},"required":["planting","irrigation"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/plans/{id}/visuals":{"post":{"tags":["visuals"],"description":"Queues the illustrative growth keyframes (visuals.keyframes) for a plan's stages from the owner's photo and confirmed region. Cached assets (same photo, region version, crop, stage definitions, brief and model) return immediately with no provider call. Without a model key, or in synthetic/replay mode, the stages become labelled schematics. Generated images are illustrative, never observations. Supports Idempotency-Key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"regionVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"stageIds":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"required":["mediaId","regionVersion"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"jobId":{"nullable":true,"type":"string"},"state":{"type":"string","enum":["queued","running","succeeded","failed","cancelled","cached"]},"cached":{"type":"boolean"},"deduplicated":{"type":"boolean"},"assets":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"planId":{"type":"string"},"stageId":{"nullable":true,"type":"string"},"state":{"type":"string","enum":["ready","failed","schematic","queued"]},"kind":{"type":"string","enum":["illustrative","schematic"]},"illustrative":{"type":"boolean","enum":[true]},"evidenceState":{"type":"string","enum":["illustrative"]},"label":{"type":"string"},"reason":{"nullable":true,"type":"string"},"qa":{"nullable":true,"type":"object","properties":{"passed":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"string"}}},"required":["passed","reasons"],"additionalProperties":false},"qaWarning":{"nullable":true,"type":"string"},"contentPath":{"nullable":true,"type":"string"},"provider":{"nullable":true,"type":"string"},"model":{"nullable":true,"type":"string"},"sourceMediaId":{"nullable":true,"type":"string"},"regionVersion":{"nullable":true,"type":"number"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"createdAt":{"type":"string"}},"required":["assetId","planId","stageId","state","kind","illustrative","evidenceState","label","reason","qa","qaWarning","contentPath","provider","model","sourceMediaId","regionVersion","mode","createdAt"],"additionalProperties":false}},"label":{"type":"string"}},"required":["jobId","state","cached","deduplicated","label"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"jobId":{"nullable":true,"type":"string"},"state":{"type":"string","enum":["queued","running","succeeded","failed","cancelled","cached"]},"cached":{"type":"boolean"},"deduplicated":{"type":"boolean"},"assets":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"planId":{"type":"string"},"stageId":{"nullable":true,"type":"string"},"state":{"type":"string","enum":["ready","failed","schematic","queued"]},"kind":{"type":"string","enum":["illustrative","schematic"]},"illustrative":{"type":"boolean","enum":[true]},"evidenceState":{"type":"string","enum":["illustrative"]},"label":{"type":"string"},"reason":{"nullable":true,"type":"string"},"qa":{"nullable":true,"type":"object","properties":{"passed":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"string"}}},"required":["passed","reasons"],"additionalProperties":false},"qaWarning":{"nullable":true,"type":"string"},"contentPath":{"nullable":true,"type":"string"},"provider":{"nullable":true,"type":"string"},"model":{"nullable":true,"type":"string"},"sourceMediaId":{"nullable":true,"type":"string"},"regionVersion":{"nullable":true,"type":"number"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"createdAt":{"type":"string"}},"required":["assetId","planId","stageId","state","kind","illustrative","evidenceState","label","reason","qa","qaWarning","contentPath","provider","model","sourceMediaId","regionVersion","mode","createdAt"],"additionalProperties":false}},"label":{"type":"string"}},"required":["jobId","state","cached","deduplicated","label"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}},"get":{"tags":["visuals"],"description":"Per-stage visual state for an owned plan: ready (generated, illustrative), failed, schematic, or queued while a job runs. A failed or missing keyframe never blocks the plan; the schematic label applies. qaWarning is set when scene QA found the picture changed outside the planting region.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"planId":{"type":"string"},"generating":{"type":"boolean"},"stages":{"type":"array","items":{"type":"object","properties":{"stageId":{"type":"string"},"name":{"type":"string"},"order":{"type":"number"},"state":{"type":"string","enum":["ready","failed","schematic","queued"]},"label":{"type":"string"},"asset":{"nullable":true,"type":"object","properties":{"assetId":{"type":"string"},"planId":{"type":"string"},"stageId":{"nullable":true,"type":"string"},"state":{"type":"string","enum":["ready","failed","schematic","queued"]},"kind":{"type":"string","enum":["illustrative","schematic"]},"illustrative":{"type":"boolean","enum":[true]},"evidenceState":{"type":"string","enum":["illustrative"]},"label":{"type":"string"},"reason":{"nullable":true,"type":"string"},"qa":{"nullable":true,"type":"object","properties":{"passed":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"string"}}},"required":["passed","reasons"],"additionalProperties":false},"qaWarning":{"nullable":true,"type":"string"},"contentPath":{"nullable":true,"type":"string"},"provider":{"nullable":true,"type":"string"},"model":{"nullable":true,"type":"string"},"sourceMediaId":{"nullable":true,"type":"string"},"regionVersion":{"nullable":true,"type":"number"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"createdAt":{"type":"string"}},"required":["assetId","planId","stageId","state","kind","illustrative","evidenceState","label","reason","qa","qaWarning","contentPath","provider","model","sourceMediaId","regionVersion","mode","createdAt"],"additionalProperties":false}},"required":["stageId","name","order","state","label","asset"],"additionalProperties":false}}},"required":["planId","generating","stages"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/visuals/{id}/content":{"get":{"tags":["visuals"],"description":"Streams a generated keyframe PNG to its owner only (Cache-Control: private). Other owners', schematic and failed assets are 404.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api/v1/journal":{"post":{"tags":["journal"],"description":"Saves a journal entry exactly as the farmer entered it (farmer-reported; originals are never modified). clientEntryId is the stable client id; the same id with the same content replays the saved entry (200), different content is 409. Supports Idempotency-Key. Linked crop observations queue milestone previews; provider calls run in background workers.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientEntryId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$"},"farmId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cycleId":{"type":"string","minLength":1,"maxLength":120},"planId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"observedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"note":{"type":"string","maxLength":10000},"language":{"type":"string","enum":["en","ta","hi"]},"mediaIds":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"activity":{"type":"string","enum":["planting","irrigation","weeding","fertilizer","pest_check","harvest","sale","expense","other","observation"]},"quantity":{"type":"object","properties":{"value":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000000},"unit":{"type":"string","enum":["kg","L","m3","mm","ha","acre","days","g","t","quintal"]}},"required":["value","unit"],"additionalProperties":false},"expense":{"type":"object","properties":{"amountInr":{"type":"string","pattern":"^(0|[1-9]\\d{0,9})(\\.\\d{1,2})?$"},"category":{"type":"string","minLength":1,"maxLength":60}},"required":["amountInr","category"],"additionalProperties":false},"sale":{"type":"object","properties":{"amountInr":{"type":"string","pattern":"^(0|[1-9]\\d{0,9})(\\.\\d{1,2})?$"},"note":{"type":"string","minLength":1,"maxLength":120}},"required":["amountInr"],"additionalProperties":false},"stageId":{"type":"string","minLength":1,"maxLength":100},"version":{"default":1,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["clientEntryId","farmId","observedOn"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string"},"clientEntryId":{"nullable":true,"type":"string"},"farmId":{"type":"string"},"planId":{"nullable":true,"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["draft","final"]},"observedOn":{"type":"string"},"observedAt":{"nullable":true,"type":"string"},"uploadedAt":{"nullable":true,"type":"string"},"mediaIds":{"type":"array","items":{"type":"string"}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"contentPath":{"type":"string"},"label":{"type":"string"}},"required":["id","contentPath","label"],"additionalProperties":false}},"note":{"nullable":true,"type":"string"},"language":{"nullable":true,"type":"string"},"activity":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"object","properties":{"value":{"type":"number"},"unit":{"type":"string"}},"required":["value","unit"],"additionalProperties":false},"expense":{"nullable":true,"type":"object","properties":{"amountInr":{"type":"string"},"category":{"type":"string"}},"required":["amountInr","category"],"additionalProperties":false},"sale":{"nullable":true,"type":"object","properties":{"amountInr":{"type":"string"},"note":{"nullable":true,"type":"string"}},"required":["amountInr","note"],"additionalProperties":false},"processingStatus":{"type":"string","enum":["draft","submitted","processing","ready","failed"]},"imageQuality":{},"facts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"field":{"type":"string"},"kind":{"type":"string","enum":["original","proposed","confirmed"]},"source":{"type":"string","enum":["farmer","ai"]},"status":{"type":"string","enum":["proposed","confirmed","rejected","recorded"]},"value":{},"unit":{"nullable":true,"type":"string"},"requiresConfirmation":{"type":"boolean"},"evidenceState":{"type":"string","enum":["farmer_reported","derived","illustrative"]},"confirmedAt":{"nullable":true,"type":"string"},"rejectedAt":{"nullable":true,"type":"string"},"supersedesId":{"nullable":true,"type":"string"},"analysisId":{"nullable":true,"type":"string"},"planMapped":{"type":"boolean"},"label":{"nullable":true,"type":"string"}},"required":["id","entryId","field","kind","source","status","value","unit","requiresConfirmation","evidenceState","confirmedAt","rejectedAt","supersedesId","analysisId","planMapped","label"],"additionalProperties":false}},"analysis":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"jobId":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","unavailable"]},"errorCode":{"nullable":true,"type":"string"},"provenance":{"nullable":true,"type":"string","enum":["meta_live","synthetic_fixture"]},"model":{"nullable":true,"type":"string"},"label":{"type":"string"},"aiNarrative":{"nullable":true,"type":"object","properties":{"text":{"type":"string"},"evidenceState":{"type":"string","enum":["derived","illustrative"]},"label":{"type":"string"}},"required":["text","evidenceState","label"],"additionalProperties":false},"visibleObservations":{"type":"array","items":{"type":"string"}},"competingInterpretations":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"rationale":{"type":"string"}},"required":["label","rationale"],"additionalProperties":false}},"missingContext":{"type":"array","items":{"type":"string"}},"imageQualityIssues":{"type":"array","items":{"type":"string"}},"requestAnotherAngle":{"type":"boolean"},"gateIssues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"detail":{"type":"string"}},"required":["code","detail"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","jobId","status","errorCode","provenance","model","label","aiNarrative","visibleObservations","competingInterpretations","missingContext","imageQualityIssues","requestAnotherAngle","gateIssues","createdAt"],"additionalProperties":false},"provenanceLabel":{"type":"string"}},"required":["id","clientEntryId","farmId","planId","mode","version","status","observedOn","observedAt","uploadedAt","mediaIds","media","note","language","activity","quantity","expense","sale","processingStatus","imageQuality","facts","analysis","provenanceLabel"],"additionalProperties":false}},"required":["entry"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string"},"clientEntryId":{"nullable":true,"type":"string"},"farmId":{"type":"string"},"planId":{"nullable":true,"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["draft","final"]},"observedOn":{"type":"string"},"observedAt":{"nullable":true,"type":"string"},"uploadedAt":{"nullable":true,"type":"string"},"mediaIds":{"type":"array","items":{"type":"string"}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"contentPath":{"type":"string"},"label":{"type":"string"}},"required":["id","contentPath","label"],"additionalProperties":false}},"note":{"nullable":true,"type":"string"},"language":{"nullable":true,"type":"string"},"activity":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"object","properties":{"value":{"type":"number"},"unit":{"type":"string"}},"required":["value","unit"],"additionalProperties":false},"expense":{"nullable":true,"type":"object","properties":{"amountInr":{"type":"string"},"category":{"type":"string"}},"required":["amountInr","category"],"additionalProperties":false},"sale":{"nullable":true,"type":"object","properties":{"amountInr":{"type":"string"},"note":{"nullable":true,"type":"string"}},"required":["amountInr","note"],"additionalProperties":false},"processingStatus":{"type":"string","enum":["draft","submitted","processing","ready","failed"]},"imageQuality":{},"facts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"field":{"type":"string"},"kind":{"type":"string","enum":["original","proposed","confirmed"]},"source":{"type":"string","enum":["farmer","ai"]},"status":{"type":"string","enum":["proposed","confirmed","rejected","recorded"]},"value":{},"unit":{"nullable":true,"type":"string"},"requiresConfirmation":{"type":"boolean"},"evidenceState":{"type":"string","enum":["farmer_reported","derived","illustrative"]},"confirmedAt":{"nullable":true,"type":"string"},"rejectedAt":{"nullable":true,"type":"string"},"supersedesId":{"nullable":true,"type":"string"},"analysisId":{"nullable":true,"type":"string"},"planMapped":{"type":"boolean"},"label":{"nullable":true,"type":"string"}},"required":["id","entryId","field","kind","source","status","value","unit","requiresConfirmation","evidenceState","confirmedAt","rejectedAt","supersedesId","analysisId","planMapped","label"],"additionalProperties":false}},"analysis":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"jobId":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","unavailable"]},"errorCode":{"nullable":true,"type":"string"},"provenance":{"nullable":true,"type":"string","enum":["meta_live","synthetic_fixture"]},"model":{"nullable":true,"type":"string"},"label":{"type":"string"},"aiNarrative":{"nullable":true,"type":"object","properties":{"text":{"type":"string"},"evidenceState":{"type":"string","enum":["derived","illustrative"]},"label":{"type":"string"}},"required":["text","evidenceState","label"],"additionalProperties":false},"visibleObservations":{"type":"array","items":{"type":"string"}},"competingInterpretations":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"rationale":{"type":"string"}},"required":["label","rationale"],"additionalProperties":false}},"missingContext":{"type":"array","items":{"type":"string"}},"imageQualityIssues":{"type":"array","items":{"type":"string"}},"requestAnotherAngle":{"type":"boolean"},"gateIssues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"detail":{"type":"string"}},"required":["code","detail"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","jobId","status","errorCode","provenance","model","label","aiNarrative","visibleObservations","competingInterpretations","missingContext","imageQualityIssues","requestAnotherAngle","gateIssues","createdAt"],"additionalProperties":false},"provenanceLabel":{"type":"string"}},"required":["id","clientEntryId","farmId","planId","mode","version","status","observedOn","observedAt","uploadedAt","mediaIds","media","note","language","activity","quantity","expense","sale","processingStatus","imageQuality","facts","analysis","provenanceLabel"],"additionalProperties":false}},"required":["entry"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/farms/{id}/journal":{"get":{"tags":["journal"],"description":"Owner-scoped season story: entries with original, proposed and confirmed facts, completed tasks and plan revisions (with the engine's change summary). Other owners' farms are 404.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"farmId":{"type":"string"},"currentPlan":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"contentHash":{"type":"string"},"cropId":{"type":"string"},"stages":{"type":"array","items":{"type":"object","properties":{"stageId":{"type":"string"},"name":{"type":"string"}},"required":["stageId","name"],"additionalProperties":false}}},"required":["id","contentHash","cropId","stages"],"additionalProperties":false},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientEntryId":{"nullable":true,"type":"string"},"farmId":{"type":"string"},"planId":{"nullable":true,"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["draft","final"]},"observedOn":{"type":"string"},"observedAt":{"nullable":true,"type":"string"},"uploadedAt":{"nullable":true,"type":"string"},"mediaIds":{"type":"array","items":{"type":"string"}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"contentPath":{"type":"string"},"label":{"type":"string"}},"required":["id","contentPath","label"],"additionalProperties":false}},"note":{"nullable":true,"type":"string"},"language":{"nullable":true,"type":"string"},"activity":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"object","properties":{"value":{"type":"number"},"unit":{"type":"string"}},"required":["value","unit"],"additionalProperties":false},"expense":{"nullable":true,"type":"object","properties":{"amountInr":{"type":"string"},"category":{"type":"string"}},"required":["amountInr","category"],"additionalProperties":false},"sale":{"nullable":true,"type":"object","properties":{"amountInr":{"type":"string"},"note":{"nullable":true,"type":"string"}},"required":["amountInr","note"],"additionalProperties":false},"processingStatus":{"type":"string","enum":["draft","submitted","processing","ready","failed"]},"imageQuality":{},"facts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"field":{"type":"string"},"kind":{"type":"string","enum":["original","proposed","confirmed"]},"source":{"type":"string","enum":["farmer","ai"]},"status":{"type":"string","enum":["proposed","confirmed","rejected","recorded"]},"value":{},"unit":{"nullable":true,"type":"string"},"requiresConfirmation":{"type":"boolean"},"evidenceState":{"type":"string","enum":["farmer_reported","derived","illustrative"]},"confirmedAt":{"nullable":true,"type":"string"},"rejectedAt":{"nullable":true,"type":"string"},"supersedesId":{"nullable":true,"type":"string"},"analysisId":{"nullable":true,"type":"string"},"planMapped":{"type":"boolean"},"label":{"nullable":true,"type":"string"}},"required":["id","entryId","field","kind","source","status","value","unit","requiresConfirmation","evidenceState","confirmedAt","rejectedAt","supersedesId","analysisId","planMapped","label"],"additionalProperties":false}},"analysis":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"jobId":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","unavailable"]},"errorCode":{"nullable":true,"type":"string"},"provenance":{"nullable":true,"type":"string","enum":["meta_live","synthetic_fixture"]},"model":{"nullable":true,"type":"string"},"label":{"type":"string"},"aiNarrative":{"nullable":true,"type":"object","properties":{"text":{"type":"string"},"evidenceState":{"type":"string","enum":["derived","illustrative"]},"label":{"type":"string"}},"required":["text","evidenceState","label"],"additionalProperties":false},"visibleObservations":{"type":"array","items":{"type":"string"}},"competingInterpretations":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"rationale":{"type":"string"}},"required":["label","rationale"],"additionalProperties":false}},"missingContext":{"type":"array","items":{"type":"string"}},"imageQualityIssues":{"type":"array","items":{"type":"string"}},"requestAnotherAngle":{"type":"boolean"},"gateIssues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"detail":{"type":"string"}},"required":["code","detail"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","jobId","status","errorCode","provenance","model","label","aiNarrative","visibleObservations","competingInterpretations","missingContext","imageQualityIssues","requestAnotherAngle","gateIssues","createdAt"],"additionalProperties":false},"provenanceLabel":{"type":"string"}},"required":["id","clientEntryId","farmId","planId","mode","version","status","observedOn","observedAt","uploadedAt","mediaIds","media","note","language","activity","quantity","expense","sale","processingStatus","imageQuality","facts","analysis","provenanceLabel"],"additionalProperties":false}},"completedTasks":{"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string"},"completedOn":{"type":"string"},"entryId":{"type":"string"},"planId":{"type":"string"}},"required":["taskId","completedOn","entryId","planId"],"additionalProperties":false}},"revisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"fromPlanId":{"type":"string"},"toPlanId":{"type":"string"},"factIds":{"type":"array","items":{"type":"string"}},"changes":{"type":"array","items":{}},"changeSummary":{},"createdAt":{"type":"string"}},"required":["id","entryId","fromPlanId","toPlanId","factIds","changes","changeSummary","createdAt"],"additionalProperties":false}}},"required":["farmId","currentPlan","entries","completedTasks","revisions"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/journal/{id}":{"get":{"tags":["journal"],"description":"One owned entry with its facts and latest analysis.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string"},"clientEntryId":{"nullable":true,"type":"string"},"farmId":{"type":"string"},"planId":{"nullable":true,"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["draft","final"]},"observedOn":{"type":"string"},"observedAt":{"nullable":true,"type":"string"},"uploadedAt":{"nullable":true,"type":"string"},"mediaIds":{"type":"array","items":{"type":"string"}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"contentPath":{"type":"string"},"label":{"type":"string"}},"required":["id","contentPath","label"],"additionalProperties":false}},"note":{"nullable":true,"type":"string"},"language":{"nullable":true,"type":"string"},"activity":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"object","properties":{"value":{"type":"number"},"unit":{"type":"string"}},"required":["value","unit"],"additionalProperties":false},"expense":{"nullable":true,"type":"object","properties":{"amountInr":{"type":"string"},"category":{"type":"string"}},"required":["amountInr","category"],"additionalProperties":false},"sale":{"nullable":true,"type":"object","properties":{"amountInr":{"type":"string"},"note":{"nullable":true,"type":"string"}},"required":["amountInr","note"],"additionalProperties":false},"processingStatus":{"type":"string","enum":["draft","submitted","processing","ready","failed"]},"imageQuality":{},"facts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"field":{"type":"string"},"kind":{"type":"string","enum":["original","proposed","confirmed"]},"source":{"type":"string","enum":["farmer","ai"]},"status":{"type":"string","enum":["proposed","confirmed","rejected","recorded"]},"value":{},"unit":{"nullable":true,"type":"string"},"requiresConfirmation":{"type":"boolean"},"evidenceState":{"type":"string","enum":["farmer_reported","derived","illustrative"]},"confirmedAt":{"nullable":true,"type":"string"},"rejectedAt":{"nullable":true,"type":"string"},"supersedesId":{"nullable":true,"type":"string"},"analysisId":{"nullable":true,"type":"string"},"planMapped":{"type":"boolean"},"label":{"nullable":true,"type":"string"}},"required":["id","entryId","field","kind","source","status","value","unit","requiresConfirmation","evidenceState","confirmedAt","rejectedAt","supersedesId","analysisId","planMapped","label"],"additionalProperties":false}},"analysis":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"jobId":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","unavailable"]},"errorCode":{"nullable":true,"type":"string"},"provenance":{"nullable":true,"type":"string","enum":["meta_live","synthetic_fixture"]},"model":{"nullable":true,"type":"string"},"label":{"type":"string"},"aiNarrative":{"nullable":true,"type":"object","properties":{"text":{"type":"string"},"evidenceState":{"type":"string","enum":["derived","illustrative"]},"label":{"type":"string"}},"required":["text","evidenceState","label"],"additionalProperties":false},"visibleObservations":{"type":"array","items":{"type":"string"}},"competingInterpretations":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"rationale":{"type":"string"}},"required":["label","rationale"],"additionalProperties":false}},"missingContext":{"type":"array","items":{"type":"string"}},"imageQualityIssues":{"type":"array","items":{"type":"string"}},"requestAnotherAngle":{"type":"boolean"},"gateIssues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"detail":{"type":"string"}},"required":["code","detail"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","jobId","status","errorCode","provenance","model","label","aiNarrative","visibleObservations","competingInterpretations","missingContext","imageQualityIssues","requestAnotherAngle","gateIssues","createdAt"],"additionalProperties":false},"provenanceLabel":{"type":"string"}},"required":["id","clientEntryId","farmId","planId","mode","version","status","observedOn","observedAt","uploadedAt","mediaIds","media","note","language","activity","quantity","expense","sale","processingStatus","imageQuality","facts","analysis","provenanceLabel"],"additionalProperties":false}},"required":["entry"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/journal/{id}/analysis":{"post":{"tags":["journal"],"description":"Queues the multimodal observation analysis (job type journal.analysis) and returns the job id. One live analysis per entry; a retry after failure queues a new one. Results are proposals only: poll GET /jobs/:id, then GET /journal/:id.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"jobId":{"nullable":true,"type":"string"},"analysisId":{"type":"string"},"state":{"type":"string"},"deduplicated":{"type":"boolean"}},"required":["jobId","analysisId","state","deduplicated"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/journal/{id}/revision-preview":{"post":{"tags":["journal"],"description":"Runs the plan engine on the typed changes that accepting these proposals would make and rolls it back: old and new assumptions, changed tasks and economic delta, with nothing saved.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"factIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["factIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"planChanging":{"type":"boolean"},"changes":{"type":"array","items":{}},"recompute":{"type":"array","items":{"type":"string"}},"planContentHash":{"nullable":true,"type":"string"},"preview":{"nullable":true,"type":"object","properties":{"changeSummary":{},"note":{"type":"string"}},"required":["changeSummary","note"],"additionalProperties":false}},"required":["planChanging","changes","recompute","planContentHash","preview"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/journal/{id}/confirmations":{"post":{"tags":["journal"],"description":"Accept or reject proposed facts. expectedVersion must equal the entry version (409 version_conflict otherwise). Accepted facts that map to a typed plan change (observed_stage, irrigation_category, planting_date) create a plan revision through the plan engine and need expectedPlanContentHash. Proposals never confirm themselves.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"accept":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"reject":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"expectedPlanContentHash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["expectedVersion"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string"},"clientEntryId":{"nullable":true,"type":"string"},"farmId":{"type":"string"},"planId":{"nullable":true,"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["draft","final"]},"observedOn":{"type":"string"},"observedAt":{"nullable":true,"type":"string"},"uploadedAt":{"nullable":true,"type":"string"},"mediaIds":{"type":"array","items":{"type":"string"}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"contentPath":{"type":"string"},"label":{"type":"string"}},"required":["id","contentPath","label"],"additionalProperties":false}},"note":{"nullable":true,"type":"string"},"language":{"nullable":true,"type":"string"},"activity":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"object","properties":{"value":{"type":"number"},"unit":{"type":"string"}},"required":["value","unit"],"additionalProperties":false},"expense":{"nullable":true,"type":"object","properties":{"amountInr":{"type":"string"},"category":{"type":"string"}},"required":["amountInr","category"],"additionalProperties":false},"sale":{"nullable":true,"type":"object","properties":{"amountInr":{"type":"string"},"note":{"nullable":true,"type":"string"}},"required":["amountInr","note"],"additionalProperties":false},"processingStatus":{"type":"string","enum":["draft","submitted","processing","ready","failed"]},"imageQuality":{},"facts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"field":{"type":"string"},"kind":{"type":"string","enum":["original","proposed","confirmed"]},"source":{"type":"string","enum":["farmer","ai"]},"status":{"type":"string","enum":["proposed","confirmed","rejected","recorded"]},"value":{},"unit":{"nullable":true,"type":"string"},"requiresConfirmation":{"type":"boolean"},"evidenceState":{"type":"string","enum":["farmer_reported","derived","illustrative"]},"confirmedAt":{"nullable":true,"type":"string"},"rejectedAt":{"nullable":true,"type":"string"},"supersedesId":{"nullable":true,"type":"string"},"analysisId":{"nullable":true,"type":"string"},"planMapped":{"type":"boolean"},"label":{"nullable":true,"type":"string"}},"required":["id","entryId","field","kind","source","status","value","unit","requiresConfirmation","evidenceState","confirmedAt","rejectedAt","supersedesId","analysisId","planMapped","label"],"additionalProperties":false}},"analysis":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"jobId":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","unavailable"]},"errorCode":{"nullable":true,"type":"string"},"provenance":{"nullable":true,"type":"string","enum":["meta_live","synthetic_fixture"]},"model":{"nullable":true,"type":"string"},"label":{"type":"string"},"aiNarrative":{"nullable":true,"type":"object","properties":{"text":{"type":"string"},"evidenceState":{"type":"string","enum":["derived","illustrative"]},"label":{"type":"string"}},"required":["text","evidenceState","label"],"additionalProperties":false},"visibleObservations":{"type":"array","items":{"type":"string"}},"competingInterpretations":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"rationale":{"type":"string"}},"required":["label","rationale"],"additionalProperties":false}},"missingContext":{"type":"array","items":{"type":"string"}},"imageQualityIssues":{"type":"array","items":{"type":"string"}},"requestAnotherAngle":{"type":"boolean"},"gateIssues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"detail":{"type":"string"}},"required":["code","detail"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","jobId","status","errorCode","provenance","model","label","aiNarrative","visibleObservations","competingInterpretations","missingContext","imageQualityIssues","requestAnotherAngle","gateIssues","createdAt"],"additionalProperties":false},"provenanceLabel":{"type":"string"}},"required":["id","clientEntryId","farmId","planId","mode","version","status","observedOn","observedAt","uploadedAt","mediaIds","media","note","language","activity","quantity","expense","sale","processingStatus","imageQuality","facts","analysis","provenanceLabel"],"additionalProperties":false},"revision":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"fromPlanId":{"type":"string"},"toPlanId":{"type":"string"},"factIds":{"type":"array","items":{"type":"string"}},"changes":{"type":"array","items":{}},"changeSummary":{},"createdAt":{"type":"string"},"newContentHash":{"type":"string"},"snapshot":{}},"required":["id","entryId","fromPlanId","toPlanId","factIds","changes","changeSummary","createdAt","newContentHash","snapshot"],"additionalProperties":false}},"required":["entry","revision"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}},"/api/v1/journal/{id}/task-completions":{"post":{"tags":["journal"],"description":"Marks a task of the entry's plan as done on a date. Feeds the plan timeline's done state.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"taskId":{"type":"string","minLength":1,"maxLength":200},"completedOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["taskId","completedOn"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["1.0"]},"requestId":{"type":"string"},"mode":{"type":"string","enum":["live","replay","synthetic"]},"asOf":{"type":"string"},"data":{"nullable":true,"type":"object","properties":{"taskId":{"type":"string"},"completedOn":{"type":"string"},"entryId":{"type":"string"},"planId":{"type":"string"}},"required":["taskId","completedOn","entryId","planId"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"error":{"nullable":true,"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","requestId","mode","asOf","data","warnings","error"],"additionalProperties":false}}}}}}}},"servers":[{"url":"/"}]}