Get scenarios list
Description
Retrieves all created scenarios list.
Request URL
Method: POST
https://example.com/api/v1.1/workflows/list
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
format | string | "json" | No | Response data format By default – json |
from_id | int | 1 | No | The first ID in the response By default – 1 |
limit | int | 1 | No | Resources list limit By default – 1000 |
groups | []string | [ "group1", "group2" ] | No | List of access groups By default – [] |
groups_id | []int | [ 0, 1 ] | No | List of access groups IDs By default – [] |
ui_tags | []string | ["tag1", "tag2"] | No | List of tags By default – [] |
Request example
- JSON
- XML
{
"token": "2fefb577533d4cae919350c450755239",
"from_id": 10,
"limit": 1,
"ui_tags": [
"B2C"
]
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<from_id>10</from_id>
<limit>1</limit>
<ui_tags array='true'>B2C</ui_tags>
</xml>
Response example
- JSON
- XML
{
"data": [
{
"id": 10,
"name": "Government tip",
"list_id": 1,
"is_active": true,
"ui_tags": [
"B2C"
],
"mode": "skip",
"groups": [
{
"ID": 2,
"title": "Sales and promotion"
}
],
"nodes": [
{
"name": "DEFAULT_START_NODE_TITLE",
"type": "start",
"node_id": 0
},
{
"name": "ANY_IMPORT_START_NODE_TITLE",
"type": "start",
"node_id": 2
},
{
"templates": [
1
],
"name": "Welcome letter",
"type": "campaign",
"node_id": 3,
"campaign_id": 17
},
{
"name": "1 d.0 h.0 m.",
"type": "delay",
"node_id": 4
},
{
"name": "Is the subscription confirmed?",
"type": "condition",
"node_id": 5
},
{
"name": "Got the SMS reminder?",
"type": "condition",
"node_id": 6
},
{
"templates": [
5
],
"name": "SMS message",
"type": "campaign",
"node_id": 7,
"campaign_id": 30
},
{
"name": "1 d.0 h.0 m.",
"type": "delay",
"node_id": 8
},
{
"name": "Application to a call center or other product",
"type": "feedback",
"node_id": 9
},
{
"title": "Guidelines",
"type": "feedback",
"node_id": 10
},
{
"name": "Specify code",
"type": "promo_attach",
"node_id": 11
},
{
"templates": [
22
],
"name": "Offer",
"type": "campaign",
"node_id": 12
"campaign_id": 39
}
{
"name": "Go to scenario #29",
"type": "workflow_jump",
"node_id": 13,
"next_workflow_id": 29,
"next_node_id": 0
}
]
}
],
"error": 0,
"error_text": "Successful operation",
"next_from_id": 11,
"total_count": 20
}
<xml>
<data>
<groups>
<id>2</id>
<name>Sales and promotion</name>
</groups>
<id>10</id>
<is_active>true</is_active>
<list_id>1</list_id>
<mode>skip</mode>
<name>Administrative chain</name>
<nodes>
<name>DEFAULT_START_NODE_TITLE</name>
<node_id>0</node_id>
<type>start</type>
</nodes>
<nodes>
<name>ANY_IMPORT_START_NODE_TITLE</name>
<node_id>2</node_id>
<type>start</type>
</nodes>
<nodes>
<campaign_id>17</campaign_id>
<name>Welcome letter</name>
<node_id>3</node_id>
<templates>1</templates>
<type>campaign</type>
</nodes>
<nodes>
<name>1 д.0 ч.0 м.</name>
<node_id>4</node_id>
<type>delay</type>
</nodes>
<nodes>
<name>Is the subscription confirmed?</name>
<node_id>5</node_id>
<type>condition</type>
</nodes>
<nodes>
<name>Got the SMS reminder?</name>
<node_id>6</node_id>
<type>condition</type>
</nodes>
<nodes>
<campaign_id>30</campaign_id>
<name>SMS message</name>
<node_id>7</node_id>
<templates>5</templates>
<type>campaign</type>
</nodes>
<nodes>
<name>1 д.0 ч.0 м.</name>
<node_id>8</node_id>
<type>delay</type>
</nodes>
<nodes>
<name>Application to a call center
or other product</name>
<node_id>9</node_id>
<type>feedback</type>
</nodes>
<nodes>
<name>Guidelines</name>
<node_id>10</node_id>
<type>feedback</type>
</nodes>
<nodes>
<name>Specify code</name>
<node_id>11</node_id>
<type>promocode_attach</type>
</nodes>
<nodes>
<campaign_id>39</campaign_id>
<name>Offer</name>
<node_id>12</node_id>
<templates>22</templates>
<type>campaign</type>
</nodes>
<nodes>
<name>Go to scenario #29</name>
<next_node_id>0</next_node_id>
<next_workflow_id>29</next_workflow_id>
<node_id>13</node_id>
<type>workflow_jump</type>
</nodes>
<ui_tags>B2C</ui_tags>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
<next_from_id>11</next_from_id>
<total_count>20</total_count>
</xml>
Response parameters
Parameter | Type | description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
id | int | Resource ID |
name | string | Resource name |
list_id | int | Database ID |
is_active | bool | Active or inactive scenario |
mode | string | Mode if the profile is recaptured by the scenario |
ui_tags | array | List of tags |
groups | array of objects | List of groups |
nodes | array of objects | List of nodes |
total_count | int | Total resources count |
next_from_id | int | Identifier of the following scenario |
node_id | int | Node Identifier |
campaign_id | int | Campaign Identifier (for node "Channels") |
templates | int | Template Identifier (for node "Channels") |
next_workflow_id | int | Identifier of the next scenario (for the scenario transition node) |
next_node_id | int | Identifier of the next node (for the scenario transition element) |