For the complete documentation index, see llms.txt. This page is also available as Markdown.

Flow Routes & Branches

List Flow Step Routes

get

Retrieves a list of routes (legs) for a specific Route or Branch flow step. The flow_step identifier can be obtained from GET /api/v1/flow-versions/{flow_version}/steps.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flow_stepstringRequired

The flow step identifier.

Query parameters
filter[step_id]stringOptional

Filter results by step_id.

includestringOptional

Comma-separated list of relationships to include. Available: flowStep, filters, firstStep

pageinteger · min: 1Optional

Page number for pagination.

Default: 1
per_pageinteger · min: 1 · max: 100Optional

Number of results per page.

Responses
200

Successful response

application/json
get/api/v1/flow-steps/{flow_step}/routes
GET /api/v1/flow-steps/{flow_step}/routes HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": 1,
      "first_step_id": 1,
      "filter_logic_operator": "example_filter_logic_operator",
      "created_at": "2025-01-15T10:30:00.000000Z",
      "updated_at": "2025-01-15T10:30:00.000000Z",
      "flow_version_id": 1,
      "name": "My Example",
      "microservice": {},
      "config": {},
      "parent_id": 1,
      "flow_version": {},
      "children": {},
      "endpoint": {},
      "connector": [],
      "data_pool": [],
      "filters": [],
      "parent_flow_step": [],
      "routes": [],
      "variables": [],
      "script_version": [],
      "cache": [],
      "payloads": [],
      "flow": {},
      "cross_references": "example_cross_references",
      "notes_count": 5,
      "notification_group": {},
      "order": "example_order"
    }
  ],
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "https://api.example.com/api/v1/flow-steps/{flow_step}/routes",
    "per_page": 25,
    "to": 1,
    "total": 1
  },
  "links": {
    "first": "https://api.example.com/api/v1/flow-steps/{flow_step}/routes?page=1",
    "last": "https://api.example.com/api/v1/flow-steps/{flow_step}/routes?page=1",
    "prev": null,
    "next": null
  }
}

Create Flow Step Route

post

Creates a new route (leg) on a Route or Branch flow step. Requires a name, and optionally accepts a first_step_id and filter_logic_operator. The flow_step identifier can be obtained from GET /api/v1/flow-versions/{flow_version}/steps.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flow_stepstringRequired

The flow step identifier.

Body
first_step_idstring · nullableOptional
filter_logic_operatorstringOptional
namestring · min: 1 · max: 255Required
Responses
200

Successful response

application/json
post/api/v1/flow-steps/{flow_step}/routes
POST /api/v1/flow-steps/{flow_step}/routes HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 95

{
  "first_step_id": 1,
  "filter_logic_operator": "example_filter_logic_operator",
  "name": "My Example"
}
{
  "data": {
    "id": 1,
    "first_step_id": 1,
    "filter_logic_operator": "example_filter_logic_operator",
    "created_at": "2025-01-15T10:30:00.000000Z",
    "updated_at": "2025-01-15T10:30:00.000000Z",
    "flow_version_id": 1,
    "name": "My Example",
    "microservice": {},
    "config": {},
    "parent_id": 1,
    "flow_version": {},
    "children": {},
    "endpoint": {},
    "connector": [],
    "data_pool": [],
    "filters": [],
    "parent_flow_step": [],
    "routes": [],
    "variables": [],
    "script_version": [],
    "cache": [],
    "payloads": [],
    "flow": {},
    "cross_references": "example_cross_references",
    "notes_count": 5,
    "notification_group": {},
    "order": "example_order"
  }
}

Update Flow Step Route

put

Updates an existing route (leg) on a Route or Branch flow step. Accepts name, first_step_id, and filter_logic_operator. The flow_step identifier can be obtained from GET /api/v1/flow-versions/{flow_version}/steps.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flow_stepstringRequired

The flow step identifier.

routestringRequired

The route identifier.

Body
first_step_idstring · nullableOptional
filter_logic_operatorstringOptional
namestring · min: 1 · max: 255Optional
Responses
200

Successful response

application/json
put/api/v1/flow-steps/{flow_step}/routes/{route}
PUT /api/v1/flow-steps/{flow_step}/routes/{route} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 95

{
  "first_step_id": 1,
  "filter_logic_operator": "example_filter_logic_operator",
  "name": "My Example"
}
{
  "data": {
    "id": 1,
    "first_step_id": 1,
    "filter_logic_operator": "example_filter_logic_operator",
    "created_at": "2025-01-15T10:30:00.000000Z",
    "updated_at": "2025-01-15T10:30:00.000000Z",
    "flow_version_id": 1,
    "name": "My Example",
    "microservice": {},
    "config": {},
    "parent_id": 1,
    "flow_version": {},
    "children": {},
    "endpoint": {},
    "connector": [],
    "data_pool": [],
    "filters": [],
    "parent_flow_step": [],
    "routes": [],
    "variables": [],
    "script_version": [],
    "cache": [],
    "payloads": [],
    "flow": {},
    "cross_references": "example_cross_references",
    "notes_count": 5,
    "notification_group": {},
    "order": "example_order"
  }
}

Delete Flow Step Route

delete

Permanently deletes a specific route (leg) from a Route or Branch flow step. The flow_step identifier can be obtained from GET /api/v1/flow-versions/{flow_version}/steps.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flow_stepstringRequired

The flow step identifier.

routestringRequired

The route identifier.

Responses
200

Successful response

application/json
messagestringOptional
delete/api/v1/flow-steps/{flow_step}/routes/{route}
DELETE /api/v1/flow-steps/{flow_step}/routes/{route} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "message": "Action completed successfully."
}

Order Flow Step Route

post

Updates the display order of routes (legs) on a Route or Branch flow step. The flow_step identifier can be obtained from GET /api/v1/flow-versions/{flow_version}/steps.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flowStepstringRequired

The flowStep identifier.

Responses
200

Successful response

application/json
objectOptional
post/api/v1/flow-steps/{flowStep}/routes/order
POST /api/v1/flow-steps/{flowStep}/routes/order HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{}

Last updated

Was this helpful?