Properties

A name makes a property. It belongs to the business named by the organization relationship, or — with no organization — to the signed-in user's personal account (the user relationship may name them explicitly). centroid_lat / centroid_lon give a property with no outline yet a point for the map to open on — send both or neither. pic is one Property Identification Code (8 letters or digits, stored uppercase; blank leaves it unset; not checked against state). state is NSW, VIC, QLD, SA, WA, TAS, NT or ACT. reef_catchment is the farmer's Queensland reef flag, not inferred.

boundary, area_ha and area_source are not accepted here: write the outline with updatePropertyBoundary, which measures the area. Requires edit rights on the owner: a business's edit roles, or the person. Assistants and API keys cannot set visibility to link or public (403, nothing written). private, or leaving it unset, is allowed.

post/properties

Request

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

Query parameters

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.

Request body

Response

Created

Example response

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

Changes

    • info

      added the optional property // to the response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status