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

# Set grace period finish action

> Sets the action to be taken at the end of grace period. By default it is set to "LAPSE"



## OpenAPI

````yaml /openapi.yaml patch /v1/esims/{iccid}/availability
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/esims/{iccid}/availability:
    parameters:
      - schema:
          type: string
        name: iccid
        in: path
        required: true
        description: iccid of the esim
    patch:
      tags:
        - Esim
      summary: Set grace period finish action
      description: >-
        Sets the action to be taken at the end of grace period. By default it is
        set to "LAPSE"
      operationId: set-grace-period-finish-action
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                gracePeriodFinishAction:
                  x-stoplight:
                    id: oh2yll1jm3yqn
                  enum:
                    - LAPSE
                    - PRESERVE
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Availability'
              examples: {}
        '403':
          description: If the esim is LAPSED, the availability can't be updated.
        '404':
          description: The requested resource doesn't exist.
components:
  schemas:
    Availability:
      title: Availability
      x-stoplight:
        id: 9dike6s5qmy6j
      type: object
      examples:
        - gracePeriodFinishAction: LAPSE
          gracePeriodFinishAt: 1768481221
          currentState: ACTIVE
      required:
        - gracePeriodFinishAction
        - gracePeriodFinishAt
        - currentState
      properties:
        gracePeriodFinishAction:
          x-stoplight:
            id: zx89smtdjw4vv
          enum:
            - LAPSE
            - PRESERVE
          description: >-
            The action that would be taken by the system once the grace period
            is finished.
        gracePeriodFinishAt:
          type: integer
          x-stoplight:
            id: d9jtor8yynr7y
          description: Timestamp at which the grace period finishes.
        currentState:
          x-stoplight:
            id: o4y33otft632k
          enum:
            - ACTIVE
            - LAPSED
      x-internal: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````