cauril/Docs

Actualizar una regla de routing

patch/v1/routing-rules/{id}

Request

BASH
curl -X PATCH https://api.cauril.com/v1/routing-rules/<id> \
  -H "Authorization: Bearer sk_test_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "priority": 0,
    "conditions": {
      "currency": [
        "BRL"
      ],
      "country": [
        "BR"
      ],
      "method": [
        "pix",
        "card"
      ],
      "amount": {
        "lte": 5000,
        "gte": 5000
      }
    },
    "action": {
      "provider": "mercadopago"
    },
    "enabled": true
  }'

Parámetros

idpathreqstring

Cuerpo UpdateRoutingRule

priorityinteger
conditionsRoutingRuleConditions
actionRoutingRuleAction
enabledboolean

Respuestas

200Regla actualizadaRoutingRule
404ErrorError
422ErrorError

Ejemplo de respuesta · 200

JSON
{
  "object": "routing_rule",
  "id": "rule_01J...",
  "priority": 0,
  "conditions": {
    "currency": [
      "BRL"
    ],
    "country": [
      "BR"
    ],
    "method": [
      "pix",
      "card"
    ],
    "amount": {
      "lte": 5000,
      "gte": 5000
    }
  },
  "action": {
    "provider": "mercadopago"
  },
  "enabled": true,
  "created_at": "2026-06-01T12:00:00Z"
}