> ## 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.

# Get a plan attachment

> The attachment could be in any of the following state:

**CREATED** - attachment is created in the database, but not provisioned on the telco system

**PENDING_FOR_FIRST_USE** - ready to be activated on first use

**ACTIVE** - data can be actively consumed if the allowance is not exhausted

**SUSPENDED** - data can not be consumed in this state

**EXPIRED** - validity expired so no data consumption possible

**SCHEDULED** - ready to be activated at the schedule date & time



## OpenAPI

````yaml /openapi.yaml get /v2/subscriptions/{xid}/plan-attachments/{id}
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:
  /v2/subscriptions/{xid}/plan-attachments/{id}:
    parameters:
      - schema:
          type: string
        name: xid
        in: path
        required: true
        description: esim ICCID or subscription id
      - schema:
          type: string
        name: id
        in: path
        required: true
        description: id of the plan attachment
    get:
      tags:
        - SubscriptionV2
      summary: Get a plan attachment
      description: >-
        The attachment could be in any of the following state:


        **CREATED** - attachment is created in the database, but not provisioned
        on the telco system


        **PENDING_FOR_FIRST_USE** - ready to be activated on first use


        **ACTIVE** - data can be actively consumed if the allowance is not
        exhausted


        **SUSPENDED** - data can not be consumed in this state


        **EXPIRED** - validity expired so no data consumption possible


        **SCHEDULED** - ready to be activated at the schedule date & time
      operationId: get-v2-subscriptions-xid-plan-attachments-id
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanAttachment'
components:
  schemas:
    PlanAttachment:
      title: PlanAttachment
      x-stoplight:
        id: 4khtht2byisce
      type: object
      required:
        - id
        - createdAt
        - activationAt
        - expirationAt
        - state
        - usedAllowance
        - plan
      properties:
        id:
          type: string
          x-stoplight:
            id: pfay6jmculzxo
        createdAt:
          type: number
          x-stoplight:
            id: 0ye7j7zd7yy9r
        activationAt:
          type: number
          x-stoplight:
            id: xp5yzoeyl152d
        expirationAt:
          type: number
          x-stoplight:
            id: k4ec6ozn8l3dh
        state:
          x-stoplight:
            id: h7e0wsa9mncix
          enum:
            - CREATED
            - PENDING_FOR_FIRST_USE
            - SCHEDULED
            - ACTIVE
            - EXPIRED
            - SUSPENDED
        usedAllowance:
          $ref: '#/components/schemas/Allowance'
          x-stoplight:
            id: nsx5ksce9t4lu
        plan:
          $ref: '#/components/schemas/PlanForAttachment'
          x-stoplight:
            id: ykduvzapqrrfx
    Allowance:
      title: Allowance
      x-stoplight:
        id: xprozbv6umr33
      type: object
      examples:
        - dataBytes: 1024
          voiceSeconds: 60
          smsMessages: 100
      properties:
        dataBytes:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: cjcvtodo08pjs
          format: int64
          minimum: 0
        voiceSeconds:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: 5lrv0ke2wi39u
        smsMessages:
          type:
            - integer
            - 'null'
          x-stoplight:
            id: 17ms5p0dzfm0m
    PlanForAttachment:
      title: PlanForAttachment
      x-stoplight:
        id: odujx98nt7wac
      type: object
      examples:
        - name: Australia 1GB 7d
          dataMegaBytes: 1024
          periodDays: 1
          periodIterations: 7
          throttledSpeedKbps: 128
          label: alpha
          coverageProfileId: cvpr_ybrs38es
      x-internal: false
      properties:
        name:
          type: string
          deprecated: true
        dataMegaBytes:
          type: integer
        periodDays:
          type: integer
          description: Plan validity in days
        periodIterations:
          type: integer
          description: |
            Number of times the periodDays should be repeated.
          default: 1
        throttledSpeedKbps:
          type: integer
          description: >-
            Speed after allocated data is used up. The default zero means no
            usage allowed afterwards.
          default: 0
        label:
          type: string
          description: The plan-esim compatibility label
        coverageProfileId:
          type: string
          x-stoplight:
            id: 08gh0d0gwjx1r
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````