{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "id": "#/definitions/account",
    "title": "account",
    "type": "object",
    "required": [],
    "properties": {
        "id": {
            "type": "string"
        },
        "link": {
            "$ref": "#/definitions/Link"
        },
        "accountNumber": {
            "type": "string"
        },
        "name": {
            "type": "string"
        },
        "type": {
            "type": "string",
            "description": "Individual, Joint, Other",
            "enum": [
                "Individual",
                "Joint",
                "Other"
            ]
        },
        "pin": {
            "type": "integer"
        },
        "status": {
            "type": "string",
            "description": "Active, Suspended, Inactive, Closed",
            "enum": [
                "Active",
                "Suspended",
                "Inactive",
                "Closed"
            ]
        },
        "financialStatus": {
            "type": "string",
            "description": "Current, Due ,InArrears, Delinquent",
            "enum": [
                "Current",
                "Due",
                "InArrears",
                "Delinquent"
            ]
        },
        "creditLimit": {
            "type": "integer"
        },
        "customer": {
            "$ref": "#/definitions/CustomerSummary"
        },
        "serviceAddress": {
            "$ref": "#/definitions/PropertyAddress"
        },
        "primaryUser": {
            "$ref": "#/definitions/UserSummary"
        },
        "users": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/UserSummary"
            }
        },
        "financials": {
            "$ref": "#/definitions/FinancialSummary"
        },
        "billing": {
            "$ref": "#/definitions/BillingSummary"
        },
        "payments": {
            "$ref": "#/definitions/PaymentSummary"
        },
        "products": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/ProductSummary"
            }
        },
        "devices": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/DeviceSummary"
            }
        },
        "taxExemptions": {
            "$ref": "#/definitions/TaxExemptions"
        },
        "sites": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/SiteSummary"
            }
        },
        "preferences": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/PreferenceSummary"
            }
        },
        "relatedAccounts": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/AccountSummary"
            }
        }
    },
    "definitions": {
        "Link": {
            "type": "object",
            "properties": {
                "href": {
                    "type": "string"
                },
                "rel": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                },
                "method": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "href",
                "rel"
            ]
        },
        "CustomerSummary": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "link": {
                    "$ref": "#/definitions/Link"
                },
                "customerId": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "customerRank": {
                    "type": "string"
                }
            }
        },
        "PropertyAddress": {
            "properties": {
                "id": {
                    "type": "string"
                },
                "link": {
                    "$ref": "#/definitions/Link"
                },
                "formattedAddressLine1": {
                    "type": "string"
                },
                "formattedAddressLine2": {
                    "type": "string"
                },
                "locality": {
                    "type": "string"
                },
                "state_province": {
                    "type": "string"
                },
                "country": {
                    "type": "string"
                },
                "postalcode": {
                    "type": "string"
                },
                "postcodeExtension": {
                    "type": "string"
                },
                "property": {
                    "$ref": "#/definitions/Property"
                }
            },
            "additionalProperties": false,
            "required": [
                "id",
                "link"
            ]
        },
        "UserSummary": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "link": {
                    "$ref": "#/definitions/Link"
                },
                "username": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "profile": {
                    "$ref": "#/definitions/PartySummary"
                }
            },
            "additionalProperties": false,
            "required": [
                "id",
                "link"
            ]
        },
        "FinancialSummary": {
            "type": "object",
            "properties": {
                "currentBalance": {
                    "type": "string"
                },
                "priorBilledAmount": {
                    "type": "string"
                },
                "currentPeriodPaymentsAdjustment": {
                    "type": "string"
                },
                "currentPeriodChargesCredits": {
                    "type": "string"
                }
            }
        },
        "BillingSummary": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "link": {
                    "$ref": "#/definitions/Link"
                }
            }
        },
        "PaymentSummary": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "link": {
                    "$ref": "#/definitions/Link"
                }
            }
        },
        "ProductSummary": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "link": {
                    "$ref": "#/definitions/Link"
                },
                "name": {
                    "type": "string"
                },
                "isBundle": {
                    "type": "boolean"
                },
                "description": {
                    "type": "string"
                },
                "productStatus": {
                    "type": "string"
                },
                "productSerialNumber": {
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "id",
                "link",
                "name",
                "isBundle",
                "description",
                "productStatus",
                "productSerialNumber"
            ]
        },
        "DeviceSummary": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "link": {
                    "$ref": "#/definitions/Link"
                },
                "name": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                },
                "macAddress": {
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "id",
                "link",
                "name",
                "type",
                "macAddress"
            ]
        },
        "TaxExemptions": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "link": {
                    "$ref": "#/definitions/Link"
                }
            }
        },
        "SiteSummary": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "link": {
                    "type": "object",
                    "$ref": "#/definitions/Link"
                },
                "name": {
                    "type": "string"
                },
                "multiTenant": {
                    "type": "boolean"
                },
                "clliCode": {
                    "type": "string"
                },
                "siteHours": {
                    "type": "string"
                },
                "status": {
                    "type": "string",
                    "description": "Active, Off, Pending",
                    "enum": [
                        "Active",
                        "Off",
                        "Pending"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "id",
                "link",
                "name",
                "multiTenant",
                "clliCode",
                "siteHours",
                "status"
            ]
        },
        "PreferenceSummary": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "link": {
                    "$ref": "#/definitions/Link"
                },
                "preferenceName": {
                    "type": "string"
                },
                "value": {
                    "type": "string"
                },
                "unitOfMeasure": {
                    "type": "string"
                },
                "valueType": {
                    "type": "string"
                },
                "isSet": {
                    "type": "boolean"
                },
                "preferenceCategory": {
                    "$ref": "#/definitions/PreferenceCategory"
                }
            },
            "additionalProperties": false,
            "required": [
                "id",
                "link",
                "preferenceName",
                "value",
                "unitOfMeasure",
                "valueType",
                "isSet",
                "preferenceCategory"
            ]
        },
        "PreferenceCategory": {
            "type": "object",
            "properties": {
                "preferenceCategoryId": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "preferenceCategoryName": {
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "preferenceCategoryName",
                "description",
                "preferenceCategoryId"
            ]
        },
        "AccountSummary": {
            "properties": {
                "id": {
                    "type": "string"
                },
                "link": {
                    "$ref": "#/definitions/Link"
                },
                "name": {
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "id",
                "link",
                "name"
            ]
        },
        "Property": {
            "properties": {
                "id": {
                    "type": "string"
                },
                "link": {
                    "$ref": "#/definitions/Link"
                },
                "lotNr": {
                    "type": "string"
                },
                "landUse": {
                    "type": "string"
                },
                "landCover": {
                    "type": "string"
                },
                "elevation": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "naturalRisks": {
                    "type": "string"
                },
                "geometry": {
                    "$ref": "#/definitions/Geometry"
                },
                "propertyAddresses": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/PropertyAddress"
                    }
                }
            },
            "additionalProperties": false,
            "required": [
                "id"
            ]
        },
        "PartySummary": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "link": {
                    "$ref": "#/definitions/Link"
                },
                "name": {
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "id",
                "link",
                "name"
            ]
        },
        "Geometry": {
            "properties": {
                "id": {
                    "type": "string"
                }
            }
        }
    }
}