{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ledger.abivia.com/api/json/reference.schema.json",
  "title": "Reference",
  "description": "A Ledger Reference",
  "type": "object",
  "properties": {
    "code": {
      "description": "A unique identifier within the Domain.",
      "type": "string",
      "pattern": "^[^ \\t\\r\\n*]*$"
    },
    "domain": {
      "description": "Ledger domain. If not provided the default is used.",
      "$ref": "https://ledger.abivia.com/api/json/entityref.schema.json"
    },
    "extra": {
      "description": "Arbitrary data for use by the application.",
      "type": "string"
    },
    "journalReferenceUuid": {
      "description": "UUID of an associated entity (if any)",
      "type": "string",
      "format": "uuid"
    },
    "revision": {
      "description": "A revision hash code, required for update operations.",
      "type": "string"
    },
    "toCode": {
      "description": "A new unique identifying code (only on update).",
      "type": "string",
      "pattern": "^[^ \\t\\r\\n*]*$"
    }
  },
  "required": ["code"]
}
