Need data and instructions to integrate or upload data? Check out our instructions. Getting an API key Adding a task (number) to a call Deleting a task (number) from a call Call log Adding data about a call Getting data about a call Getting a conversation record Summary reports on queues and users Changing agent status Uploading contacts from CRM Checking if a value exists in the list Complete data about the order (SHOP module) API for the list of dialers
API v.1
Getting an API Key
The API key is generated in your user settings.
Adding a task (number) to a call
URL https://noname.oki-toki.net/api/v1/dialers/create_task Method: POST or GET *API key is created in your user settings, as shown in the first paragraph of the documentation Passing variables: In the standard way in a POST or GET request In a non-standard way. POST or GET variable json_request must contain json string with data for adding the task Authorization by user’s api token. The request must contain the api_token variable containing the user’s token. Required data: dialer_id – dialer number to which to add the task phones – phone numbers, maximum 5. Separated by commas, or json substring (if passed in json_request) Optional data: contact_id – contact number from Oki-Toki CRM, bp_id – process number from CRM Oki-Toki, date – time for which calls are scheduled, in the format 21.02.2017 12:00:00, import_id – import number, priority priority from 0 to 2, region region in time zone format. e.g. Europe/Kiev (if the region is specified, but is empty, then auto-correction of the zone (if enabled) will not work, the client schedule will not work, and the call will go according to the dialer schedule), ttl task lifetime, in seconds, user_id user number on which task to assign, details – json substring with additional information, for example {name:John, order:12} force_create – 1 or 0. If force_create=1, in dialer settings have uniqueness enabled and the task is not added due to this very uniqueness, then when adding all existing tasks that conflict with the one being added by a unique key, task_id is the number of the task in dialer. if specified, then phone numbers will be added to the task with the specified number, if it is in progress, reset_task_id – task number in auto-call. if specified, the system will try to find this task and put it into operation, instead of creating a new one. If phone numbers are specified, the system will put into operation only those that are specified. if the task does not have any specified number, then it will be added to it. if numbers are not specified, all phones in the task will be queued. The response returns a message about the successful addition of a task with its number, or an error message.
Deleting a task (number) from a call
URL https://noname.oki-toki.net/api/v1/dialers/cancel_task Method: POST or GET *API key is generated in your user settings as shown in the first paragraph of the documentation. Passing variables: In the standard way in a POST or GET request. In a non-standard way. POST or GET json_request variable must contain a json string with data for adding a task. Authorization by user api token. The request must contain the api_token variable containing the user’s token. Mandatory data: dialer_id – number of the dialer from which to remove the task (if the number = 0, then it is removed from all dialerls). 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 – json substring with additional information, for example { name:John, order:12}. Cancel tasks that have the specified additional information, cancel_phone – 1 (flag, if set, then cancels only the specified phone number), cancel_reason – cancellation reason (may be the following from: wrong_number). It is possible to combine optional parameters with each other, then different tasks will be deleted. For example: you can delete all tasks with a specific phone number, or with details. If no optional parameter is specified, an error will be returned. The response returns a message about the successful cancellation of the task(s) with its(their) number(s), or an error message.
Call log
URL https://noname.oki-toki.net/api/v1/reports/acd/calls-log Method: GET *API key is generated in your user settings as shown in the first paragraph of the documentation. Authorization by user api token. The request must contain the api_token variable containing the user’s token. Without parameters, returns calls for the last hour. Parameters: date_range – period for which to return data. Values: last_hour, today, yesterday, this_week, prev_week, this_month, prev_month, date – date for which to return calls, anis – phone number or session ID, format – format in which to return the result. Values: default, csv, csv_2016. Returns in JSON by default, csv – CP-1251 encoding, csv_2016 – UTF-8 encoding. As well as all other fields used in the filter of this report. Variable names and values can be taken from the report form. You can also run a report in the web interface with the necessary parameters, and copy the part of the url with the parameters from the address bar, adding api_token there. Examples Instead of asterisks, substitute your api_token Calls for today: https://noname.oki-toki.net/api/v1/reports/acd/calls-log?date_range=today&api_token=**** Search for a call with session ID 12345678, made 08/29/2017: https://noname.oki-toki.net/api/v1/reports/acd/calls-log?date=08/28/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 for the last week in CSV (encoding Cyrillic Windows-1251): https://noname.oki-toki.net/api/v1/reports/acd/calls-log?date_range=this_week&format=csv&api_token=* ***
Adding call details
URL https://noname.oki-toki.net/api/v1/call/add_data Method: POST or GET *API key is generated in your user settings as shown in the first paragraph of the documentation. Data transfer: Standard way in POST or GET request Non-standard way. POST or GET variable json_request should contain json string with data. Authorization by user api token. The request must contain the api_token variable containing the user’s token. Mandatory data: session_id – unique number of the call in the Oki-Toki system to which the data is added Note. If the data is added again, then they are added to those already added. If the value of a parameter is empty, then this parameter will be removed from the data set. In response, a message is returned about the successful addition of data with the call number, or an error message.
Getting call data
URL https://noname.oki-toki.net/api/v1/call/get_data Method: POST or GET *API key is generated in your user settings as shown in the first paragraph of the documentation. Data transfer: Standard way in POST or GET request Non-standard way. POST or GET variable json_request should contain json string with data. Authorization by user api token. The request must contain the api_token variable containing the user’s token. Required data: session_id – a unique number of the call 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 data about the call, or an error message.
Getting a recording of a conversation
URL https://noname.oki-toki.net/api/v1/record/{session_id} Method: GET *API key is generated in your user settings as shown in the first paragraph of the documentation. Authorization by user api token. The request must contain the api_token variable containing the user’s token. Parameters: date – call date. If not specified, it searches for the last three months .
Summary call report
URL https://noname.oki-toki.net/api/v1/reports/acd/calls-summary Method: GET *API key is generated in your user settings as shown in the first paragraph of the documentation. Authorization by user api token. The request must contain the api_token variable containing the user’s token. Without parameters, returns calls for the last hour. Parameters: date_range – period for which to return data. Values: last_hour, today, yesterday, this_week, prev_week, this_month, prev_month. As well as all other fields used in the filter of this report. Variable names and values can be taken from the report form. You can also run a report in the web interface with the necessary parameters, and copy the part of the url with the parameters from the address bar, adding api_token there.
Summary reports for queues and users
URLs 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 generated in your user settings, as shown in the first paragraph of the documentation. Authorization by user api token. The request must contain the api_token variable containing the user’s token. Without parameters, returns the statuses for the last hour without breakdown. Parameters: date_range – 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. As well as all other fields used in the filter of this report. Variable names and values can be taken from the report form. You can also run a report in the web interface with the required parameters, and copy the part of the url with the parameters from the address bar, adding api_token there.
Change of operator status
URL https://noname.oki-toki.net/api/v1/user/set_status Method: POST or GET *API key is generated in your user settings as shown in the first paragraph of the documentation. Passing variables: Standard way in POST or GET request Non-standard way. POST or GET variable json_request must contain json string with data to change the status Authorization by user’s api token. The request must contain the api_token variable containing the user’s token. Required data: user_id – user number status_id – status numbers (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 – status comment. The response returns a message about a successful status change, or an error message.
Uploading contacts from CRM
URL https://noname.oki-toki.net/api/v1/contacts Method: GET *API key is generated in your user settings as shown in the first paragraph of the documentation. Passing variables: In the standard way in a GET request Authorization by user’s api token. The request must contain the api_token variable containing the user’s token. Contact selection filter: contact_field1=value1&contact_field2=value2&contact_field3=*value3& contact_field4=*value4* contact_field – Name of the contact field, as it is displayed in the contact. =value – exact match with the specified value, =*value* – contains the specified value =*value – the specified value is at the end of the field, =value* – the specified value is at the beginning of the field, value can be a list in the list format [1,2,3,4]. Then the contact will be found, the value of the specified field of which is in the list. The response returns a json array containing the found contacts. The number of contacts is limited to 1000 pcs.
Checking if a value exists in a list
URL https://noname.oki-toki.net/api/v1/lists/check Method: GET *API key is generated in your user settings as shown in the first paragraph of the documentation. Passing variables: In the standard way in a GET request Authorization by user’s api token. The request must contain the api_token variable containing the user’s token. Required data: list_id – number of the list in which to check Check parameters: value – value 1 is returned in response if it is in the list. 0 – if not.
Complete order data (SHOP module)
URL https://noname.oki-toki.net/api/v1/shop/order/$id Method: GET *API key is generated in your user settings as shown in the first paragraph of the documentation. Passing variables: In the standard way in a GET request Authorization by user’s api token. The request must contain the api_token variable containing the user’s token. Required data: $id – order number The response returns complete data about the order, including its contents.
API for dialer list
URL https://noname.oki-toki.net/api/v1/dialers/stat Method: GET *API key is generated in your user settings as shown in the first paragraph of the documentation. Passing variables: In the standard way in a GET request Authorization by user’s api token. The request must contain the api_token variable containing the user’s token. Optional data: $dialer_id – dialer number The response returns data on all non-archived dialers, or if $dialer_id is specified, only one.