Update success rate window

POST / success_rate.SuccessRateCalculator / UpdateSuccessRateWindow

Example (cURL)

UpdateSuccessRateWindow - cURL
curl --request POST \
  --url https://api.example.com/success_rate.SuccessRateCalculator/UpdateSuccessRateWindow \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-profile-id: <x-profile-id>' \
  --header 'x-tenant-id: <x-tenant-id>' \
  --data '
{
  "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" }
  ]
}
'

Example response (200)

Headers

  • x-tenant-id (string) — required

  • x-profile-id (string) — required

  • x-api-key (string) — required

  • Content-Type: application/json

Request body (application/json)

  • id (string) — required Entity identifier Example: "merchant1"

  • params (string) — required Additional parameters for window update Example: "card"

  • labels_with_status (array of objects) — required Entity-specific labels with their success/failure status. Each object:

    • status (boolean)

    • label (string)

    Example:

  • global_labels_with_status (array of objects) Global labels with their success/failure status. Each object:

    • status (boolean)

    • label (string)

    Example:

Response (200 — application/json)

  • status (enum) — required Status of the window update operation. Available options:

    • WINDOW_UPDATION_SUCCEEDED

    • WINDOW_UPDATION_FAILED

  • Documentation: https://api-reference.hyperswitch.io/introduction

  • Locker API Reference: https://api-reference.hyperswitch.io/locker-api-reference/overview

  • Intelligent Router API Reference: https://api-reference.hyperswitch.io/intelligent-router-api-reference/overview

  • Edit this page: https://github.com/juspay/hyperswitch/edit/main/api-reference/intelligent-router-api-reference/success-rate/update-success-rate-window.mdx

  • Report an issue: https://github.com/juspay/hyperswitch/issues/new?title=Issue%20on%20docs&body=Path:%20/intelligent-router-api-reference/success-rate/update-success-rate-window

  • Related:

    • Fetch success rate for an entity: https://api-reference.hyperswitch.io/intelligent-router-api-reference/success-rate/fetch-success-rate-for-an-entity

    • Invalidate windows: https://api-reference.hyperswitch.io/intelligent-router-api-reference/success-rate/invalidate-windows

Responses are generated using AI and may contain mistakes.