Developer Documentation

Need data and instructions for integration or data export? Use our instructions.Obtaining an API KeyAdding a Task (Number) to a DialerRemoving a Task (Number) from a DialerCall LogAdding Call DataRetrieving Call DataRetrieving a Call RecordingSummary Reports by Queues and UsersChanging Agent StatusExporting Contacts from CRMChecking for the Existence of a Value in a ListComplete Order Data (SHOP Module)API for Dialer List

API v.1

 

Obtaining an API Key

The API key is created in the settings of your user account. 

Adding a Task (Number) to a Dialer

URL https://noname.oki-toki.net/api/v1/dialers/create_taskMethod: POST or GET*the API key is created in your user settings, as shown in the first documentation itemPassing variables:Standard method in POST or GET requestNon-standard method. The POST or GET variable json_request should contain a JSON string with data to add a taskAuthorization by user API token. The request must have an api_token variable containing the user’s token.Required data:dialer_id – the dialer number to which to add a taskphones – phone numbers, up to 5. Separated by commas, or a JSON substring (if passed in json_request)Optional data:contact_id – contact number from Oki-Toki CRM,bp_id – process number from Oki-Toki CRM,date – the time for which calls are scheduled, in the format 21.02.2017 12:00:00,import_id – import number,priority – from 0 to 2,region – region in timezone format, e.g. Europe/Kiev (if the region is specified but empty, then the timezone auto-correction (if enabled) will not work, the client schedule will not work, and the call will go according to the dialer’s work schedule),ttl – task lifetime, in seconds,user_id – user number to assign the task to,details – a JSON substring with extra information, for example, {“name”:”John”, “order”:”12″}force_create – 1 or 0. If force_create=1, uniqueness is enabled in the dialer settings, and the task does not get added because of this uniqueness, then when adding, all existing tasks conflicting with the added one by unique key will be automatically canceled,task_id – task number in the dialer. If specified, then the phone numbers will be added to the task with the specified number, if it is in progress,reset_task_id – task number in the dialer. If specified – then the system will try to find this task and put it into work, instead of creating a new one. If phone numbers (phones) are specified, then the system will only put those that are specified into work. If a task does not have any specified number, then it will be added to it. If no numbers are specified – all phones in the task will queue.The response returns a message about the successful addition of the task with its number or an error message. 

Removing a Task (Number) from a Dialer

URL https://noname.oki-toki.net/api/v1/dialers/cancel_taskMethod: POST or GET*the API key is created in your user settings, as shown in the first documentation item.Passing variables:Standard method in POST or GET request.Non-standard method. The POST or GET variable json_request should contain a JSON string with data to add a task.Authorization by user API token. The request must have an api_token variable containing the user’s token.Required data:dialer_id – the dialer number from which to remove the task (if the number = 0, then it is removed from all dialers).Optional data:task_id – task number,phone – phone number that is in the task,contact_id – contact number from Oki-Toki CRM,bp_id – process number from Oki-Toki CRM,details – a JSON substring with extra information, for example, {“name”:”John”, “order”:”12″}. Tasks will be canceled that contain the specified extra information,cancel_phone – 1 (flag, if set, then only the specified phone number gets canceled),cancel_reason – the reason for cancellation (could be one of the following: wrong_number).It is possible to combine optional parameters with each other, then different tasks will be canceled. For example: you can cancel all tasks with a specific phone number, or with details.If no optional parameter is specified, an error will be returned.In response, a message about the successful cancellation of the task(s) with its(their) number(s) is returned or an error message. 

Call Log

URL https://noname.oki-toki.net/api/v1/reports/acd/calls-logMethod: GET*the API key is created in your user settings, as shown in the first documentation item.Authorization by user API token. The request must have an api_token variable containing the user’s token.Without parameters, returns calls from the last hour.Parameters:date_range – the period for which to return data. Values: last_hour, today, yesterday, this_week, prev_week, this_month, prev_month,date – the date for which to return the calls,anis – phone number or session ID,format – the format in which to return the result. Values: default, csv, csv_2016. By default, returns JSON, csv – encoding CP-1251, csv_2016 – encoding UTF-8.Also, all other fields used in the filter of this report. Variable names and values can be taken from the report form. You can also perform the report in the web interface with the necessary parameters, and copy the part of the URL with parameters from the address bar, adding your API token there.ExamplesInstead of asterisks, insert your API tokenCalls for today:https://noname.oki-toki.net/api/v1/reports/acd/calls-log?date_range=today&api_token=****Searching for a call with session ID 12345678, made on 29.08.2017:https://noname.oki-toki.net/api/v1/reports/acd/calls-log?date=28.08.2017&anis=12345678&api_token=****Calls to/from number 380501234567, made last week:https://noname.oki-toki.net/api/v1/reports/acd/calls-log?date_range=prev_week&anis=380501234567&api_token=****All calls from last week in CSV (“Cyrillic Windows-1251” encoding):https://noname.oki-toki.net/api/v1/reports/acd/calls-log?date_range=this_week&format=csv&api_token=**** 

Adding Call Data

