{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/telenor-sverige/json-schema/telenor-sverige-wi-fi-quote-request-schema.json",
  "title": "WiFiQuoteRequest",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/telenor-sverige-fixed-network-quotation-openapi.yml#/components/schemas/WiFiQuoteRequest",
  "type": "object",
  "required": [
    "bindingTime",
    "siteBlueprintUrl",
    "productOfferingId"
  ],
  "properties": {
    "contactMedium": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ContactMedium"
      }
    },
    "notes": {
      "$ref": "#/$defs/Notes",
      "type": "object",
      "description": "Notes regarding the site"
    },
    "externalId": {
      "type": "string",
      "description": "An external id created and owned by the client"
    },
    "quoteId": {
      "type": "string",
      "readOnly": true,
      "description": "The id for the quotation"
    },
    "relatedQuoteUrl": {
      "type": "string",
      "description": "A url to another existing quote. This field is used by clients to indicate that this quote is related (or connected) to another quote item"
    },
    "appId": {
      "type": "string",
      "readOnly": true
    },
    "creationDate": {
      "$ref": "#/$defs/LocalDate",
      "type": "string",
      "readOnly": true
    },
    "opportunityId": {
      "type": "string",
      "readOnly": true,
      "description": "An internal opportunity id, will be set by Telenor"
    },
    "quoteType": {
      "$ref": "#/$defs/OpportunityAction",
      "type": "string",
      "readOnly": true
    },
    "bindingTime": {
      "type": "integer",
      "format": "int32",
      "description": "The binding time (in months) for the services in the quotation",
      "maximum": 60,
      "minimum": 0
    },
    "expectedDeliveryDate": {
      "$ref": "#/$defs/LocalDate",
      "type": "string",
      "description": "Expected installation date for the service"
    },
    "onBehalfOfOrgNr": {
      "type": "string",
      "readOnly": true,
      "description": "Contains organizational number if the request was behalf of another party, e.g. via Mitt Foretag"
    },
    "replacesInstalledProductId": {
      "type": "string",
      "description": "The ID of the installed product that the product in this request replaces. Required for (and only applicable to) migration requests."
    },
    "quoteGroupId": {
      "type": "string",
      "description": "The id the group that this quote belongs to. If provided, it must be an id of existing group"
    },
    "address": {
      "$ref": "#/$defs/SiteAddress",
      "type": "object",
      "description": "The site address. Must not be set for add and migration quotes."
    },
    "siteId": {
      "type": "string",
      "description": "The site Id. If present, the address will be ignored. Must not be set for migration quotes. Must be set for add quotes."
    },
    "siteBlueprintUrl": {
      "type": "string",
      "description": "A link (url) to a blueprint for the LAN/WLAN site"
    },
    "users": {
      "type": "integer",
      "format": "int32",
      "description": "An estimated number of users, i.e. 10/100/1000 users"
    },
    "productOfferingId": {
      "type": "integer",
      "format": "int32",
      "description": "The Wi-Fi product offering id from product catalog"
    },
    "additionalServices": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AdditionalService"
      },
      "description": "Additional services to be included"
    }
  },
  "$defs": {
    "AdditionalService": {
      "type": "object",
      "properties": {
        "additionalServiceId": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "format": "int32",
          "description": "The Id of the additional service from Product Catalog"
        },
        "parameters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Parameters"
          }
        }
      }
    },
    "ContactMedium": {
      "type": "object",
      "properties": {
        "mediumType": {
          "$ref": "#/$defs/MediumType"
        },
        "preferred": {
          "type": "boolean"
        },
        "contactDetails": {
          "type": "string",
          "description": "Contact details for the customer who made this quote"
        },
        "validFor": {
          "$ref": "#/$defs/LocalDate"
        }
      }
    },
    "LocalDate": {
      "type": "string",
      "format": "date"
    },
    "MediumType": {
      "type": "string",
      "enum": [
        "EMAIL",
        "PHONE"
      ]
    },
    "Notes": {
      "type": "object",
      "properties": {
        "author": {
          "type": "string",
          "maxLength": 100,
          "description": "The name of the person who wrote this note",
          "maximum": 100
        },
        "date": {
          "$ref": "#/$defs/LocalDate",
          "type": "string",
          "description": "The date when this note was created"
        },
        "text": {
          "type": "string",
          "maxLength": 255,
          "description": "Details about this note",
          "maximum": 255
        }
      }
    },
    "OpportunityAction": {
      "type": "string",
      "enum": [
        "QUOTE",
        "ADD_QUOTE",
        "MIGRATION_QUOTE"
      ]
    },
    "Parameters": {
      "type": "object",
      "properties": {
        "parameterId": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "format": "int32",
          "description": "The Id of the additional service parameter from Product Catalog"
        }
      }
    },
    "SiteAddress": {
      "type": "object",
      "required": [
        "street",
        "postalCode",
        "city",
        "country"
      ],
      "properties": {
        "street": {
          "type": "string",
          "pattern": "\\S"
        },
        "streetNumber": {
          "type": "string"
        },
        "postalCode": {
          "type": "string",
          "pattern": "\\S"
        },
        "city": {
          "type": "string",
          "pattern": "\\S"
        },
        "country": {
          "type": "string",
          "pattern": "\\S"
        },
        "apartmentNumber": {
          "type": "string"
        },
        "siteName": {
          "type": "string"
        }
      }
    }
  }
}