{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/telenor-sverige/json-schema/telenor-sverige-paginated-sites-response-schema.json",
  "title": "PaginatedSitesResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/telenor-sverige-sites-api-openapi.yml#/components/schemas/PaginatedSitesResponse",
  "type": "object",
  "properties": {
    "pagedData": {
      "$ref": "#/$defs/PagedData"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/SiteDto"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "AddressDto": {
      "title": "Address",
      "type": "object",
      "properties": {
        "objectId": {
          "type": "integer",
          "description": "Unique identifier for the address",
          "format": "int64"
        },
        "street": {
          "type": [
            "string",
            "null"
          ],
          "description": "Primary street address (e.g., 'Storgatan')"
        },
        "street2": {
          "type": [
            "string",
            "null"
          ],
          "description": "Additional street information, if needed"
        },
        "street3": {
          "type": [
            "string",
            "null"
          ],
          "description": "Additional street information, if needed"
        },
        "street4": {
          "type": [
            "string",
            "null"
          ],
          "description": "Additional street information, if needed"
        },
        "streetName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Name of the street (separated from the house number)"
        },
        "streetNumber": {
          "type": [
            "string",
            "null"
          ],
          "description": "House or building number"
        },
        "zipcode": {
          "type": [
            "string",
            "null"
          ],
          "description": "Postal code for the address"
        },
        "city": {
          "type": [
            "string",
            "null"
          ],
          "description": "Name of the city or locality"
        },
        "state": {
          "type": [
            "string",
            "null"
          ],
          "description": "The state for the specified address"
        },
        "countryName": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "EntityStatus": {
      "enum": [
        "Active",
        "Inactive",
        "Obsolete"
      ],
      "type": "string",
      "description": "Represents the status of a number of resources such Accounts, Sites, etc."
    },
    "PagedData": {
      "title": "Meta",
      "type": "object",
      "properties": {
        "first": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "previous": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "next": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "last": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "totalRecords": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        }
      },
      "additionalProperties": false
    },
    "SiteDto": {
      "title": "Site",
      "type": "object",
      "properties": {
        "objectId": {
          "type": "integer",
          "description": "Unique identifier for the site",
          "format": "int64"
        },
        "siteId": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the site"
        },
        "externalId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Represents a external site id, could be supplied from the customer"
        },
        "status": {
          "$ref": "#/$defs/EntityStatus"
        },
        "type": {
          "$ref": "#/$defs/SiteType"
        },
        "role": {
          "$ref": "#/$defs/SiteRole"
        },
        "address": {
          "$ref": "#/$defs/AddressDto"
        }
      },
      "additionalProperties": false,
      "description": "Represent a site or location. An account can have one or several sites."
    },
    "SiteRole": {
      "enum": [
        "Undefined",
        "Billing",
        "Equipment",
        "Legal",
        "OWNER",
        "Other"
      ],
      "type": "string",
      "description": "Represents the role of the site such as Billing- or Equipment site"
    },
    "SiteType": {
      "enum": [
        "Undefined",
        "Business",
        "Office",
        "Reseller",
        "Individual",
        "Vendor"
      ],
      "type": "string",
      "description": "Represents the type of the site such as Office- or Reseller site"
    }
  }
}