> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onroamly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a plan

> A single plan by its `id`.



## OpenAPI

````yaml /openapi.yaml get /v1/plans/{planId}
openapi: 3.0.3
info:
  title: Roamly API
  version: 1.0.0
  description: |
    Programmatic access to Roamly's travel eSIM plan catalog — every
    destination we sell, every plan, with live pricing.

    **Base URL:** `https://api.onroamly.com`

    All endpoints are read-only `GET` requests returning JSON, and require
    an API key sent as `Authorization: Bearer rk_live_…`. Keys are managed
    from your [Roamly account](https://www.onroamly.com/account/api).
  contact:
    name: Roamly
    email: hello@onroamly.com
    url: https://www.onroamly.com
servers:
  - url: https://api.onroamly.com
security:
  - bearerAuth: []
tags:
  - name: Destinations
    description: Countries and regional bundles Roamly sells plans for.
  - name: Plans
    description: The sellable plan catalog.
  - name: eSIMs
    description: >
      eSIMs purchased by your own account. Every key is tied to one Roamly
      account and returns only that account's eSIMs.
paths:
  /v1/plans/{planId}:
    get:
      tags:
        - Plans
      summary: Get a plan
      description: A single plan by its `id`.
      operationId: getPlan
      parameters:
        - name: planId
          in: path
          required: true
          description: The plan `id` from `/v1/plans`.
          schema:
            type: string
        - $ref: '#/components/parameters/currency'
      responses:
        '200':
          description: The plan.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Plan'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: No plan with that id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: plan_not_found
                  message: No plan with id 'abc'.
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    currency:
      name: currency
      in: query
      required: false
      description: |
        Currency for prices. `AUD` (default) is what checkout charges;
        `USD` is converted at a fixed reference rate for display and may
        differ slightly from card-statement amounts.
      schema:
        type: string
        enum:
          - AUD
          - USD
        default: AUD
  schemas:
    Plan:
      type: object
      properties:
        id:
          type: string
          description: Stable plan identifier.
          example: 4f6b2c1e-8a3d-4e2f-9c5b-1a2b3c4d5e6f
        name:
          type: string
          example: Japan 5GB 30 days
        destination:
          type: object
          properties:
            slug:
              type: string
              example: jp
            name:
              type: string
              example: Japan
            type:
              type: string
              enum:
                - country
                - region
            flagEmoji:
              type: string
              example: 🇯🇵
        dataAmountGB:
          type: number
          description: >-
            High-speed data allowance in GB. For `daily` plans this is the
            per-day allowance.
          example: 5
        dataType:
          type: string
          enum:
            - total
            - daily
          description: Whether `dataAmountGB` is the plan total or a daily allowance.
        validityDays:
          type: integer
          example: 30
        speed:
          type: string
          nullable: true
          example: 4G/5G
        canTopUp:
          type: boolean
          description: Whether extra data can be purchased after activation.
        coverage:
          type: array
          description: ISO 3166-1 alpha-2 codes where the plan works.
          items:
            type: string
          example:
            - JP
        price:
          $ref: '#/components/schemas/Money'
        url:
          type: string
          format: uri
          description: The plan's purchase page on onroamly.com.
          example: >-
            https://www.onroamly.com/explore/jp/4f6b2c1e-8a3d-4e2f-9c5b-1a2b3c4d5e6f
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: not_found
            message:
              type: string
              example: Unknown route.
    Money:
      type: object
      properties:
        amount:
          type: number
          format: float
          example: 14.5
        currency:
          type: string
          enum:
            - AUD
            - USD
          example: AUD
  responses:
    Unauthorized:
      description: Missing, malformed, unknown, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: missing_api_key
              message: 'Provide your API key as ''Authorization: Bearer rk_live_…''.'
    RateLimited:
      description: Rate limit exceeded (120 requests/minute per key).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: rate_limited
              message: Rate limit exceeded (120 requests/minute per key).
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your Roamly API key, e.g. `Authorization: Bearer rk_live_…`'

````