Skip to content

Correct the VALUES of a setup version

PATCH /irrigation/installations/{versionId}
  • Scope irrigation:write
  • API key x-api-key
  • Base URL https://api.hub.akuasense.com/v1

Repairs a wrong entry WITHOUT creating a version, without moving any validity bound and without recomputing any dose. Not to be confused with the PUT, which declares a real change of equipment.

Path parameters

  • versionId integer required

    Identifier of a setup VERSION (the id field of versions[]).

Headers

  • Idempotency-Key string

    Replays the same 2xx response (24 h)

Request body

  • system string required

    Type of equipment. Determines the default wetted soil fraction (FAO-56 table 20): drip 0.35 · micro_sprinkler 0.60 · all others 1.00.

    Values: dripmicro_sprinklersprinklerpivotgravitymanualother
  • emitterFlowLph number

    Flow rate of one emitter, in L/h (printed on the equipment).

  • emittersPerM2 number

    Emitters per m² = 1 ÷ (emitter spacing × lateral spacing, in m).

  • flowMmPerH number

    Application rate in mm/h. IGNORED if emitterFlowLph AND emittersPerM2 are both provided — the geometry is the more precise entry, and letting the two diverge would produce millimetres nobody could account for.

  • irrigatedAreaM2 number

    Irrigated area in m². Needed to convert a volume (m³) into mm.

  • fractionWetted number

    Wetted soil fraction (fw). NOT to be filled in under normal circumstances: the system default (FAO-56 table 20) applies. Reserved for atypical installations.

  • notes string
  • effectiveFrom string date-time

    Date it TAKES EFFECT in the field. Absent = now, EXCEPT for the very first setup applicable to the target (no version for it nor, for a probe, for its parcel): it then applies from the very beginning (validFrom = 1970-01-01T00:00:00Z), so that waterings already logged receive their dose. A past date documents the period back then: the version covering that date is closed at that instant, and later versions are left INTACT. The future is refused (EFFECTIVE_FROM_IN_FUTURE).

Response

200

Corrected

  • success boolean always present

Errors

  • 400

    Entry refused

    INVALID_SYSTEMINVALID_EMITTER_FLOWINVALID_EMITTER_DENSITYINVALID_FLOW_RATEINVALID_FRACTION_WETTEDINVALID_IRRIGATED_AREAINVALID_EFFECTIVE_FROMEFFECTIVE_FROM_IN_FUTUREINSTALLATION_VERSION_EXISTS_AT_DATE
  • 401

    Not authenticated

  • 403

    Insufficient scope/role, or outside your company

  • 404

    Version not found

    INSTALLATION_NOT_FOUND