v1

latestOpenAPI 3.0.02026-07-26168846732.2 KB
Static Routing

Create a routing Rule

Creates a routing rule with the given parameters

post/euclid.EuclidService/Create

Headers

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

Request body

namestring

Example request

{
  "algorithm": {
    "globals": {},
    "default_selection": {
      "priority": {
        "connectors": [
          "stripe",
          "adyen",
          "checkout"
        ]
      }
    },
    "rules": [
      {
        "name": "Card Rule",
        "routing_type": "priority",
        "output": {
          "priority": {
            "connectors": [
              "stripe",
              "adyen"
            ]
          }
        },
        "statements": [
          {
            "condition": [
              {
                "lhs": "payment_method",
                "comparison": "equal",
                "value": {
                  "enum_variant": "card"
                },
                "metadata": {}
              },
              {
                "lhs": "amount",
                "comparison": "greater_than",
                "value": {
                  "number": 1000
                },
                "metadata": {}
              }
            ]
          }
        ]
      }
    ],
    "metadata": {}
  }
}

Response

Successful creation

algorithm_idstring

Algorithm Id for the routing rule

namestring

name of the routing rule

created_atstring

Timestamp for creation of routing rule

modified_atstring

Timestamp for modification of routing rule

Example response

{
  "algorithm_id": "routing_ec1ac351-7944-440f-bdc7-6a500df1116f",
  "name": "test routing rule",
  "created_at": "2025-04-09 8:03:44.85588",
  "modified_at": "2025-04-09 8:03:44.85588"
}