Routers

The /routers resource is used to work with routers.

List all routers

Get the list of all routers.

Responses
200

OK

get/routers
Request samples
curl -i -X GET \
  https://app.leadconduit.com/routers
Response samples
application/json
[
  • {
    • "id": "string",
    • "module_id": "string",
    • "routes": [
      • {
        • "id": "string",
        • "flow_id": "string",
        • "source_id": "string",
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          }
        }
      ],
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]

Create a router

Create a new custom router, adding it to the list of all routers in the account.

Request
Request Body schema: application/json

Create a new Router

Array of objects (Route)

The routes to be evaluated by this router

created_at
string <date-time> (Timestamp)
updated_at
string <date-time> (Timestamp)
Responses
201

Created

post/routers
Request samples
application/json
{
  • "routes": [
    • {
      • "id": "string",
      • "rule_set": {
        • "id": "string",
        • "op": "and",
        • "rules": [
          • {
            • "id": "string",
            • "lhv": "lead.state",
            • "op": "is equal to",
            • "rhv": "TX",
            • "rule_set": { }
            }
          ]
        }
      }
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}
Response samples
application/json
[
  • {
    • "id": "string",
    • "module_id": "string",
    • "routes": [
      • {
        • "id": "string",
        • "flow_id": "string",
        • "source_id": "string",
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          }
        }
      ],
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]

Get a specific routers

Fetch a single router.

Request
path Parameters
id
required
string (ID) ^[0-9a-fA-F]{24}$

The ID of the router

Responses
200

OK

get/routers/{id}
Request samples
curl -i -X GET \
  https://app.leadconduit.com/routers/:id
Response samples
application/json
{
  • "id": "string",
  • "module_id": "string",
  • "routes": [
    • {
      • "id": "string",
      • "flow_id": "string",
      • "source_id": "string",
      • "rule_set": {
        • "id": "string",
        • "op": "and",
        • "rules": [
          • {
            • "id": "string",
            • "lhv": "lead.state",
            • "op": "is equal to",
            • "rhv": "TX",
            • "rule_set": { }
            }
          ]
        }
      }
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Update a router

Update an existing custom router. Standard routers cannot be updated.

Request
path Parameters
id
required
string (ID) ^[0-9a-fA-F]{24}$

The ID of the router

Request Body schema: application/json

Update an existing Router

Array of objects (Route)

The routes to be evaluated by this router

created_at
string <date-time> (Timestamp)
updated_at
string <date-time> (Timestamp)
Responses
200

OK

put/routers/{id}
Request samples
application/json
{
  • "routes": [
    • {
      • "id": "string",
      • "rule_set": {
        • "id": "string",
        • "op": "and",
        • "rules": [
          • {
            • "id": "string",
            • "lhv": "lead.state",
            • "op": "is equal to",
            • "rhv": "TX",
            • "rule_set": { }
            }
          ]
        }
      }
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}
Response samples
application/json
[
  • {
    • "id": "string",
    • "module_id": "string",
    • "routes": [
      • {
        • "id": "string",
        • "flow_id": "string",
        • "source_id": "string",
        • "rule_set": {
          • "id": "string",
          • "op": "and",
          • "rules": [
            • {
              • "id": "string",
              • "lhv": "lead.state",
              • "op": "is equal to",
              • "rhv": "TX",
              • "rule_set": { }
              }
            ]
          }
        }
      ],
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]