Skip to content

Call Trackings

Call Trackings

  • Endpoint:
/calltrackings
  • Allowed for:

users that has right lead.read

  • Filters :
Name Comment Value
user_id User ID ex: 2
status Status of the Call Tracking ex: 'notanswered', 'answered', 'canceled', 'voicemail'
state State of the Call Tracking ex: 'assigned', 'unassigned'
date_from date from for the range ex: '2023-05-09'
date_to date to for the range ex: '2023-06-09'
phone phone number of the lead ex: +97156300000
reference Reference of the call tracking number ex: 'illusion-1'

You also can filter on call tracking's assigned Property with the key property in filters and define:

Name Comment Value
id filter on property id ex: 1
reference filter on property reference ex: pfflex-123

You also can filter on call tracking lead's assigned Lead attributes with the key lead in filters:

Name Comment Value
id filter on lead id ex: 1
name filter on lead name ex: "John Doe"

Curl example :

$ curl -X GET 'http://api-v2.mycrm.com/calltrackings?filters[property]=1'
  • Sorts (possible values are ASC or DESC for all sorts). Default value is ASC:
Name
id
phone
user
status
date
call_time
lead
created
updated

Curl example :

$ curl -X GET 'http://api-v2.mycrm.com/calltrackings?sort=id&sort_order=DESC'
  • JSON response:

This endpoint will return a list of Call Tracking.

  • JSON response:
Name Type Read-only Comment
id integer yes Automatically assigned when the lead is created
reference string no call tracking reference
phone string no call tracking phone
status string no 'notanswered', 'answered', 'canceled', 'voicemail'
call_start datetime yes time when the call started
call_end datetime yes time when the call ended
talk_time integer yes call duration in seconds
call_time integer yes call duration including ring time in seconds
wait_time integer yes wait time
user User no User attached to the call tracking (not expanded by default)
lead Lead no Lead attached to the call tracking (not expanded by default)
property Property no Property attached to the call tracking (not expanded by default)
download_url string no Download URL for the call tracking file (ex. http://some.link/to/the/recording.mp3)
imported_id string no Original Call Tracking Id
imported_from string no Source of the call tracking. the value will be 'propertyfinder'
created_at datetime yes Call Tracking creation date (W3C format)
updated_at datetime yes Call Tracking updated date (W3C format)
acl_rule string yes Call Tracking access rule for the logged in user
marked as seen boolean no If the call tracking has been opened or not
  • JSON response example:
{
  "call_trackings": [
  {
    "id": 2933498,
    "reference": "pfflex-2933498",
    "phone": "+971 55 487 9009",
    "status": "answered",
    "call_start": "2023-09-02T12:40:43+04:00",
    "call_end": "2023-09-02T12:43:17+04:00",
    "call_time": 154,
    "talk_time": 153,
    "wait_time": 0,
    "user": {
      "id": 41876,
      ...
    },
    "lead": null,
    "property": null,
    "download_url": "https:\/\/pf-ae-documents.s3.ap-southeast-1.amazonaws.com\/calls\/2023\/09\/02\/bbb063430a3be887006deb3d70c4789b.mp3?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJJ3RDDOM5WMNAPNA%2F20230902%2Fap-southeast-1%2Fs3%2Fa",
    "imported_id": "AE-7755633",
    "imported_from": "propertyfinder",
    "created_at": "2023-09-02T08:43:34+04:00",
    "updated_at": "2023-09-02T08:43:34+04:00",
    "acl_rule": "full",
    "marked_as_seen": false
  },
  {
    "id": 1957680,
    "reference": "pfflex-1957680",
    "phone": "+971 4 413 0444",
    "status": "canceled",
    "call_start": "2023-01-17T14:29:05+04:00",
    "call_end": "2023-01-17T14:29:19+04:00",
    "call_time": 14,
    "talk_time": 0,
    "wait_time": 0,
    "user": {
      "id": 76035,
      ...
    },
    "lead": null,
    "property": null,
    "download_url": null,
    "imported_id": "AE-6699088",
    "imported_from": "propertyfinder",
    "created_at": "2023-01-17T14:29:23+04:00",
    "updated_at": "2023-01-17T14:29:23+04:00",
    "acl_rule": "full",
    "marked_as_seen": false
  }
  ]
}

Bulk Actions

PATCH /calltrackings
  • Allowed for:

users that has right lead.update

  • JSON request:

Some actions are available:

Assign user:

Name Type Mandatory Comment
op string yes Operation to execute (replace)
path string yes Path "/assignment/user" to update the state. id must be an integer
value integer yes user id ex. 1

Assign property:

Name Type Mandatory Comment
op string yes Operation to execute (replace)
path string yes Path "/assignment/property" to update the state. id must be an integer
value integer yes user id ex. 1123

Assign lead:

Name Type Mandatory Comment
op string yes Operation to execute (replace)
path string yes Path "/assignment/lead" to update the state. id must be an integer
value integer yes user id ex. 1

Mark As Seen:

Name Type Mandatory Comment
op string yes Operation to execute (replace)
path string yes Path "/seen" to update the state. id must be an integer
value integer yes user id ex. 1
  • JSON request example with mixed operations:
{
    "operations": [
        { "op": "replace", "path": "/assignment/property", "value": 1},
        { "op": "replace", "path": "/assignment/user", "value": 2} ,
        { "op": "replace", "path": "/seen", "value": 2}
    ] 
}

Delete Call Tracking

DELETE /calltrackings/{id}
  • Allowed for:

users that has right lead.delete

  • JSON response:

Will return a 204 http code.

Bulk Deletes

DELETE /calltrackings
  • Allowed for:

users that has right lead.delete

  • JSON request:

An array of property ID. If you don't pass any ID, it will delete all properties.

  • JSON request example: *
{
    "calltrackings": [
        1, 2, 3
    ]
}
  • JSON response:

Will return a 204 http code.

Get call tracking recording

GET /calltrackings/{id}/recording
  • Allowed for:

users that has right lead.read

  • JSON response example:
  {
    "recording": 
      {
        "url": "http:\/\/foo.com"
      }
  }