Fetch entity and global success rates
POST /success_rate.SuccessRateCalculator/FetchEntityAndGlobalSuccessRate
Description: Fetch entity-specific and global success rates.
Documentation: https://api-reference.hyperswitch.io/introduction Related: 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
Try it (cURL)
curl --request POST \
--url https://api.example.com/success_rate.SuccessRateCalculator/FetchEntityAndGlobalSuccessRate \
--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 '
{
"entity_id": "merchant1",
"entity_params": "card",
"entity_labels": [
"stripe",
"adyen"
],
"global_labels": [
"visa",
"mastercard"
],
"config": {
"entity_min_aggregates_size": 10,
"entity_default_success_rate": 0.85
}
}
'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)
entity_id (string) Example:
"merchant1"entity_params (string) Example:
"card"entity_labels (string[]) Example:
global_labels (string[]) Example:
config (object) Example:
Response (200 — application/json)
Success rates calculated successfully.
entity_scores_with_labels (object[][]) — Entity-specific labels with their calculated success rates. Example:
global_scores_with_labels (object[][]) — Global labels with their calculated success rates. Example:
Suggest edits: https://github.com/juspay/hyperswitch/edit/main/api-reference/intelligent-router-api-reference/success-rate/fetch-entity-and-global-success-rates.mdx Raise issue: https://github.com/juspay/hyperswitch/issues/new?title=Issue%20on%20docs&body=Path:%20/intelligent-router-api-reference/success-rate/fetch-entity-and-global-success-rates
Related endpoints:
Invalidate windows: https://api-reference.hyperswitch.io/intelligent-router-api-reference/success-rate/invalidate-windows
Fetch eliminated processor list: https://api-reference.hyperswitch.io/intelligent-router-api-reference/elimination/fetch-eliminated-processor-list