Leads
Index
1. /lead/funnels
Pathname:
{{baseUrl}}/api/v1/{{codename}}/lead/funnels?skip={{skip}}&limit={{limit}}
{{baseUrl}}/api/v1/{{codename}}/lead/funnels?skip={{skip}}&limit={{limit}}&accountId={{accountId}}
Method: GET
Header:
Accept: 'application/json'
Content-Type: 'application/json'
Authorization: 'Bearer ' + accessToken
Url params:
Parameter | type | Description |
---|---|---|
codename | String | Request the Chat-Tonic team. |
Query params:
Parameter | type | Description |
---|---|---|
skip | String | 0 (Default 0) |
limit | String | 10 (Default and max value 100) |
accountId | String | Optional value, account id. |
Response:
Returns the funnels created for the bot with their interactions.
{
"limit": 10,
"skip": 0,
"funnels": {
"sacarTarjeta": {
"interactions": [
"INICIO",
"DNI",
"CELULAR",
"INGRESO",
"FIN"
],
"groups": [
{
"doubleCounting": true,
"newAt": 24,
"interactions": [
"INICIO",
"DNI",
"CELULAR",
"INGRESO",
"FIN"
],
"_id": "5d7a6b9266f1bf664e3f6a7b",
"funnelId": "sacarTarjeta",
"name": "Sacar Tarjeta"
}
]
}
}
}
2. /lead/records
Pathname:
Method: GET
Header:
Url params:
Parameter | type | Description |
---|---|---|
codename | String | Request the Chat-Tonic team. |
skip | String | 0 (Default 0) |
limit | String | 10 (Default and max value 100) |
funnel | String | Required value, funnel name. |
funnelGroup | String | Required value, funnelGroup name. |
account | String | Optional value. |
startDate | Date(ISO_8601) | Optional value. |
endDate | Date(ISO_8601) | Optional value. |
Response:
Returns 'Leads' generated by users.
3. /lead/export
Pathname:
Method: GET
Header:
Url params:
Parameter | type | Description |
---|---|---|
codename | String | Request the Chat-Tonic team. |
Query params:
Parameter | type | Description |
---|---|---|
funnel | String | Required value, funnel name. |
funnelGroup | String | Required value, funnelGroup name. |
exportType | String | Required value: csv json xlsx |
bot | String | Required value, bot name. |
account | String | Optional value, account id. |
startDate | Date(ISO_8601) | Optional value. |
endDate | Date(ISO_8601) | Optional value. |
Response:
Returns 'Leads' generated by users, the file is sent to the mail.
4. Download archives
Pathname:
Method: GET
Header:
Url params:
Parameter | type | Description |
---|---|---|
codename | String | Request the Chat-Tonic team. |
Query params:
Parameter | type | Description |
---|---|---|
token | String | Required value, app token. Request the Chat-Tonic team. |
name | String | Required value, file name. |
Query example (funnels, leads, messageUsers):
Name composition:
Parts | Description |
---|---|
Folder 1 | Model (funnels, leads, messageUsers, messages). |
Folder 2 | Account information separated by dashes. |
File name | Date (YYYY-MM-DD). Always ends with .zip |
Response:
4. Navigate between archive folders (Private. To be published soon)
Pathname:
Method: GET
Header:
Url params:
Parameter | type | Description |
---|---|---|
codename | String | Request the Chat-Tonic team. |
Query params:
Parameter | type | Description |
---|---|---|
format | String | csv |
prefix | String | Possible example values: ““, “funnels” or “leads”. |
Response: