Whatsapp Leads
Get Whatsapp Leads
- Endpoint:
GET /whatsapp-leads
- Allowed for:
users that has right lead.read
- Filters :
Name | Comment | Value |
---|---|---|
id | filter by the given user id | ex: 3 |
phone | filter on mobile | ex: 3 |
status | filter on status (available: 'delivered', 'notdelivered', 'pending') | ex: delivered |
date | filter on date of the whatsapp leads | ex: '2023-05-09' |
date[from] | filter on date range, starting with this date | ex: '2023-05-09' |
date[to] | filter on date range, ending with this date | ex: '2023-05-09' |
user | filter on the assigned user. | ex: 'user' => 1 |
You also can filter on property's whatsapp leads with the key property
in filters and define:
Name | Comment | Value |
---|---|---|
id | filter on the properties selected by the lead. | ex: 'id' => 1 |
reference | filter on the properties selected by the lead. | ex: 'reference' => pf-flex |
Curl example :
$ curl -X GET 'http://api-v2.mycrm.com/whatsapp-leads?filters[status]=pending'
- Sorts (possible values are ASC or DESC for all sorts). Default value is ASC:
Name |
---|
id |
phone |
user |
status |
date |
created |
updated |
Curl example :
$ curl -X GET 'http://api-v2.mycrm.com/whatsapp-leads?sort=id&sort_order=DESC'
- JSON response:
Name | Type | Read-only | Comment |
---|---|---|---|
id | integer | yes | Automatically assigned when the lead is created |
phone | string | no | The lead's mobile phone |
status | string | no | 'notYetContacted', 'calledNoReply', 'prospect', 'qualified', 'viewingsInProgress', 'contractSent', 'contractSigned', 'notReady', 'notInterested' |
user | User | no | User attached to the lead (not expanded by default) |
property | Properties | no | Property attached to the lead (not expanded by default) |
created_at | datetime | yes | Lead creation date (W3C format) |
updated_at | datetime | yes | Lead updated date (W3C format) |
Additional fields available with the expand headers:
Name | Type | Read-only | Comment |
---|---|---|---|
user | User[] | no | Full object |
property | Properties[] | no | array of Full object |
- JSON response example:
{
"whatsapp": {
"id": 35436,
"phone": "0478524147",
"status": "delivered",
"user": {
"id": 1
},
"property": {
"id": 1
},
"created_at": "2009-07-20T22:55:29Z",
"updated_at": "2011-05-05T10:38:52Z"
}
}
The header X-MyCRM-Expand-Data
will provide some additional data:
{
"whatsapp": {
"id": 35436,
"phone": "0478524147",
...
"user": {
"id": 1,
"first_name": "Jean",
"last_name": "Pac",
...
},
"created_at": "2009-07-20T22:55:29Z",
"updated_at": "2011-05-05T10:38:52Z",
}
}