{
  "openapi": "3.1.0",
  "info": {
    "title": "eSIMPricing Plan Feed API",
    "version": "1",
    "summary": "The endpoint an eSIM brand publishes for eSIMPricing to read its catalog.",
    "description": "eSIMPricing sends one GET per read, every 6 hours, and prices the brand from the answer. Specification: https://esimpricing.com/partners/feed-format"
  },
  "servers": [
    {
      "url": "https://{yourDomain}",
      "variables": {
        "yourDomain": {
          "default": "example-mobile.com",
          "description": "your own domain"
        }
      }
    }
  ],
  "paths": {
    "/.well-known/esimpricing/plans.json": {
      "get": {
        "operationId": "getPlanFeed",
        "summary": "The whole current catalog",
        "security": [
          {},
          {
            "feedToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "The catalog, format esimpricing-plans/1. At most 8 MB per document; larger catalogs name the next page in \"next\".",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanFeed"
                },
                "examples": {
                  "full": {
                    "summary": "Envelope with three plans",
                    "value": {
                      "feed": "esimpricing-plans/1",
                      "brand": "Example Mobile",
                      "currency": "EUR",
                      "updated": "2026-03-12T08:00:00Z",
                      "pages": {
                        "JP": "https://example-mobile.com/esim/japan"
                      },
                      "plans": [
                        {
                          "id": "jp-10-30",
                          "planName": "Japan 10 GB",
                          "link": "https://example-mobile.com/esim/japan/10gb-30d",
                          "prices": {
                            "EUR": 14,
                            "USD": 15.5
                          },
                          "validity": 30,
                          "dataCap": 10,
                          "dataUnit": "GB",
                          "coverages": [
                            {
                              "code": "JP",
                              "networks": [
                                {
                                  "name": "NTT Docomo",
                                  "types": [
                                    "4G",
                                    "5G"
                                  ]
                                },
                                {
                                  "name": "SoftBank",
                                  "types": [
                                    "4G"
                                  ]
                                }
                              ]
                            }
                          ],
                          "tethering": true,
                          "canTopUp": true,
                          "starts": "connect",
                          "activateWithin": 180
                        },
                        {
                          "id": "asia-daily-7",
                          "planName": "Asia 3 GB a day",
                          "prices": {
                            "EUR": 29
                          },
                          "validity": 7,
                          "dataCap": 3,
                          "dataUnit": "GB",
                          "dataCapPer": "day",
                          "reducedSpeed": 1000,
                          "coverages": [
                            "JP",
                            "KR",
                            "TW",
                            "TH"
                          ],
                          "internetBreakouts": [
                            {
                              "country": "SG"
                            }
                          ],
                          "tethering": true
                        },
                        {
                          "id": "uk-number-30",
                          "planName": "UK 20 GB with a number",
                          "prices": {
                            "EUR": 25
                          },
                          "validity": 30,
                          "dataCap": 20,
                          "dataUnit": "GB",
                          "coverages": [
                            "GB"
                          ],
                          "telephony": {
                            "dialingCode": "+44",
                            "voice": {
                              "inbound": true,
                              "outbound": true
                            },
                            "sms": {
                              "inbound": true,
                              "outbound": false
                            }
                          },
                          "eKYC": true
                        }
                      ]
                    }
                  },
                  "minimal": {
                    "summary": "The smallest valid feed",
                    "value": [
                      {
                        "validity": 7,
                        "dataCap": 1,
                        "dataUnit": "GB",
                        "prices": {
                          "USD": 4.5
                        },
                        "coverages": [
                          "JP"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "The token is missing or wrong. The read fails and the last accepted read stays in use."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "feedToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Optional. One request header: Authorization, X-Api-Key, or another X-…-Key / X-…-Token name; never part of the URL."
      }
    },
    "schemas": {
      "PlanFeed": {
        "oneOf": [
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Plan"
            }
          },
          {
            "title": "Catalog",
            "type": "object",
            "required": [
              "plans"
            ],
            "properties": {
              "feed": {
                "const": "esimpricing-plans/1",
                "description": "the format name"
              },
              "brand": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "your brand name"
              },
              "currency": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[A-Z]{3}$",
                "description": "the currency you charge in: the one of `prices` we take when a plan states several"
              },
              "updated": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "when this document was generated"
              },
              "taxIncluded": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "prices include VAT or sales tax"
              },
              "pages": {
                "type": [
                  "object",
                  "null"
                ],
                "propertyNames": {
                  "pattern": "^[A-Z]{2}$"
                },
                "additionalProperties": {
                  "type": "string",
                  "format": "uri"
                },
                "description": "your own page for a destination, by ISO 3166-1 alpha-2 code"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri",
                "description": "the next page of a paged catalog, on the same site"
              },
              "plans": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Plan"
                }
              }
            }
          }
        ]
      },
      "Plan": {
        "title": "Plan",
        "type": "object",
        "required": [
          "validity",
          "dataCap",
          "dataUnit",
          "prices",
          "coverages"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "your own id for the plan; unique in the feed, the same on every read (recommended)"
          },
          "planName": {
            "type": [
              "string",
              "null"
            ],
            "description": "the plan's name as your site shows it",
            "maxLength": 120
          },
          "link": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "the plan's page on your own domain, https, without tracking parameters"
          },
          "prices": {
            "type": "object",
            "minProperties": 1,
            "propertyNames": {
              "pattern": "^[A-Z]{3}$"
            },
            "additionalProperties": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "description": "what a new customer pays at checkout, keyed by ISO 4217 currency code"
          },
          "validity": {
            "type": "integer",
            "minimum": 0,
            "description": "days the plan can be used without paying again; 0 = no expiry"
          },
          "dataCap": {
            "type": "number",
            "minimum": 0,
            "description": "the amount at full speed, in dataUnit; 0 = unlimited (no such amount)"
          },
          "dataUnit": {
            "enum": [
              "MB",
              "GB",
              "TB"
            ],
            "description": "unit of dataCap; 1 GB = 1000 MB"
          },
          "dataCapPer": {
            "enum": [
              "day",
              "week",
              "month",
              null
            ],
            "description": "the amount in dataCap renews each day, week or month"
          },
          "maxSpeed": {
            "type": [
              "integer",
              "null"
            ],
            "exclusiveMinimum": 0,
            "description": "a speed limit on the whole plan, kbps"
          },
          "reducedSpeed": {
            "type": [
              "integer",
              "null"
            ],
            "exclusiveMinimum": 0,
            "description": "speed once dataCap is used, kbps; left out when data stops"
          },
          "coverages": {
            "type": "array",
            "minItems": 1,
            "description": "where the plan works",
            "items": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^[A-Z]{2}$",
                  "description": "ISO 3166-1 alpha-2 country code"
                },
                {
                  "type": "object",
                  "required": [
                    "code"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "pattern": "^[A-Z]{2}$",
                      "description": "ISO 3166-1 alpha-2 country code"
                    },
                    "networks": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object",
                        "required": [
                          "name"
                        ],
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "the operator, by its own name"
                          },
                          "types": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string",
                              "maxLength": 4
                            },
                            "description": "radio generations, e.g. [\"4G\", \"5G\"]"
                          }
                        }
                      }
                    }
                  }
                }
              ]
            }
          },
          "internetBreakouts": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "required": [
                "country"
              ],
              "properties": {
                "country": {
                  "type": "string",
                  "pattern": "^[A-Z]{2}$",
                  "description": "ISO 3166-1 alpha-2 country code"
                }
              }
            },
            "description": "countries where traffic leaves to the internet"
          },
          "tethering": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "personal hotspot is allowed"
          },
          "telephony": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "dialingCode",
              "voice",
              "sms"
            ],
            "description": "for plans with a phone number",
            "properties": {
              "dialingCode": {
                "type": "string",
                "description": "country calling code with the plus sign, e.g. \"+44\""
              },
              "voice": {
                "type": "object",
                "required": [
                  "inbound",
                  "outbound"
                ],
                "properties": {
                  "inbound": {
                    "type": "boolean"
                  },
                  "outbound": {
                    "type": "boolean"
                  }
                }
              },
              "sms": {
                "type": "object",
                "required": [
                  "inbound",
                  "outbound"
                ],
                "properties": {
                  "inbound": {
                    "type": "boolean"
                  },
                  "outbound": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "canTopUp": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "more data can be added to the same eSIM"
          },
          "eKYC": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "identity verification is required"
          },
          "newUserOnly": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "the price is for first orders only"
          },
          "subscription": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "the plan renews by itself"
          },
          "subscriptionPeriod": {
            "enum": [
              "month",
              "week",
              null
            ],
            "description": "renewal interval of a subscription"
          },
          "payAsYouGo": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "billed by use"
          },
          "promoEnabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "promo codes are accepted (not used: prices shown are list prices)"
          },
          "hasAds": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "the plan shows advertisements"
          },
          "priceInfo": {
            "type": [
              "string",
              "null"
            ],
            "description": "a note on the price"
          },
          "capacityInfo": {
            "type": [
              "string",
              "null"
            ],
            "description": "a note on data limits or throttling"
          },
          "validityInfo": {
            "type": [
              "string",
              "null"
            ],
            "description": "a note on validity"
          },
          "additionalInfo": {
            "type": [
              "string",
              "null"
            ],
            "description": "what else a buyer should know, one sentence per line"
          },
          "activationInfo": {
            "type": [
              "string",
              "null"
            ],
            "description": "when validity begins, in words (prefer starts)"
          },
          "starts": {
            "enum": [
              "connect",
              "install",
              "purchase",
              null
            ],
            "description": "when the validity clock starts"
          },
          "activateWithin": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "days after purchase by which the plan must be activated"
          }
        }
      }
    }
  }
}