v1

latestOpenAPI 3.0.02026-07-26168846732.2 KB
Success Rate

Fetch entity and global success rates

Calculates success rates for both entity-specific and global metrics

post/success_rate.SuccessRateCalculator/FetchEntityAndGlobalSuccessRate

Headers

x-tenant-idstring required
x-profile-idstring required
x-api-keystring required

Request body

entity_idstring
entity_paramsstring
entity_labelsstring[]
global_labelsstring[]

Example request

{
  "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

Success rates calculated successfully

Example response

{
  "entity_scores_with_labels": [
    [
      {
        "score": 100,
        "label": "stripe"
      },
      {
        "score": 98.5,
        "label": "adyen"
      }
    ]
  ],
  "global_scores_with_labels": [
    [
      {
        "score": 100,
        "label": "stripe"
      },
      {
        "score": 98.5,
        "label": "adyen"
      }
    ]
  ]
}