Update Rule Config
August 3, 2026 ยท View on GitHub
Use case
Updates a merchant scoring configuration for success-rate or elimination.
Authentication
Protected. Send either Authorization: Bearer <jwt_token> or x-api-key: <api_key>. In sandbox, also send x-feature: decision-engine.
For local development, start with:
export BASE_URL=http://localhost:8080
export AUTH_HEADER="Authorization: Bearer <jwt_token>"
# Sandbox only:
# export BASE_URL=https://sandbox.hyperswitch.io
# export FEATURE_HEADER="x-feature: decision-engine"
Request
- Method and path:
POST /rule/update - Parameters: none.
- Body: JSON body with
merchant_idand full replacementconfigpayload.
Example
Update success-rate config
curl --location "$BASE_URL/rule/update" \
--header "$AUTH_HEADER" \
--header "Content-Type: application/json" \
--data '{
"merchant_id": "merchant_demo",
"config": {
"type": "successRate",
"data": {
"defaultBucketSize": 30,
"defaultLatencyThreshold": 2500,
"defaultHedgingPercent": 0.1
}
}
}'
Update elimination config
curl --location "$BASE_URL/rule/update" \
--header "$AUTH_HEADER" \
--header "Content-Type: application/json" \
--data '{
"merchant_id": "merchant_demo",
"config": {
"type": "elimination",
"data": {
"threshold": 0.30
}
}
}'
Response
{
"message": "Success Rate Configuration updated successfully",
"merchant_id": "merchant_demo",
"config": {
"type": "successRate",
"data": {
"defaultBucketSize": 30,
"defaultLatencyThreshold": 2500.0,
"defaultHedgingPercent": 0.1,
"subLevelInputConfig": null,
"margin": null
}
}
}
Notes
- Send the full desired config, not only changed fields.
- Changes affect future routing decisions.