Farms

List Farms

The properties of one owner, ordered by name: a business's, with organization_id, or — with no organization_id — the signed-in user's own personal properties. A property owned by a business does not appear in that personal list — pass organization_id or the farm is missing. Find those businesses with listOrganizationRoles on the signed-in user (fetchCurrentUser). Members of a business can list its farms; editing requires business edit rights. A personal property is the person's alone.

Each farm carries its outline as boundary — an array of closed rings of [longitude, latitude] pairs, longitude first, never a GeoJSON object — plus its map point and the live paddock_count / mob_count. One property with every paddock and mob is getFarmPicture. The paddocks or mobs alone are listPaddocks / listMobs with farm_id. Before recording a drench, getFarmPicture is every mob on the property in one call.

get/farms

Request

  • Base URL: https://api.purplegrain.com/api/v1
  • URL: https://api.purplegrain.com/api/v1/farms
  • Auth: HTTP bearer

Query parameters

organization_idstring

The business whose farms to list. Omit it for the signed-in user's personal properties.

pageinteger
per_pageinteger
includestring
Example:organization

Comma-separated snake_case relationship paths to embed (JSON:API included array, or inlined for application/json). Never embedded by default; unknown paths ignored; max 10 paths. Allowed paths: organization.

Response

Farms for the owner.

Example response

{
  "data": [
    {
      "type": "farm",
      "blocks": [
        {
          "name": "Racecourse block",
          "hull": {
            "type": "Polygon"
          }
        }
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.