{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Loan Transaction Schema",
  "description": "A Loan Transaction is an event that has an impact on a loan, typically the balance.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "date": {
      "description": "YYYY-MM-DDTHH:MM:SSZ in accordance with ISO 8601.",
      "type": "string",
      "format": "date-time"
    },
    "amount": {
      "type": "integer"
    },    
    "loan_id": {
      "type": "string"
    },
    "movement": {
      "type": "string",
      "enum": ["none", "acquired", "sold", "securitised", "other"]
    },    
    "type": {
      "description": "The type of impact on the balance of the loan.",
      "type": "string",
      "enum": [
        "advance", "further_advance", "interest", "interest_repayment",
        "capitalisation", "capital_repayment", "sale", "write_off", "other"
      ]
    },
    "sources": {
      "description": "Identifiers for data sources. Useful for analytics and MI purposes.",
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    }
  },
  "required": ["id", "date", "amount"],
  "additionalProperties": true
}

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Loan Transaction Schema",
  "description": "A Loan Transaction is an event that has an impact on a loan, typically the balance.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "date": {
      "description": "YYYY-MM-DDTHH:MM:SSZ in accordance with ISO 8601.",
      "type": "string",
      "format": "date-time"
    },
    "amount": {
      "type": "integer"
    },    
    "loan_id": {
      "type": "string"
    },
    "movement": {
      "type": "string",
      "enum": ["none", "acquired", "sold", "securitised", "other"]
    },    
    "type": {
      "description": "The type of impact on the balance of the loan.",
      "type": "string",
      "enum": [
        "advance", "further_advance", "interest", "interest_repayment",
        "capitalisation", "capital_repayment", "sale", "write_off",
        "due", "received", "other"
      ]
    },
    "sources": {
      "description": "Identifiers for data sources. Useful for analytics and MI purposes.",
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    }
  },
  "required": ["id", "date", "amount"],
  "additionalProperties": true
}

Add "due" and "received" to type enum of LoanTransaction
Add "due" and "received" to type enum of LoanTransaction
