Properties

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 property is missing. Find those businesses with listOrganizationRoles on the signed-in user (fetchCurrentUser). Members of a business can list its properties; editing requires business edit rights. A personal property is the person's alone.

Each property 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 getPropertyPicture. The paddocks or mobs alone are listPaddocks / listMobs with property_id. Before recording a drench, getPropertyPicture is every mob on the property in one call.

get/properties

Request

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

Query parameters

organization_idstring

The same as organization_id.

The JSON:API filter family, the canonical spelling of this list's filters: filter[organization_id]=… means the same as the bare organization_id=…, and so for each key below. The bare names stay accepted. Send one spelling per filter; the bare name wins when both are sent.

organization_idstring

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

integer

page=2: the alias for page[number]=2.

OR

Which page of the collection. The JSON:API form is page[number] (1-based) with page[size], and it is what the document's links.first/prev/next/last carry, so follow those links as they are. A bare integer page is the v1 alias for page[number], paired with per_page. Send one form or the other, not both.

per_pageinteger

Rows per page: the v1 alias for page[size], paired with the bare page. Each collection documents its default. per-page is accepted too.

includestring
Example:organization

Comma-separated snake_case relationship paths to embed (JSON:API included array, or inlined for application/json). Never embedded by default; a path outside the allowed list is refused with 400 unknown_include (see the 400 response); max 10 paths. Allowed paths: organization.

Response

Properties for the owner.

Example response

{
  "data": [
    {
      "type": "property",
      "blocks": [
        {
          "name": "Racecourse block",
          "hull": {
            "type": "Polygon"
          }
        }
      ]
    }
  ],
  "_meta": {
    "onboarding": {
      "skill": "pg-onboarding@1"
    }
  }
}

Changes