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

# Archive a plan

> Archives an existing plan which thereafter cannot be used to create a subscription in future. This is an irreversible operation. An archived plan has a non-null `archivedAt` field. Updating a plan won't impact or modify the existing and historic attachments for this plan



## OpenAPI

````yaml /openapi.yaml post /v1/plans/{id}/archive
openapi: 3.1.0
info:
  title: Bondio API
  version: '1.0'
  description: Bondio's REST API for eSIM provisioning, plans, subscriptions, and billing.
servers:
  - url: https://api.bondio.co
    description: prod
security:
  - BearerAuth: []
tags:
  - name: Plan
  - name: Esim
  - name: Subscription
  - name: Addon Attachment
paths:
  /v1/plans/{id}/archive:
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
    post:
      tags:
        - Plan
      summary: Archive a plan
      description: >-
        Archives an existing plan which thereafter cannot be used to create a
        subscription in future. This is an irreversible operation. An archived
        plan has a non-null `archivedAt` field. Updating a plan won't impact or
        modify the existing and historic attachments for this plan
      operationId: archive-a-plan
      responses:
        '200':
          description: Returns the archived plan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plan'
              examples:
                Example 1:
                  value:
                    id: plan.id1
                    name: UK incredible
                    coverage:
                      id: cvpr_dfklsh12
                      name: United Kingdom
                      label: chi
                    voiceMinutes: 60
                    dataMegaBytes: 1024
                    smsMessages: 100
                    periodDays: 30
                    archivedAt: null
                    isAddon: false
                    label: alpha
        '404':
          description: The requested resource doesn't exist.
        '409':
          description: >-
            The request could not be processed because the plan is already
            archived.
components:
  schemas:
    Plan:
      title: Plan
      x-stoplight:
        id: 4ceojg8oblono
      type: object
      properties:
        id:
          type: string
          x-stoplight:
            id: j9n03ao6b9d4a
        name:
          type: string
          x-stoplight:
            id: w8os2ob7482qf
        dataMegaBytes:
          type: integer
          x-stoplight:
            id: qo1dazuxcihpz
        voiceMinutes:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: k6oogjlhjql2h
        smsMessages:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: um8vw62o3jhaq
        periodDays:
          type: integer
          x-stoplight:
            id: ndn3izx84n9v6
          description: Plan validity in days
        periodIterations:
          type: integer
          x-stoplight:
            id: kh4balxtu26xl
          description: |
            Number of times the periodDays should be repeated.
          default: 1
        throttledSpeedKbps:
          type: integer
          x-stoplight:
            id: jm57whh0qp98i
          description: >-
            Speed after allocated data is used up. The default zero means no
            usage allowed afterwards.
          default: 0
        archivedAt:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: gwmnqj70r8xnf
        label:
          type: string
          x-stoplight:
            id: zhturxz3id6mg
          description: The plan-esim compatibility label
        coverage:
          $ref: '#/components/schemas/CoverageProfile'
          x-stoplight:
            id: 0c11ja0a68pzx
        createdAt:
          type: integer
          x-stoplight:
            id: f8g7ij5x9vrjl
      description: ''
      examples:
        - id: plan_gulabo12
          name: Australia 1GB 7d recurring throttled
          voiceMinutes: 60
          dataMegaBytes: 1024
          smsMessages: 100
          periodDays: 1
          periodIterations: 7
          throttledSpeedKbps: 128
          archivedAt: null
          label: alpha
          createdAt: 0
          coverage:
            id: cvpr_hdy2da3n
            name: Australia region
            label: lambda
            countries:
              - name: Australia
                iso2: AU
                iso3: AUS
                operators:
                  - name: Telstra
                    supportedRats:
                      - 4g
                      - 5g
    CoverageProfile:
      title: Coverage
      x-stoplight:
        id: npllcdnx2x6fs
      type: object
      examples:
        - id: cvpr_hdy2da3n
          name: Australia region
          label: lambda
          countries:
            - name: Australia
              iso2: AU
              iso3: AUS
              indicator: A
              operators:
                - name: Telstra
                  supportedRats:
                    - 4g
                    - 5g
      required:
        - id
        - name
        - label
        - countries
      properties:
        id:
          type: string
          x-stoplight:
            id: fr2ki4gr76iwu
        name:
          type: string
          x-stoplight:
            id: 35b8pijen22y9
        label:
          type: string
          x-stoplight:
            id: bjc8fniomwakt
        countries:
          type: array
          x-stoplight:
            id: p07u0mw1sqpdy
          items:
            $ref: '#/components/schemas/CountryZone'
            x-stoplight:
              id: ol2uu32ojpj0b
    CountryZone:
      title: CountryZone
      x-stoplight:
        id: b1d260qr7zw8v
      type: object
      examples:
        - name: Australia
          iso2: AU
          iso3: AUS
          indicator: A
          operators:
            - name: Telstra
              supportedRats:
                - 4g
                - 5g
      required:
        - name
        - iso2
        - iso3
        - indicator
        - operators
      properties:
        name:
          type: string
          x-stoplight:
            id: ydhdcg3mn1ijb
        iso2:
          type: string
          x-stoplight:
            id: xggthwuuauhut
        iso3:
          type: string
          x-stoplight:
            id: h8do30uk1yugm
        indicator:
          type: string
          x-stoplight:
            id: d19n7jr9hs1we
        operators:
          x-stoplight:
            id: r7q4kn1k01op0
          type: array
          items:
            $ref: '#/components/schemas/Operator'
            x-stoplight:
              id: u0l1h1eid6727
    Operator:
      title: Operator
      x-stoplight:
        id: 81vp32d4i7h8m
      type: object
      examples:
        - name: Vodafone
          supportedRats:
            - 3G
            - 4G
      required:
        - name
        - supportedRats
      properties:
        name:
          type: string
          x-stoplight:
            id: jhrg8akpydzkk
        supportedRats:
          type: array
          x-stoplight:
            id: 9pcw1njdmt63f
          description: |
            List of supported radio access technologies
          items:
            x-stoplight:
              id: 1uuus85l6ght9
            type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````