POST
/
success_rate.SuccessRateCalculator
/
FetchEntityAndGlobalSuccessRate
{
  "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"
      }
    ]
  ]
}

Headers

x-tenant-id
string
required
x-profile-id
string
required
x-api-key
string
required

Body

application/json
entity_id
string
required

Entity identifier

Example:

"merchant1"

entity_params
string
required

Additional parameters for entity success rate calculation

Example:

"card"

entity_labels
string[]
required

Entity-specific labels for which to calculate success rates

Example:
["stripe", "adyen"]
global_labels
string[]
required

Global labels for which to calculate success rates

Example:
["stripe", "adyen"]

Response

200
application/json
Success rates calculated successfully
entity_scores_with_labels
array

Entity-specific labels with their calculated success rates

global_scores_with_labels
array

Global labels with their calculated success rates