> ## Documentation Index
> Fetch the complete documentation index at: https://api-reference.hyperswitch.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update success rate window

> Updates the success rate calculation window with new data points



## OpenAPI

````yaml post /success_rate.SuccessRateCalculator/UpdateSuccessRateWindow
openapi: 3.0.0
info:
  title: Dynamic routing - OpenAPI 3.0
  description: This the the open API 3.0 specification for the dynamic routing.
  version: 1.0.0
servers: []
security: []
paths:
  /success_rate.SuccessRateCalculator/UpdateSuccessRateWindow:
    post:
      tags:
        - Success Rate
      summary: Update success rate window
      description: Updates the success rate calculation window with new data points
      operationId: updateSuccessRateWindow
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          schema:
            type: string
          example: public
        - name: x-profile-id
          in: header
          required: true
          schema:
            type: string
          example: pro_WX0giXQnzk2wQJjkKVBX
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
          example: dev_VLzQTxkPq3ALj2mlfiHL4mMtXca4uplOIOLaKEzmWAmNBXZjwsuv5bCLjnf0QYHm
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSuccessRateWindowRequest'
            example:
              id: merchant1
              params: card
              labels_with_status:
                - status: false
                  label: stripe
                - status: true
                  label: adyen
              global_labels_with_status:
                - status: false
                  label: stripe
                - status: true
                  label: adyen
      responses:
        '200':
          description: Window updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateSuccessRateWindowResponse'
        '400':
          description: Invalid request parameters
        '500':
          description: Internal server error
components:
  schemas:
    UpdateSuccessRateWindowRequest:
      type: object
      properties:
        id:
          type: string
          example: merchant1
          description: Entity identifier
        params:
          type: string
          example: card
          description: Additional parameters for window update
        labels_with_status:
          type: array
          items:
            $ref: '#/components/schemas/LabelWithStatus'
          description: Entity-specific labels with their success/failure status
          example:
            - status: false
              label: stripe
            - status: true
              label: adyen
        global_labels_with_status:
          type: array
          items:
            $ref: '#/components/schemas/LabelWithStatus'
          description: Global labels with their success/failure status
          example:
            - status: false
              label: stripe
            - status: true
              label: adyen
      required:
        - id
        - params
        - labels_with_status
    UpdateSuccessRateWindowResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - WINDOW_UPDATION_SUCCEEDED
            - WINDOW_UPDATION_FAILED
          description: Status of the window update operation
      required:
        - status
    LabelWithStatus:
      type: array
      items:
        $ref: '#/components/schemas/LabelWithStatusList'
      example:
        - status: false
          label: stripe
        - status: true
          label: adyen
    LabelWithStatusList:
      type: object
      properties:
        status:
          type: number
          format: boolean
          example: true
          description: Label status
        label:
          type: string
          example: stripe
          description: Label identifier
      required:
        - status
        - label

````