{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alto-vebra/json-schema/alto-vebra-branch-paged-response-schema.json",
  "title": "BranchPagedResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alto-vebra-branches-api-openapi.yml#/components/schemas/BranchPagedResponse",
  "type": "object",
  "properties": {
    "meta": {
      "allOf": [
        {
          "$ref": "#/$defs/Meta"
        }
      ]
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Branch"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Address": {
      "type": "object",
      "properties": {
        "subDwelling": {
          "type": [
            "string",
            "null"
          ]
        },
        "nameNumber": {
          "type": [
            "string",
            "null"
          ]
        },
        "street": {
          "type": [
            "string",
            "null"
          ]
        },
        "locality": {
          "type": [
            "string",
            "null"
          ]
        },
        "town": {
          "type": [
            "string",
            "null"
          ]
        },
        "county": {
          "type": [
            "string",
            "null"
          ]
        },
        "postcode": {
          "type": [
            "string",
            "null"
          ]
        },
        "countryCode": {
          "type": [
            "string",
            "null"
          ]
        },
        "uprn": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "Branch": {
      "type": "object",
      "properties": {
        "branchId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The ID of the branch."
        },
        "createdAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "The date and time the branch was created.",
          "format": "date-time"
        },
        "modifiedAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "The date and time the branch was last modified.",
          "format": "date-time"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the branch."
        },
        "address": {
          "allOf": [
            {
              "$ref": "#/$defs/Address"
            }
          ],
          "description": "The branch address."
        },
        "status": {
          "allOf": [
            {
              "$ref": "#/$defs/BranchStatus"
            }
          ],
          "description": "The status of the branch."
        },
        "defaultMarket": {
          "allOf": [
            {
              "$ref": "#/$defs/PropertyRecordType"
            }
          ],
          "description": "The default market of the branch."
        }
      },
      "additionalProperties": false,
      "description": "Represents a branch."
    },
    "BranchStatus": {
      "enum": [
        "Unknown",
        "Active",
        "Inactive"
      ],
      "type": "string"
    },
    "Meta": {
      "type": "object",
      "properties": {
        "nextToken": {
          "type": [
            "string",
            "null"
          ]
        },
        "previousToken": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "PropertyRecordType": {
      "enum": [
        "Unspecified",
        "Sale",
        "Rent"
      ],
      "type": "string"
    }
  }
}