URL https://noname.oki-toki.net/api/v1/call/add_dataMethod: POST or GET*the API key is created in your user settings, as shown in the first documentation item.Passing data:Standard method in POST or GET requestNon-standard method. The POST or GET variable json_request should contain a JSON string with data.Authorization by user API token. The request must have an api_token variable containing the user’s token.Required data:session_id – a unique call number in Oki-Toki to which data is addedNote.If data is added again, it will be added to the previously added data.If the value of some parameter is empty, then this parameter will be removed from the data set.The response returns a message about the successful addition of data with the call number or an error message. 

Retrieving Call Data

URL https://noname.oki-toki.net/api/v1/call/get_dataMethod: POST or GET*the API key is created in your user settings, as shown in the first documentation item.Passing data:Standard method in a POST or GET requestNon-standard method. The POST or GET variable json_request should contain a JSON string with data.Authorization by user API token. The request must have an api_token variable containing the user’s token.Required data:session_id – a unique call number in the Oki-Toki system to which data is added,date – the date of the call in the format DD.MM.YYYY.The response returns a message with the data about the call or an error message. 

Retrieving a Call Recording

URL https://noname.oki-toki.net/api/v1/record/{session_id}Method: GET*the API key is created in your user settings, as shown in the first documentation item.Authorization by user API token. The request must have an api_token variable containing the user’s token.Parameters:date – the date of the call. If not specified, searches the last three monthsExample:https://noname.oki-toki.net/api/v1/record/1234567?date=26.09.2017&api_token=****

Summary Report of Calls

URL https://noname.oki-toki.net/api/v1/reports/acd/calls-summaryMethod: GET*the API key is created in your user settings, as shown in the first documentation item.Authorization by user API token. The request must have an api_token variable containing the user’s token.Without parameters, returns calls from the last hour.Parameters:date_range – the period for which to return data. Values: last_hour, today, yesterday, this_week, prev_week, this_month, prev_month.Also, all other fields used in the filter of this report. Variable names and values can be taken from the report form. You can also perform the report in the web interface with the necessary parameters, and copy the part of the URL with parameters from the address bar, adding your API token there. 

Summary Reports by Queues and Users

URL https://noname.oki-toki.net/api/v1/reports/sec/queue-status-summary (queues)and https://noname.oki-toki.net/api/v1/reports/sec/user-status-summary (users)Method: GET*the API key is created in your user settings, as shown in the first documentation item.Authorization by user API token. The request must have an api_token variable containing the user’s token.Without parameters, returns statuses from the last hour without a breakdown.Parameters:date_range – the period for which to return data. Values: last_hour, today, yesterday, this_week, prev_week, this_month, prev_month.split_by – split by queues or users. Values: queue, user.Also, all other fields used in the filter of this report. Variable names and values can be taken from the report form. You can also perform the report in the web interface with the necessary parameters, and copy the part of the URL with parameters from the address bar, adding your API token there.

Changing Agent Status

URL https://noname.oki-toki.net/api/v1/user/set_statusMethod: POST or GET*the API key is created in your user settings, as shown in the first documentation item.Passing variables:Standard method in POST or GET requestNon-standard method. The POST or GET variable json_request should contain a JSON string with data for status changeAuthorization by user API token. The request must have an api_token variable containing the user’s token.Required data:user_id – user numberstatus_id – status number (see here https://noname.oki-toki.net/company/statuses)Optional data:away_status_id – additional status number (see here https://noname.oki-toki.net/company/statuses),status_comment – comment on the status.The response returns a message about the successful change of status or an error message. 

Exporting Contacts from CRM

URL https://noname.oki-toki.net/api/v1/contactsMethod: GET*the API key is created in your user settings, as shown in the first documentation item.Passing variables:Standard method in a GET requestAuthorization by user API token. The request must have an api_token variable containing the user’s token.Filter to select contacts:contact_field1=value1&contact_field2=value2&contact_field3=*value3&contact_field4=*value4*contact_field – The name of the contact field as it is displayed in the contact.=value – exact match with the given value,=*value* – contains the given value=*value – the given value is at the end of the field,=value* – the given value is at the beginning of the field,value can be a list in list format [1,2,3,4]. Then the contact will be found whose value of the specified field is in the list.The response returns a JSON array containing the found contacts. The number of contacts is limited to 1000.

Checking for the Existence of a Value in a List

URL https://noname.oki-toki.net/api/v1/lists/checkMethod: GET*the API key is created in your user settings, as shown in the first documentation item.Passing variables:Standard method in a GET requestAuthorization by user API token. The request must have an api_token variable containing the user’s token.Required data:list_id – the list number to check withinParameters for checking:value – valueThe response returns 1 if in the list. 0 – if not. 

Complete Order Data (SHOP Module)

URL https://noname.oki-toki.net/api/v1/shop/order/$idMethod: GET*the API key is created in your user settings, as shown in the first documentation item.Passing variables:Standard method in a GET requestAuthorization by user API token. The request must have an api_token variable containing the user’s token.Required data:$id – order numberThe response returns complete data on the order, including its composition. 

API for Dialer List

URL https://noname.oki-toki.net/api/v1/dialers/statMethod: GET*the API key is created in your user settings, as shown in the first documentation item.Passing variables:Standard method in a GET requestAuthorization by user API token. The request must have an api_token variable containing the user’s token.Optional data:$dialer_id – dialer numberThe response returns data on all non-archived dialers, or if $dialer_id is specified – only about one.

Submit your request and receive a detailed consultation from a specialist.

    Data Processing Agreement