Rule Configuration

Retrieve a saved rule configuration by merchant and type. An existing merchant with no saved configuration returns 200 with config: null. An unknown merchant returns 404.

post/rule/get

Request

  • Base URL
    http://localhost:8080
  • URL
    http://localhost:8080/rule/get
  • Auth
    • HTTP bearer
    • or API key in header x-api-key

Request body

merchant_idstring required
algorithm'successRate' | 'elimination' | 'debitRouting' required

Example request

{
  "merchant_id": "test_merchant",
  "algorithm": "successRate"
}

Response

Saved rule config, or config: null when not configured

merchant_idstring required

Example response

{
  "merchant_id": "merchant_demo",
  "config": {
    "type": "successRate",
    "data": {
      "defaultBucketSize": 20,
      "subLevelInputConfig": [
        {
          "paymentMethod": "CARD",
          "paymentMethodType": "CREDIT",
          "bucketSize": 30,
          "hedgingPercent": 0.05
        }
      ],
      "margin": 0.2
    }
  }
}

Changes

    • breaking

      added subschema #2 to the response property oneOf list for the response status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • info

      added the non-success response with the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property //////// became required for the status