{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://esimbundle.com/feeds/products/canonical.schema.json",
  "title": "eSIMbundle full canonical product feed v2",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "snapshotType",
    "brand",
    "catalogGeneratedAt",
    "destinationCount",
    "productCount",
    "currencySupport",
    "merchant",
    "products",
    "buyerInformation"
  ],
  "properties": {
    "schemaVersion": {
      "type": "string",
      "const": "2.0"
    },
    "snapshotType": {
      "type": "string",
      "const": "full"
    },
    "brand": {
      "type": "string",
      "const": "eSIMbundle"
    },
    "catalogGeneratedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Original catalogue source timestamp, not a new feed refresh date."
    },
    "destinationCount": {
      "type": "integer",
      "minimum": 0
    },
    "productCount": {
      "type": "integer",
      "minimum": 0
    },
    "currencySupport": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "EUR",
          "USD"
        ]
      },
      "minItems": 2,
      "maxItems": 2
    },
    "merchant": {
      "$ref": "#/$defs/merchant"
    },
    "products": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/product"
      }
    },
    "buyerInformation": {
      "$ref": "#/$defs/buyerInformation"
    }
  },
  "$defs": {
    "merchant": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "website",
        "supportUrl",
        "termsUrl",
        "privacyUrl",
        "refundPolicyUrl"
      ],
      "properties": {
        "name": {
          "type": "string",
          "const": "eSIMbundle"
        },
        "website": {
          "type": "string",
          "format": "uri"
        },
        "supportUrl": {
          "type": "string",
          "format": "uri"
        },
        "termsUrl": {
          "type": "string",
          "format": "uri"
        },
        "privacyUrl": {
          "type": "string",
          "format": "uri"
        },
        "refundPolicyUrl": {
          "type": "string",
          "format": "uri",
          "pattern": "#refunds$"
        }
      }
    },
    "product": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "itemId",
        "groupId",
        "brand",
        "productType",
        "category",
        "destination",
        "plan",
        "title",
        "description",
        "productUrl",
        "landingUrls",
        "purchaseUrl",
        "imageUrls",
        "prices",
        "availability",
        "digitalProduct",
        "dataOnly",
        "voiceIncluded",
        "smsIncluded",
        "vpn",
        "requirements",
        "updatedAt",
        "scope",
        "includedCountries",
        "confirmedNetworks",
        "availabilityEvidence",
        "networkAccess",
        "topUp"
      ],
      "properties": {
        "itemId": {
          "type": "string",
          "pattern": "^esimbundle-[a-z0-9-]+$",
          "maxLength": 200
        },
        "groupId": {
          "type": "string",
          "pattern": "^esimbundle-[a-z0-9-]+$",
          "maxLength": 200
        },
        "brand": {
          "type": "string",
          "const": "eSIMbundle"
        },
        "productType": {
          "type": "string",
          "const": "travel_esim"
        },
        "category": {
          "type": "string",
          "const": "Travel eSIM"
        },
        "destination": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "name",
            "slug",
            "urlSlug",
            "iso2",
            "region"
          ],
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1
            },
            "slug": {
              "type": "string",
              "minLength": 1
            },
            "urlSlug": {
              "type": "string",
              "minLength": 1
            },
            "iso2": {
              "type": "string",
              "pattern": "^([A-Za-z]{2})?$"
            },
            "region": {
              "type": "string",
              "description": "Machine-readable geographic grouping only, not a network entitlement."
            }
          }
        },
        "plan": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "planId",
            "planType",
            "dataLabel",
            "durationLabel",
            "featured"
          ],
          "properties": {
            "planId": {
              "type": "string",
              "minLength": 1
            },
            "planType": {
              "type": "string",
              "enum": [
                "fixed",
                "unlimited"
              ]
            },
            "dataGb": {
              "type": [
                "number",
                "null"
              ]
            },
            "dataLabel": {
              "type": "string"
            },
            "validityDays": {
              "type": [
                "integer",
                "null"
              ]
            },
            "durationLabel": {
              "type": "string"
            },
            "highSpeedDataLabel": {
              "type": "string"
            },
            "reducedSpeedLabel": {
              "type": "string"
            },
            "featured": {
              "type": "boolean"
            },
            "badge": {
              "type": "string"
            }
          }
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 150
        },
        "description": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000
        },
        "productUrl": {
          "type": "string",
          "format": "uri",
          "pattern": "^https://"
        },
        "landingUrls": {
          "description": "Exact published package landing pages, with EUR or USD selected in server HTML and the storefront; productUrl is the EUR default for the same itemId.",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "EUR",
            "USD"
          ],
          "properties": {
            "EUR": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://esimbundle\\.com/esim-[a-z0-9-]+\\?plan=[^&]+&currency=EUR#plans$"
            },
            "USD": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://esimbundle\\.com/esim-[a-z0-9-]+\\?plan=[^&]+&currency=USD#plans$"
            }
          }
        },
        "purchaseUrl": {
          "type": "string",
          "format": "uri",
          "pattern": "^https://"
        },
        "imageUrls": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "prices": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "EUR",
            "USD"
          ],
          "properties": {
            "EUR": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "USD": {
              "type": "number",
              "exclusiveMinimum": 0
            }
          },
          "description": "EUR and USD offers for the same stable package, copied exactly from the published static catalogue; not duplicate inventory."
        },
        "availability": {
          "type": "string",
          "enum": [
            "in_stock",
            "out_of_stock",
            "pre_order",
            "backorder",
            "unknown"
          ],
          "description": "Published in-stock digital catalogue offer, not a live supplier stock quantity."
        },
        "digitalProduct": {
          "type": "boolean",
          "const": true
        },
        "dataOnly": {
          "type": "boolean",
          "const": true
        },
        "voiceIncluded": {
          "type": "boolean",
          "const": false
        },
        "smsIncluded": {
          "type": "boolean",
          "const": false
        },
        "vpn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "included",
            "extraCost",
            "activation"
          ],
          "properties": {
            "included": {
              "type": "boolean",
              "const": true
            },
            "extraCost": {
              "type": "boolean",
              "const": false
            },
            "activation": {
              "type": "string"
            }
          }
        },
        "requirements": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "esimCompatibleDevice",
            "carrierUnlockedDevice"
          ],
          "properties": {
            "esimCompatibleDevice": {
              "type": "boolean"
            },
            "carrierUnlockedDevice": {
              "type": "boolean"
            }
          }
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "Original product source timestamp; unchanged by feed generation."
        },
        "availabilityEvidence": {
          "const": "published_catalog",
          "description": "in_stock means the package is in the published storefront catalogue (passed the public sellable gate); it is not live supplier inventory and carries no stock quantity."
        },
        "scope": {
          "enum": [
            "country",
            "region"
          ]
        },
        "confirmedNetworks": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "includedCountries": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "iso2",
              "slug",
              "name"
            ],
            "properties": {
              "iso2": {
                "type": "string",
                "pattern": "^[A-Za-z]{2}$"
              },
              "slug": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        "networkAccess": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "operators",
            "upTo5G",
            "automaticSwitchOnCoverageLoss",
            "coverageDependsOnLocationAndDevice"
          ],
          "properties": {
            "operators": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "name",
                  "fourG",
                  "fiveG"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "fourG": {
                    "type": "boolean"
                  },
                  "fiveG": {
                    "type": "boolean"
                  }
                }
              }
            },
            "upTo5G": {
              "type": "boolean"
            },
            "automaticSwitchOnCoverageLoss": {
              "type": "boolean"
            },
            "coverageDependsOnLocationAndDevice": {
              "const": true
            }
          },
          "description": "Confirmed named country operators only; 5G requires direct destination evidence. Coverage-loss switching needs two distinct confirmed operators. Regional lists do not infer country operator entitlements."
        },
        "topUp": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "sameEsimWithCompatibleBundle",
            "eachBundleHasOwnValidity",
            "autoTopUp"
          ],
          "properties": {
            "sameEsimWithCompatibleBundle": {
              "const": true
            },
            "eachBundleHasOwnValidity": {
              "const": true
            },
            "autoTopUp": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "eligibility",
                "optional",
                "remainingDataThresholdPercent",
                "requiresVerifiedRemainingData",
                "requiresConsentAndSavedCard",
                "subjectToApprovedPriceAndPayment",
                "uninterruptedServiceGuaranteed"
              ],
              "properties": {
                "eligibility": {
                  "enum": [
                    "subject_to_checkout_eligibility",
                    "not_available_unlimited"
                  ]
                },
                "optional": {
                  "const": true
                },
                "remainingDataThresholdPercent": {
                  "enum": [
                    20,
                    null
                  ]
                },
                "requiresVerifiedRemainingData": {
                  "const": true
                },
                "requiresConsentAndSavedCard": {
                  "const": true
                },
                "subjectToApprovedPriceAndPayment": {
                  "const": true
                },
                "uninterruptedServiceGuaranteed": {
                  "const": false
                }
              }
            }
          },
          "description": "Buy another compatible bundle for the same eSIM; each bundle has separate validity. Optional fixed-plan auto top-up is conditional, never universal or enabled by this feed."
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "plan": {
                "properties": {
                  "planType": {
                    "const": "unlimited"
                  }
                }
              }
            }
          },
          "then": {
            "properties": {
              "topUp": {
                "properties": {
                  "autoTopUp": {
                    "properties": {
                      "eligibility": {
                        "const": "not_available_unlimited"
                      },
                      "remainingDataThresholdPercent": {
                        "const": null
                      }
                    }
                  }
                }
              }
            }
          },
          "else": {
            "properties": {
              "topUp": {
                "properties": {
                  "autoTopUp": {
                    "properties": {
                      "eligibility": {
                        "const": "subject_to_checkout_eligibility"
                      },
                      "remainingDataThresholdPercent": {
                        "const": 20
                      }
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "scope": {
                "const": "region"
              }
            }
          },
          "then": {
            "properties": {
              "confirmedNetworks": {
                "maxItems": 0
              },
              "networkAccess": {
                "properties": {
                  "operators": {
                    "maxItems": 0
                  },
                  "upTo5G": {
                    "const": false
                  },
                  "automaticSwitchOnCoverageLoss": {
                    "const": false
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "networkAccess": {
                "properties": {
                  "automaticSwitchOnCoverageLoss": {
                    "const": true
                  }
                }
              }
            }
          },
          "then": {
            "properties": {
              "scope": {
                "const": "country"
              },
              "confirmedNetworks": {
                "minItems": 2
              },
              "networkAccess": {
                "properties": {
                  "operators": {
                    "minItems": 2
                  }
                }
              }
            }
          }
        }
      ]
    },
    "buyerInformation": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "delivery",
        "installation",
        "activation",
        "communications",
        "vpn",
        "requirements",
        "refunds",
        "links"
      ],
      "properties": {
        "delivery": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "method",
            "timing",
            "fees",
            "physicalShipping"
          ],
          "properties": {
            "method": {
              "const": "digital"
            },
            "timing": {
              "const": "instant"
            },
            "fees": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "EUR",
                "USD"
              ],
              "properties": {
                "EUR": {
                  "const": 0
                },
                "USD": {
                  "const": 0
                }
              }
            },
            "physicalShipping": {
              "const": false
            }
          },
          "description": "All published products: instant digital delivery at zero extra cost; not physical shipping."
        },
        "installation": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "methods",
            "directAppInstallation",
            "webAccount",
            "reusableEsim",
            "reuse",
            "internetRequired"
          ],
          "properties": {
            "methods": {
              "const": [
                "app",
                "qr_code",
                "manual"
              ]
            },
            "directAppInstallation": {
              "const": "device_dependent"
            },
            "webAccount": {
              "type": "string",
              "minLength": 1
            },
            "reusableEsim": {
              "const": true
            },
            "reuse": {
              "type": "string",
              "minLength": 1
            },
            "internetRequired": {
              "const": true
            }
          }
        },
        "activation": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "startsOn",
            "purchaseStartsValidity",
            "installationStartsValidity",
            "eachBundleHasOwnValidity",
            "topUpExtendsPreviousValidity",
            "alreadyInCoverage"
          ],
          "properties": {
            "startsOn": {
              "const": "first_supported_network_use_in_coverage"
            },
            "purchaseStartsValidity": {
              "const": false
            },
            "installationStartsValidity": {
              "const": false
            },
            "eachBundleHasOwnValidity": {
              "const": true
            },
            "topUpExtendsPreviousValidity": {
              "const": false
            },
            "alreadyInCoverage": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "communications": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "dataOnly",
            "newPhoneNumber",
            "nativeVoice",
            "nativeSms",
            "keepWhatsAppNumber",
            "internetCallingAndMessaging",
            "homeCarrierChargesIncluded"
          ],
          "properties": {
            "dataOnly": {
              "const": true
            },
            "newPhoneNumber": {
              "const": false
            },
            "nativeVoice": {
              "const": false
            },
            "nativeSms": {
              "const": false
            },
            "keepWhatsAppNumber": {
              "const": true
            },
            "internetCallingAndMessaging": {
              "const": true
            },
            "homeCarrierChargesIncluded": {
              "const": false
            }
          }
        },
        "vpn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "includedOnEveryPlan",
            "extraCost",
            "platforms",
            "connectionTypes",
            "simultaneousPhoneAndComputerUse",
            "maxSimultaneousConnectionsPerAccount",
            "connectionLimitEvidenceUrls",
            "access",
            "activation",
            "benefit",
            "alwaysOn",
            "guaranteedServiceUnblocking",
            "phoneHotspotRequired"
          ],
          "properties": {
            "includedOnEveryPlan": {
              "const": true
            },
            "extraCost": {
              "const": false
            },
            "platforms": {
              "const": [
                "iOS",
                "Android",
                "Windows",
                "Mac"
              ]
            },
            "connectionTypes": {
              "const": [
                "mobile_data",
                "wifi"
              ]
            },
            "simultaneousPhoneAndComputerUse": {
              "const": true
            },
            "maxSimultaneousConnectionsPerAccount": {
              "const": 10
            },
            "connectionLimitEvidenceUrls": {
              "type": "array",
              "minItems": 2,
              "maxItems": 2,
              "uniqueItems": true,
              "items": {
                "type": "string",
                "format": "uri",
                "pattern": "^https://"
              }
            },
            "access": {
              "const": "while_eligible_bundle_active"
            },
            "activation": {
              "type": "string",
              "minLength": 1
            },
            "benefit": {
              "type": "string",
              "minLength": 1
            },
            "alwaysOn": {
              "const": false
            },
            "guaranteedServiceUnblocking": {
              "const": false
            },
            "phoneHotspotRequired": {
              "const": false
            }
          },
          "description": "VPN inclusion is universal; access depends on an eligible active bundle. Connect in the app on each device."
        },
        "requirements": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "esimCompatibleDevice",
            "carrierUnlockedDevice",
            "internetRequiredToInstall"
          ],
          "properties": {
            "esimCompatibleDevice": {
              "const": true
            },
            "carrierUnlockedDevice": {
              "const": true
            },
            "internetRequiredToInstall": {
              "const": true
            }
          }
        },
        "refunds": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "requestWithinDaysOfPurchase",
            "conditions",
            "installationAloneDisqualifies",
            "unconditionalGuarantee",
            "subjectToPolicy",
            "mandatoryLegalRightsUnaffected"
          ],
          "properties": {
            "requestWithinDaysOfPurchase": {
              "const": 30
            },
            "conditions": {
              "const": [
                "unactivated",
                "unused",
                "not_expired",
                "payment_not_reversed_or_charged_back",
                "purchased_directly_from_esimbundle"
              ]
            },
            "installationAloneDisqualifies": {
              "const": false
            },
            "unconditionalGuarantee": {
              "const": false
            },
            "subjectToPolicy": {
              "const": true
            },
            "mandatoryLegalRightsUnaffected": {
              "const": true
            }
          }
        },
        "links": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "installationUrl",
            "qrAndManualGuideUrl",
            "myEsimUrl",
            "compatibilityUrl",
            "appDownloadUrl",
            "activationUrl",
            "reuseAndTopUpUrl",
            "vpnSetupUrl",
            "networkBenefitsUrl",
            "supportUrl",
            "refundPolicyUrl"
          ],
          "properties": {
            "installationUrl": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://"
            },
            "qrAndManualGuideUrl": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://"
            },
            "myEsimUrl": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://"
            },
            "compatibilityUrl": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://"
            },
            "appDownloadUrl": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://"
            },
            "activationUrl": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://"
            },
            "reuseAndTopUpUrl": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://"
            },
            "vpnSetupUrl": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://"
            },
            "networkBenefitsUrl": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://"
            },
            "supportUrl": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://"
            },
            "refundPolicyUrl": {
              "type": "string",
              "format": "uri",
              "pattern": "^https://"
            }
          }
        }
      },
      "description": "Shared buyer facts and verified links apply to every product in this single master feed; prices and package-specific limits remain on each product."
    }
  }
}
