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

# Set Bundle State

> Activates or deactivates a bundle. A bundle must have at least one option before it can be activated.



## OpenAPI

````yaml swagger.json patch /bundles/{bundleId}/state
openapi: 3.0.0
info:
  title: Quotivity API
  description: Developer APIs for the Quotivity CPQ platform.
  version: 1.0.0
servers:
  - url: https://api.secure.quotivity.com/v1
    description: Production API Server
security: []
paths:
  /bundles/{bundleId}/state:
    patch:
      tags:
        - Bundles
      summary: Set Bundle State
      description: >-
        Activates or deactivates a bundle. A bundle must have at least one
        option before it can be activated.
      parameters:
        - name: bundleId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetBundleStateRequest'
      responses:
        '200':
          description: Bundle state updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Bundle'
        '400':
          description: Bundle cannot be activated (no options)
        '401':
          description: Unauthorized
        '404':
          description: Bundle not found
        '500':
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SetBundleStateRequest:
      type: object
      properties:
        isActive:
          type: boolean
      required:
        - isActive
    Bundle:
      type: object
      properties:
        id:
          type: string
        accountId:
          type: string
        isActive:
          type: boolean
        header:
          $ref: '#/components/schemas/BundleProduct'
        clonedBundleTempName:
          type: string
          nullable: true
      required:
        - id
        - accountId
        - isActive
    BundleProduct:
      type: object
      properties:
        productId:
          type: string
        properties:
          type: object
          additionalProperties:
            type: string
            nullable: true
      required:
        - productId
        - properties
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````