{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "anyOf": [
        {
            "required": [
                "date"
            ]
        },
        {
            "required": [
                "end_date"
            ]
        }
    ],
    "description": "A representation of one particular element of an accounts statement (e.g. profit or assets). This should consist of at least a value and end_date",
    "properties": {
        "currency": {
            "description": "ISO 4217 code for the currency",
            "maxLength": 3,
            "minLength": 3,
            "type": "string"
        },
        "date": {
            "_format": "date",
            "description": "If this element is an instant element, i.e. relates to a specific point in time (such as balance sheet item), then give the date this relates to, otherwise use start/end dates for element that occured over a period (e.g. Profit/Loss)",
            "type": "string"
        },
        "end_date": {
            "_format": "date",
            "type": "string"
        },
        "start_date": {
            "_format": "date",
            "type": "string"
        },
        "value": {
            "minLength": 1,
            "type": "string"
        }
    },
    "required": [
        "value"
    ],
    "type": "object"
}