{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://taxonmark.com/api/v1/types/soil-health-record",
    "title": "Plot-Level Soil Health Record",
    "type": "object",
    "required": [
        "plot_code",
        "sample_date",
        "lab",
        "farmer_identity_offregistry"
    ],
    "properties": {
        "plot_code": {
            "title": "Pseudonymous plot code",
            "type": "string",
            "maxLength": 1000
        },
        "latitude": {
            "title": "Latitude (coarsened)",
            "type": "number",
            "minimum": -90,
            "maximum": 90
        },
        "longitude": {
            "title": "Longitude (coarsened)",
            "type": "number",
            "minimum": -180,
            "maximum": 180
        },
        "sample_date": {
            "title": "Sample date",
            "type": "string",
            "format": "date"
        },
        "lab": {
            "title": "Lab",
            "type": "string",
            "maxLength": 1000
        },
        "soc_pct": {
            "title": "Soil organic carbon %",
            "type": "number"
        },
        "ph": {
            "title": "pH",
            "type": "number"
        },
        "npk": {
            "title": "N-P-K",
            "type": "string",
            "maxLength": 1000
        },
        "farmer_identity_offregistry": {
            "title": "Confirm: no farmer identity in this record",
            "type": "boolean"
        }
    },
    "additionalProperties": true
}