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

# Set the active/inactive status of a batch of books in a single call

> Sets one active state on named Derivitec books owned by the caller. Blank names are ignored and duplicate
strings are collapsed. This operation can partially succeed: changed names and failed names are returned,
and `IsSuccess` is false when any requested name cannot be changed.



## OpenAPI

````yaml /risk-and-pricing/atoti-risk-services/apis-endpoints/openapi/openapi.mintlify.json post /api/Books/BatchUpdateBookStatus
openapi: 3.0.4
info:
  title: Derivitec Api 1.0
  version: '1.0'
servers:
  - url: https://api.riskportal.activeviam.com
security:
  - oauth2: []
  - apikey: []
tags:
  - name: AdminUser
  - name: AtotiReport
  - name: AtotiSession
  - name: BloombergOAuth
  - name: Bond
  - name: BondYieldCurvePage
  - name: BookAccess
  - name: Books
  - name: Commodity
  - name: Counterparties
  - name: Currencies
  - name: Equity
  - name: EquityDividend
  - name: EquityPage
  - name: FeatureFlag
  - name: Fx
  - name: FxPage
  - name: GroupAccess
  - name: Home
  - name: LegacyPosition
  - name: MarketData
  - name: MarketDataProvider
  - name: MarketDataProviderAccess
  - name: Meta
  - name: Notification
  - name: Organisation
  - name: PnLReport
  - name: PortfolioAccess
  - name: Portfolios
  - name: Position
  - name: PositionFilter
  - name: PricingEnvironment
  - name: PricingEnvironmentAccess
  - name: RateAsset
  - name: RateAssetPage
  - name: Report
  - name: ReportDefinition
  - name: ReportHistoryLauncherQuery
  - name: ReportLauncher
  - name: ReportQuery
  - name: ReportQueryViewUser
  - name: ReportRestriction
  - name: ReportView
  - name: RiskReport
  - name: Tradable
  - name: TradeBooking
  - name: User
  - name: VarReport
  - name: VarReportQuery
  - name: YieldCurvePage
paths:
  /api/Books/BatchUpdateBookStatus:
    post:
      tags:
        - Books
      summary: Set the active/inactive status of a batch of books in a single call
      description: >-
        Sets one active state on named Derivitec books owned by the caller.
        Blank names are ignored and duplicate

        strings are collapsed. This operation can partially succeed: changed
        names and failed names are returned,

        and `IsSuccess` is false when any requested name cannot be changed.
      operationId: BatchUpdateBookStatus
      requestBody:
        description: >-
          A `Names` collection with at least one non-blank book name after
          filtering and `IsActive`, where `true` activates matched books and
          `false` deactivates them. Any supplied `GroupType` does not change the
          target book type.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/ApiBatchUpdateGroupStatusRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/ApiBatchUpdateGroupStatusRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/ApiBatchUpdateGroupStatusRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ApiBatchUpdateGroupStatusRequest'
      responses:
        '200':
          description: >-
            Returns updated and failed names, including an error for no usable
            names or partial failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiBatchUpdateGroupStatusResponse'
        '400':
          description: BadRequest
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - oauth2: []
        - apikey: []
components:
  schemas:
    ApiBatchUpdateGroupStatusRequest:
      required:
        - $type
      type: object
      properties:
        portfolio_type:
          enum:
            - derivitec
            - enfusion
            - orchestrade
            - liquidity_book
            - maia
            - fund_studio
            - not_set
          type: string
          description: >-
            Portfolio category used to resolve the requested portfolio. It may
            be omitted when the portfolio name resolves unambiguously.
          nullable: true
        names:
          type: array
          items:
            type: string
          description: >-
            Group names to update; blank values are ignored, duplicates are
            collapsed, and at least one usable name is required; the endpoint
            determines whether they identify books or portfolios.
          nullable: true
        is_active:
          type: boolean
          description: >-
            Shared target state for every usable group name: true activates and
            false deactivates.
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.Portfolios.ApiBatchUpdateGroupStatusRequest,
              Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Book or portfolio names and a shared active state requested for a batch
        status change; the endpoint determines the group kind.
    ApiBatchUpdateGroupStatusResponse:
      required:
        - $type
      type: object
      properties:
        is_success:
          type: boolean
          description: >-
            Whether the operation completed successfully. The default is `true`;
            error outcomes set it to `false`.
          example: true
        error_messages:
          type: array
          items:
            type: string
          description: >-
            Messages explaining operation-level failures. The collection is
            empty by default.
          nullable: true
        updated_names:
          type: array
          items:
            type: string
          description: Requested book or portfolio names whose active state was changed.
          nullable: true
        failed_names:
          type: array
          items:
            type: string
          description: >-
            Requested book or portfolio names that were not changed, allowing
            partial success to be identified.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.Portfolios.ApiBatchUpdateGroupStatusResponse,
              Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Book or portfolio names changed and names not changed by a batch status
        request.
  securitySchemes:
    oauth2:
      type: oauth2
      description: >-
        OAuth2 access-token requested from AWS Cognito and provided as a Auth
        Bearer header
      flows:
        implicit:
          authorizationUrl: https://auth.riskportal.derivitec.com/oauth2/authorize
          scopes: {}
    apikey:
      type: apiKey
      description: API-Key requested via the site and provided as a header
      name: x-api-key
      in: header

````