{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/telenor-sverige/json-schema/telenor-sverige-cancellation-request-schema.json",
  "title": "CancellationRequest",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/telenor-sverige-fixed-network-order-openapi.yml#/components/schemas/CancellationRequest",
  "type": "object",
  "properties": {
    "orderItemIds": {
      "type": "array",
      "description": "The list of IDs of the order items for which the cancellation request is being made.",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "contactPersons": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CancellationContactPerson"
      },
      "minItems": 1
    }
  },
  "required": [
    "contactPersons",
    "orderItemIds"
  ],
  "$defs": {
    "CancellationContactPerson": {
      "type": "object",
      "properties": {
        "firstName": {
          "type": "string",
          "description": "The first name of the person to be contacted."
        },
        "lastName": {
          "type": "string",
          "description": "The last name of the person to be contacted."
        },
        "email": {
          "type": "string",
          "format": "email",
          "description": "The e-mail address of the contact person."
        },
        "phoneNumber": {
          "type": "string",
          "description": "The phone number of the person to be contacted.\nPhone number should consist only of digits, spaces, dashes with optional leading plus.",
          "maxLength": 20,
          "minLength": 0
        },
        "mobileNumber": {
          "type": "string",
          "description": "The mobile number of the person to be contacted.\nMobile number should consist only of digits, spaces, dashes with optional leading plus.",
          "maxLength": 20,
          "minLength": 0
        }
      },
      "required": [
        "email",
        "firstName",
        "lastName"
      ]
    }
  }
}