Skip to content

getAppeals method

getAppeals

The method lets you get a list of inquiries received by the R7K12 service. The method returns no more than 10000 records per call; each response includes the “totalResult” parameter with the total number of results. Method: GET URL: https://api.r7k12.com/{{TOKEN}}/getAppeals Parameters: Table 1 Table 1

Parameter Type Required Description
date string No Date the inquiry was received by the system. Format: - YYYY-MM-DD HH:MM:SS - YYYY-MM-DD. If this parameter is specified, the response will include only the inquiries created after the specified date.
phone string No Phone number specified in the inquiry. Must consist of digits only. If specified, only the inquiries whose phone number matches the given number will be returned.
email string No Email address specified in the inquiry. Must be a valid email address. If specified, only the inquiries whose phone number matches the given email will be returned.
fields array [string] No List of fields to return in the response. If the parameter is not set, only session IDs (r7k12id) are returned. Available fields: - id - inquiry ID - r7k12id - session ID - name - name specified in the inquiry - phone - phone number - email - email address - comment - comment - date - creation date (UNIX) - type - inquiry type - call_duration - call duration - call_record - link to the call recording - call_status - call status - price - deal price - href - link to the page from which the request was submitted - raw_data - request data in the form in which it was received
limit integer No Number of records to return in the result (default “10000”)
page integer No Number of the page to return (default “1”)

Request example:

define('TOKEN','XXXXXXXXX');

$data = @file_get_contents(

  'https://api.r7k12.com/'.TOKEN.'/getAppeals?'.

  http_build_query(

      [

          'fields' => [

              'r7k12id',

              'name',

              'phone',

              'email'

          ],

          'limit' => 1

      ]

  )

);

Ответ:

{

"page" : 1,

"totalResult": 100,

"data": [

  {

    "r7k12id" : "4239487948343",

    "name" : "Contact’s Name",

    "phone" : "380441234567",

    "email" : "[email protected]"

  }

]

}